public static void TaoTK(ArrayList list) { string tk = UserName(); string mk = Password(); list.Add(new DangNhap(tk, mk)); DangNhap_DAL.GhiFile(list); }
public static void TaoTK(ArrayList list) { //tạo tải khoản string tk = UserName(); string mk = Password(); //ghi tài khoản vào danh sách mảng list.Add(new DangNhap(tk, mk)); //ghi tài khoản vào cơ sở dữ liệu DangNhap_DAL.ghiFile(list); }
private void frmKhachHang_Load(object sender, EventArgs e) { DangNhap_DAL dn = new DangNhap_DAL(); if (dn.MaNhomPer(DangNhap_DAL.UserName)) { pnControl.Enabled = true; } else { pnControl.Enabled = false; } dataGridViewKH.DataSource = kh.LoadDLKhachHang(); }
private void frmNhaSanXuat_Load(object sender, EventArgs e) { DangNhap_DAL dn = new DangNhap_DAL(); if (dn.MaNhomPer(DangNhap_DAL.UserName)) { pnControl.Enabled = true; } else { pnControl.Enabled = false; } dataGridViewNSX.DataSource = nsx.LoadDLNSX(); }
private void frmLoaiSanPham_Load(object sender, EventArgs e) { DangNhap_DAL dn = new DangNhap_DAL(); if (dn.MaNhomPer(DangNhap_DAL.UserName)) { pnControl.Enabled = true; } else { pnControl.Enabled = false; } dataLoaiSP.DataSource = qlkho.LoadDLLoaiSP(); }
private void frmNhaCungCap_Load(object sender, EventArgs e) { DangNhap_DAL dn = new DangNhap_DAL(); if (dn.MaNhomPer(DangNhap_DAL.UserName)) { pnControl.Enabled = true; } else { pnControl.Enabled = false; } dataGridViewNCC.DataSource = ncc.LoadDLNCC(); //LoadSTTDataGirdView(); }
public static bool DangNhap(ArrayList list) { bool kt = false; DangNhap_DAL.DocFile(list); string tk = UserName(); string mk = Password(); foreach (DangNhap dangnhap in list) { if (tk.Equals(dangnhap.User) && mk.Equals(dangnhap.Password)) { kt = true; } } return(kt); }
public static void Chon(ArrayList arrayList) { int chon; while (true) { Menu(); chon = int.Parse(Console.ReadLine()); Console.Clear(); if (chon == 3) { break; } switch (chon) { case 1: bool kt = true; if (kt == Login.DangNhap(arrayList)) { Console.WriteLine("Đăng nhập thành công"); //menu main RunProgram.Run(); } else { Console.WriteLine("Đăng nhập thất bại"); } Console.ReadKey(); Console.Clear(); break; case 2: Login.TaoTK(arrayList); DangNhap_DAL.GhiFile(arrayList); Console.Clear(); break; default: break; } } }
public static string LayMaQuyenHan(string maCanLay) => DangNhap_DAL.LayMaQuyenHan(maCanLay);
public static string DoiMatKhau(string maNV, string tendangnhap, string matkhau) => DangNhap_DAL.DoiMatKhau(maNV, tendangnhap, matkhau);
public static string LayTenDangNhap_MatKhau(string tendangnhap, string matkhau) => DangNhap_DAL.LayTenDangNhap_MatKhau(tendangnhap, matkhau);