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); } } }
private void detach_tblLopHPs(tblLopHP entity) { this.SendPropertyChanging(); entity.tblHocKy = null; }
private void attach_tblLopHPs(tblLopHP entity) { this.SendPropertyChanging(); entity.tblHocKy = this; }
partial void DeletetblLopHP(tblLopHP instance);
partial void UpdatetblLopHP(tblLopHP instance);
partial void InserttblLopHP(tblLopHP instance);