public override void ThucHien(int vitri) { FormNhanVien nhanvien = new FormNhanVien(); switch (vitri) { case 0: nhanvien.NhapNv(); break; case 1: nhanvien.TimNv(); break; case 2: nhanvien.XoaNv(); break; case 3: nhanvien.Hien(); break; case 4: Environment.Exit(0); break; } }
private void buttonX1_Click(object sender, EventArgs e) { FormNhanVien formNhanVien = new FormNhanVien(); formNhanVien.ShowDialog(); PhieuDangKi_User_Load(sender, e); }
private void barButtonItemNhanVien_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { bool falg = false; for (int i = 0; i < xtraTabControlNoiDung.TabPages.Count; i++) { if (xtraTabControlNoiDung.TabPages[i].Name == "xtraTabPageNhanVien") { falg = true; xtraTabControlNoiDung.SelectedTabPage = xtraTabControlNoiDung.TabPages[i]; break; } } if (falg == false) { FormNhanVien nhanvien = new FormNhanVien(vtcn); //tao tabpase s do chen vo tabcontrol XtraTabPage tab = new XtraTabPage(); tab.Name = "xtraTabPageNhanVien"; tab.Text = "Nhân Viên"; xtraTabControlNoiDung.TabPages.Add(tab); //nhan vao button hien thi tab xtraTabControlNoiDung.SelectedTabPage = tab; nhanvien.TopLevel = false; nhanvien.Parent = tab; // Form.MdiParent = this; nhanvien.Show(); nhanvien.Dock = DockStyle.Fill; } }
private void btnLogin_Click(object sender, EventArgs e) { if (ValidateChildren(ValidationConstraints.Enabled)) { if (Login_BLL.Instance.CheckNguoiDung(txtUser.Text, txtPassword.Text) == true) { if (Login_BLL.Instance.GetNguoiDungByUserAndPW(txtUser.Text, txtPassword.Text).ID_QuyenHan == 1) { FormQuanLy f = new FormQuanLy(txtUser.Text); this.Visible = false; f.ShowDialog(); this.Visible = true; txtUser.Text = ""; txtPassword.Text = ""; } else if (Login_BLL.Instance.GetNguoiDungByUserAndPW(txtUser.Text, txtPassword.Text).ID_QuyenHan == 2) { FormNhanVien f = new FormNhanVien(txtUser.Text); this.Visible = false; f.ShowDialog(); this.Visible = true; txtUser.Text = ""; txtPassword.Text = ""; } } else { MessageBox.Show("Sai thong tin"); } } }
private void BtnNhanVien_Click(object sender, EventArgs e) { FormNhanVien FNV = new FormNhanVien(); this.Hide(); FNV.ShowDialog(); this.Show(); }
private void nhânViênToolStripMenuItem_Click(object sender, EventArgs e) { FormNhanVien FNV = new FormNhanVien(); this.Hide(); FNV.ShowDialog(); this.Show(); }
public static void Menu() { do { Console.Clear(); Console.WriteLine(""); Console.WriteLine(); Console.WriteLine(); Console.WriteLine(); Console.WriteLine("\t\t\t\t************************************************************\t\t\t"); Console.WriteLine("\t\t\t\t* QUẢN LÝ BÁN GAS *\t\t\t"); Console.WriteLine("\t\t\t\t* 1.Quản lý Hàng hóa *\t\t\t"); Console.WriteLine("\t\t\t\t* 2.Quản lý Nhà cung cấp *\t\t\t"); Console.WriteLine("\t\t\t\t* 3.Quản lý Nhân viên *\t\t\t"); Console.WriteLine("\t\t\t\t* 4.Quản lý Hóa đơn Nhập *\t\t\t"); Console.WriteLine("\t\t\t\t* 5.Quản lý Hóa đơn Bán *\t\t\t"); Console.WriteLine("\t\t\t\t* 6.Quản lý Khách hàng *\t\t\t"); Console.WriteLine("\t\t\t\t* 7.Kết Thúc *\t\t\t"); Console.WriteLine("\t\t\t\t************************************************************\t\t\t"); Console.WriteLine("Chọn thông tin:"); int n = int.Parse(Console.ReadLine()); switch (n) { case 1: FormHangHoa frm = new FormHangHoa(); frm.Menu(); break; case 2: FormNCC frm2 = new FormNCC(); frm2.Menu(); break; case 3: FormNhanVien frm3 = new FormNhanVien(); frm3.Menu(); break; case 4: FormHDN frm4 = new FormHDN(); frm4.Menu(); break; case 5: FormHDB frm5 = new FormHDB(); frm5.Menu(); break; case 6: FormKhachHang frm6 = new FormKhachHang(); frm6.Menu(); break; case 7: break; } } while (true); }
private void btnLogin_Click(object sender, EventArgs e) { if (Login_BLL.Instance.CheckNguoiDung(txtUser.Text, txtPassword.Text) == true) { if (Login_BLL.Instance.GetNguoiDungByUserAndPW(txtUser.Text, txtPassword.Text).ID_QuyenHan == 1) { FormQuanLy f = new FormQuanLy(); f.ShowDialog(); } else if (Login_BLL.Instance.GetNguoiDungByUserAndPW(txtUser.Text, txtPassword.Text).ID_QuyenHan == 2) { FormNhanVien f = new FormNhanVien(); f.ShowDialog(); } } else { MessageBox.Show("Sai thong tin"); } //int checkql = 0; //int checknv = 0; //DHP_07Entities db = new DHP_07Entities(); //var l1 = db.NguoiDungs.Select(p => p).ToList(); //foreach (NguoiDung i in l1) //{ // if(txtUser.Text == i.Username.ToString() && txtPassword.Text == i.Password && i.ID_QuyenHan == 1) // { // checkql++; // break; // } // else if(txtUser.Text == i.Username.ToString() && txtPassword.Text == i.Password && i.ID_QuyenHan == 2) // { // checknv++; // break; // } //} //if (checkql != 0) //{ // FormQuanLy f = new FormQuanLy(); // f.ShowDialog(); //} //else if (checknv !=0) //{ // FormNhanVien f = new FormNhanVien(); // f.ShowDialog(); //} //else //{ // MessageBox.Show("Sai thong tin"); //} }
private void loginDone(DataTable data) { Program.StartWorkTime = DateTime.Now; Program.CurrentUserID = data.Rows[0].Field <string>("UserID"); this.Hide(); Form f = new FormQuanLy(); if (data.Rows[0].Field <string>("IDFunct") == Constant.FUNCTION_ID_NHAN_VIEN) { f = new FormNhanVien(); } f.Closed += (s, args) => this.Close(); f.Show(); }
private void btnLogin_Click_1(object sender, EventArgs e) { Form newForm = null; try { switch (bll.GetChucDanh(Convert.ToInt32(this.txtAccount.Text), this.txtPassword.Text)) { case "Quản Lý": { newForm = new FormManager(Convert.ToInt32(this.txtAccount.Text)); }; break; case "NV Nhập Hàng": { newForm = new fNhapHang(Convert.ToInt32(this.txtAccount.Text)); } break; case "NV Bán Hàng": { newForm = new FormNhanVien(Convert.ToInt32(this.txtAccount.Text)); } break; default: { MessageBox.Show("Sai tài khoản hoặc mật khẩu!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button3, MessageBoxOptions.ServiceNotification);; txtAccount.Focus(); break; } } } catch { MessageBox.Show("Xin hãy nhập tài khoản hoặc mật khẩu !! ", "Thông báo", MessageBoxButtons.OKCancel, MessageBoxIcon.Information, MessageBoxDefaultButton.Button3, MessageBoxOptions.ServiceNotification); txtAccount.Focus(); } if (newForm != null) { newForm.FormClosed += (s, eva) => this.Show(); this.Hide(); newForm.ShowDialog(); } }
public static void Menu() { do { Console.Clear(); Console.WriteLine("\t\t\t\t************************************\t\t\t"); Console.WriteLine("\t\t\t\t* QUAN LY BAN GAS *\t\t\t"); Console.WriteLine("\t\t\t\t* 1.Quan ly hang hoa *\t\t\t"); Console.WriteLine("\t\t\t\t* 2.Quan ly nha cung cap *\t\t\t"); Console.WriteLine("\t\t\t\t* 3.Quan ly nhan vien *\t\t\t"); Console.WriteLine("\t\t\t\t* 4.Quan ly hoa don ban *\t\t\t"); Console.WriteLine("\t\t\t\t* 5.Quan ly hoa don nhap *\t\t\t"); Console.WriteLine("\t\t\t\t* 6.Ket thuc *\t\t\t"); Console.WriteLine("\t\t\t\t************************************\t\t\t"); Console.WriteLine("Nhap n"); int n = int.Parse(Console.ReadLine()); switch (n) { case 1: FormHangHoa frm = new FormHangHoa(); frm.Menu(); break; case 2: FormNCC frm2 = new FormNCC(); frm2.Menu(); break; case 3: FormNhanVien frm3 = new FormNhanVien(); frm3.Menu(); break; case 4: FormHDB frm4 = new FormHDB(); } } while (true); }