コード例 #1
0
ファイル: fNhanVien.cs プロジェクト: DocongkhaiHCMUS/QLBH
        private void BtnSua_ItemClick(object sender, ItemClickEventArgs e)
        {
            int       rowIndex   = gvMain.FocusedRowHandle;
            DataRow   fNV        = BUS_NhanVien.TimNV(gvMain.GetRowCellValue(rowIndex, "Employee_ID").ToString());
            string    _MaNV      = fNV.Field <string>("Employee_ID");
            string    _TenNV     = fNV.Field <string>("Employee_Name");
            bool      _GioiTinh  = fNV.Field <bool>("Sex");
            string    _DiaChi    = fNV.Field <string>("Address");
            string    _DienThoai = fNV.Field <string>("O_Tel");
            string    _DiDong    = fNV.Field <string>("Mobile");
            DateTime  _NgaySinh  = fNV.Field <DateTime>("Birthday");
            string    _BoPhan    = fNV.Field <string>("Department_ID");
            string    _QuanLy    = fNV.Field <string>("Manager_ID");
            string    _ChucVu    = fNV.Field <string>("Description");
            string    _Email     = fNV.Field <string>("Email");
            bool      _ConQL     = fNV.Field <bool>("Active");
            CNhanVien nv         = new CNhanVien
            {
                MaNV      = _MaNV,
                TenNV     = _TenNV,
                GioiTinh  = _GioiTinh,
                DiaChi    = _DiaChi,
                DienThoai = _DienThoai,
                DiDong    = _DiDong,
                NgaySinh  = _NgaySinh,
                BoPhan    = _BoPhan,
                QuanLy    = _QuanLy,
                ChucVu    = _ChucVu,
                Email     = _Email,
                ConQL     = _ConQL
            };
            fThemNhanVien sua = new fThemNhanVien(false, nv, LoadData);

            sua.ShowDialog();
        }
コード例 #2
0
ファイル: fThemNhanVien.cs プロジェクト: DocongkhaiHCMUS/QLBH
        private void btnThemNV_ThemNhanVien_Click(object sender, EventArgs e)
        {
            fThemNhanVien ql = new fThemNhanVien(true, null, sendNV);

            ql.ShowDialog();

            int    num       = txtMa.Text == "" ? 1 : int.Parse(txtMa.Text.Substring(2)) + 1;
            string currentMa = "NV" + num.ToString("000000");

            txtMa.Text = currentMa;
        }
コード例 #3
0
ファイル: fNhanVien.cs プロジェクト: DocongkhaiHCMUS/QLBH
        private void BtnThem_ItemClick(object sender, ItemClickEventArgs e)
        {
            fThemNhanVien nv = new fThemNhanVien(true, null, LoadData);

            nv.ShowDialog();
        }