コード例 #1
0
 private void btnSua_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Bạn có muốn sửa lớp học phần này?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         try
         {
             DataLopHPDataContext db = new DataLopHPDataContext();
             lhp        = db.tblLopHPs.Where(s => s.maLHP == txtMaLHP.Text.ToString()).Single();
             lhp.maHP   = txtMaHP.Text;
             lhp.tenLHP = txtTenLHP.Text;
             lhp.maHK   = int.Parse(txtMaHK.Text);
             lhp.sSMax  = int.Parse(txtSSMax.Text);
             lhp.sSDK   = int.Parse(txtSSDK.Text);
             db.SubmitChanges();
             LoadData();
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
 }
コード例 #2
0
 private void detach_tblLopHPs(tblLopHP entity)
 {
     this.SendPropertyChanging();
     entity.tblHocKy = null;
 }
コード例 #3
0
 private void attach_tblLopHPs(tblLopHP entity)
 {
     this.SendPropertyChanging();
     entity.tblHocKy = this;
 }
コード例 #4
0
 partial void DeletetblLopHP(tblLopHP instance);
コード例 #5
0
 partial void UpdatetblLopHP(tblLopHP instance);
コード例 #6
0
 partial void InserttblLopHP(tblLopHP instance);