- installation.zip
- Makanan2
- John Kenedy DAL.pdf
- JohnKenedy.DataAccess
- JohnKenedy.DataAccessModule
- MenuMakanan
- ProgramTools.sln
- SetupMakanan
- Debug
- Release
- SetupMakanan.vdproj
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using JohnKenedy.DataAccess;
using JohnKenedy.Samples;
namespace MenuMakanan
{
public partial class Login : Form
{
public Login()
{
InitializeComponent();
DataAccessLayer _dal = new DataAccessLayer(SqlServerType.MSSQL, System.Configuration.ConfigurationManager.ConnectionStrings["connection"].ConnectionString);
DataAccessLayer.Manager = _dal.GetDataAccessTableManager();
DataAccessLayer.Manager.DALLayer = _dal;
DataAccessLayer.Audit = _dal.GetAudit();
Installation _ins = new Installation("Food", "JOHN", "MenuMakanan", "Food", "JOHNKENEDYDAL", "FOOD_Data.MDF");
if (_ins.IsDone == false) _ins.ShowDialog();
if (_ins.IsRestart == true)
{
Application.Exit();
this.Close();
return;
}
this.Hide();
MainMenu _menu = new MainMenu();
_menu.ShowDialog();
this.Close();
}
private void btnExit_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnLogin_Click(object sender, EventArgs e)
{
DataAccessLayer.Manager.DALLayer.OpenConnectionTryClose();
MUserEntity _item = new MUserEntity();
if (_item.IsLoginMUserValid(txtUsername.Text, txtPassword.Text) == false)
{
MessageBox.Show("Username or Password is invalid");
DataAccessLayer.Manager.DALLayer.CloseConnection();
return;
}
DataAccessLayer.Manager.DALLayer.CloseConnection();
this.Hide();
MainMenu _menu = new MainMenu();
_menu.ShowDialog();
this.Close();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.