コード例 #1
0
ファイル: FrmDaiLy.cs プロジェクト: noface151/XDPM
 private void BtThem_Click(object sender, EventArgs e)
 {
     BUSDaiLy _busdaily = new BUSDaiLy();
     if (txtTenDaily.Text== "" || txtDiaChi.Text == "" || txtDiaChi.Text == "" || txtSDT.Text == "")
     {
         MessageBox.Show("Nhập thiếu thông tin");
     }
     else
     {
         _daily.Madaily = _busdaily.MaDaiLy();
         GanProperties();
         bool result = DALDaiLy.AddDaily(_daily);
         if (result == true)
         {
             MessageBox.Show("Thêm thành công");
             load();
         }
         else
         {
             MessageBox.Show("Thêm thất bại");
         }
     }
 }