void LoadcboNhanVien()
 {
     cboQuaTrinhCongTac.DataSource    = NhanVienDAO.LoadCboNhanVien();
     cboQuaTrinhCongTac.DisplayMember = "HOTEN";
     cboQuaTrinhCongTac.ValueMember   = "NHANVIENID";
 }
Esempio n. 2
0
        public NhanVienDTO KiemTraDangNhap(string strTaiKhoan, string strMatKhau)
        {
            NhanVienDAO nvDAO = new NhanVienDAO();

            return(nvDAO.DangNhap(strTaiKhoan, strMatKhau.ToMD5()));
        }
Esempio n. 3
0
 public static DataTable LoadDSNV()
 {
     return(NhanVienDAO.LoadDSNV());
 }
Esempio n. 4
0
 public static void Sua(NhanVienDTO nv)
 {
     NhanVienDAO.Sua(nv);
 }
Esempio n. 5
0
 public static DataTable TimTheoMaNV(string manv)
 {
     return(NhanVienDAO.TimTheoMaNV(manv));
 }
Esempio n. 6
0
 public static DataTable TimTheoSDT(string sdt)
 {
     return(NhanVienDAO.TimTheoSDT(sdt));
 }
Esempio n. 7
0
 public static string GetTenNhanVien(long manv)
 {
     return(NhanVienDAO.GetTenNhanVien(manv));
 }
Esempio n. 8
0
 void LoadCboNhanVien()
 {
     cboNhanVien.DataSource    = NhanVienDAO.LoadCboNhanVien();
     cboNhanVien.ValueMember   = "NHANVIENID";
     cboNhanVien.DisplayMember = "HOTEN";
 }
Esempio n. 9
0
 public static void DeleteNhanVien(long manv)
 {
     NhanVienDAO.DeleteNhanVien(manv);
 }
Esempio n. 10
0
 public static List <QuyenDTO> GetAllQuyen()
 {
     return(NhanVienDAO.GetAllQuyen());
 }
Esempio n. 11
0
 public static void UpdateNhanVien(long manv, string tennv, long maquyen, DateTime ngaysinh, string gioitinh, string sdt)
 {
     NhanVienDAO.UpdateNhanVien(manv, tennv, maquyen, ngaysinh, gioitinh, sdt);
 }
Esempio n. 12
0
 public static void InsertNhanVien(long manv, string tennv, long maquyen, DateTime ngaysinh, string gioitinh, string sdt, string mk)
 {
     NhanVienDAO.InsertNhanVien(manv, tennv, maquyen, ngaysinh, gioitinh, sdt, mk);
 }
Esempio n. 13
0
 public static int GetNhanVien(long manv)
 {
     return(NhanVienDAO.GetNhanVien(manv));
 }
Esempio n. 14
0
 public static int GetNhanVien(long manv, string mk)
 {
     return(NhanVienDAO.GetNhanVien(manv, mk));
 }
Esempio n. 15
0
 public static void UpdateTaiKhoan(long manv, string mk)
 {
     NhanVienDAO.UpdateTaiKhoan(manv, mk);
 }
 public static NhanVienDTO layThongTinNV(string TenDN)
 {
     return(NhanVienDAO.layThongTinNV(TenDN));
 }
Esempio n. 17
0
 public static long GetQuyenNhanVien(long manv)
 {
     return(NhanVienDAO.GetQuyenNhanVien(manv));
 }
Esempio n. 18
0
 public static void Xoa(string manv)
 {
     NhanVienDAO.Xoa(manv);
 }
Esempio n. 19
0
 static NhanVienBUS()
 {
     db = new NhanVienDAO();
 }
Esempio n. 20
0
 public static DataTable TimTheoHoTen(string hoten)
 {
     return(NhanVienDAO.TimTheoHoTen(hoten));
 }
Esempio n. 21
0
 public static List <NhanVien> LoadNV()
 {
     return(NhanVienDAO.LoadNV());
 }
