public frmThongTinTaiKhoan()
        {
            InitializeComponent();
            blaccout = new BLAccount();

            LoadData();
        }
Beispiel #2
0
 private void BtnLuu_Click(object sender, EventArgs e)
 {
     if (Them)
     {
         try
         {
             BLAccount blacc = new BLAccount();
             blacc.AddNV(this.txtBoxHoTen.Text, this.txtBoxCMND.Text, this.dtpNamsinh.Text, this.txtBoxLuong.Text, Convert.ToString(cbBoxChucVu.SelectedIndex + 1), err);
             LoadData();
             this.dgvThongTinNV.Enabled = true;
             MessageBox.Show("Đã thêm xong!");
         }
         catch (SqlException)
         {
             MessageBox.Show("Không thêm được. Lỗi rồi!");
         }
     }
     else
     {
         BLAccount blacc = new BLAccount();
         blacc.UpdateNV(this.txtID.Text, this.txtBoxHoTen.Text, this.txtBoxCMND.Text, this.dtpNamsinh.Text, this.txtBoxLuong.Text, Convert.ToString(cbBoxChucVu.SelectedIndex + 1), err);
         LoadData();
         this.dgvThongTinNV.Enabled = true;
         MessageBox.Show("Đã sửa xong!");
     }
 }
 public frmQuanLyAccount()
 {
     InitializeComponent();
     account     = new BLAccount();
     nhanvien    = new BLNhanVien();
     lstAccount  = new List <cAccount>();
     lstNhanVien = new List <cNhanVien>();
     LoadData();
 }
Beispiel #4
0
 private void BtnLuu_Click(object sender, EventArgs e)
 {
     try
     {
         BLAccount blacc = new BLAccount();
         blacc.CreateAcc(this.txtUsername.Text, this.txtPassword.Text, Convert.ToString(cbChucvu.SelectedIndex + 1), this.lblID.Text, pathPicture, err);
         LoadData();
         this.dgvTaiKhoan.Enabled = true;
         MessageBox.Show("Đã thêm xong!");
     }
     catch (SqlException)
     {
         MessageBox.Show("Không thêm được. Lỗi rồi!");
     }
 }
 public frmLogin()
 {
     InitializeComponent();
     dangnhap = new BLAccount();
 }