Ejemplo n.º 1
0
 protected void btCreate_Click(object sender, EventArgs e)
 {
     if (this.Page.IsValid)
     {
         try
         {
             int    nhanvienID       = Convert.ToInt32(ddtNhanVien.SelectedValue);
             string email            = txtEmail.Text;
             string password         = txtPassword.Text;
             int    chucnang         = Convert.ToInt32(rblChucNang.SelectedValue);
             bool   trangthai        = Convert.ToBoolean(rblTrangThai.SelectedValue);
             bool   upThongTinCaNhan = cbThongTinCaNhan.Checked;
             bool   upLyLich         = cbLyLich.Checked;
             bool   inLyLich         = cbInLyLich.Checked;
             bool   inKeKhai         = cbInKeKhai.Checked;
             bool   upKeKhai         = cbUpKeKhai.Checked;
             bool   inDanhGia        = cbInDanhGia.Checked;
             bool   upDanhGia        = cbUpDanhGia.Checked;
             _accEntity.Insert(nhanvienID, email, password, chucnang, trangthai, upThongTinCaNhan, upLyLich, inLyLich, inKeKhai, upKeKhai, inDanhGia, upDanhGia);
             this.RedirectToIndex();
         }catch
         {
             Helper.PageHelper pageHelper = new Helper.PageHelper();
             pageHelper.AlertMessage(this.Page, "Chọn nhân viên thích hợp");
         }
     }
 }