Esempio n. 22
0
 public NhanVienBUS()
 {
     nvDAO = new NhanVienDAO();
 }
Esempio n. 23
0
 public bool Them(NhanVienDAO nv)
 {
     return(dal_nv.Them(nv));
 }
Esempio n. 24
0
 public static void Them(NhanVienDTO nv)
 {
     NhanVienDAO.Them(nv);
 }
Esempio n. 25
0
 public bool Sua(NhanVienDAO nv)
 {
     return(dal_nv.Sua(nv));
 }
Esempio n. 26
0
        private void BtnLuu_Click(object sender, EventArgs e)
        {
            if (txtCMT.Text == "" || txtHoTen.Text == "" || txtSDT.Text == "" || txtEmail.Text == "")
            {
                MessageBox.Show("Bạn phải nhập đầy đủ dữ liệu");
                return;
            }
            if (!txtEmail.Text.Contains("@"))
            {
                MessageBox.Show("Email không hợp lệ!");
                return;
            }
            if (txtSDT.TextLength != 10)
            {
                MessageBox.Show("sdt không đúng!");
            }
            Regex regex = new Regex("(09|03|05|08)+([0-9]{8})");

            if (!regex.IsMatch(txtSDT.Text))
            {
                MessageBox.Show("SDT không hợp lệ!");
                return;
            }
            long a, b, c, d;
            long lcb, n;

            long.TryParse(cbbPhongBan.SelectedValue.ToString(), out a);
            long.TryParse(cbbLoaiHD.SelectedValue.ToString(), out b);
            long.TryParse(cbbTrangThai.SelectedValue.ToString(), out c);
            long.TryParse(cbbChucVu.SelectedValue.ToString(), out n);
            long.TryParse(cbbLCB.SelectedValue.ToString(), out lcb);
            if (long.TryParse(lblMaNV.Text, out d))
            {
                NhanVien nv = new NhanVien(d, txtHoTen.Text, a, txtQue.Text, dtpNgaySinh.Value,
                                           txtEmail.Text, txtSDT.Text, txtCMT.Text, dtpNBD.Value, lcb, n, cbbGT.Text);
                NhanVienDAO nvb = new NhanVienDAO();
                if (!nvb.Update(nv))
                {
                    MessageBox.Show("Sai!");
                }
                else
                {
                    MessageBox.Show("Sửa nhân viên thành công!");
                }
            }
            else
            {
                NhanVien nv = new NhanVien(0, txtHoTen.Text, a, txtQue.Text, dtpNgaySinh.Value,
                                           txtEmail.Text, txtSDT.Text, txtCMT.Text, dtpNBD.Value, lcb, n, cbbGT.SelectedText);

                NhanVienDAO bll = new NhanVienDAO();
                ChiTietTT   tt  = new ChiTietTT(c, 0, dtpNBBTT.Value, "");
                HopDong     hd  = new HopDong(0, b, 0);
                if (!bll.Insert(nv, hd, tt))
                {
                    MessageBox.Show("Sai !");
                }
                else
                {
                    MessageBox.Show("Thêm nhân viên thành công!");
                    XoaTrang();
                }
            }
        }
Esempio n. 27
0
 public ThemMoiPhieuNhap(NhanVienDAO nhanviendangnhap)
 {
     InitializeComponent();
     NVDangNhap = nhanviendangnhap;
 }
 public NhanVienBUS()
 {
     this.nhanVienDAO = new NhanVienDAO();
 }
 public static bool kiemTraDangNhap(string TenDN, string MatKhau)
 {
     return(NhanVienDAO.kiemTraDangNhap(TenDN, MatKhau));
 }
Esempio n. 30
0
 public NhanVienBLL()
 {
     dao = new NhanVienDAO();
     dbContext = new LienNgocDataContext();
 }
Esempio n. 31
0
 public static DataTable GetAllNhanVien()
 {
     return(NhanVienDAO.GetAllNhanVien());
 }