Beispiel #1
0
 private void AddData()
 {
     try
     {
         DataRow newRow = tblTDV.NewRow();
         newRow["TENDANGNHAP"] = txtTenDN.Text.Trim();
         newRow["MATKHAU"]     = txtMK.Text.Trim();
         newRow["TEN"]         = txt_tenTDV.Text;
         newRow["SDT"]         = txtdienthoai.Text.ToString();
         newRow["DIACHI"]      = txt_diachi.Text.Trim();
         newRow["TINHTRANG"]   = 1;
         newRow["MA_TDV"]      = txt_codeTDV.Text;
         newRow["TUOI"]        = dpkNgaySinh.Value;
         newRow["CHUCVU"]      = txtCV.Text;
         newRow["PHONGBAN"]    = txtPB.Text;
         tblTDV.Rows.Add(newRow);
         tblTDV.Update(true);
     }
     catch (Exception ex)
     {
         TLog.WriteErr("frmTDV_AddData", ex.Message + "|" + ex.StackTrace);
     }
 }