private void Update() { LopHoc lh = dapLopHoc.getByID(itemID); lh.TEN = Request["txtTen"].ToString(); lh.CHUNHIEM = Request["sltCHUNHIEM"].ToString(); dapLopHoc.Save(); }
protected void Page_Load(object sender, EventArgs e) { QLSinhVienEntities dbContext = new QLSinhVienEntities(); LopHocDAP dapLopHoc = new LopHocDAP(dbContext); GiaoVienDAP dapGiaoVien = new GiaoVienDAP(dbContext); doAction = !string.IsNullOrEmpty(Request["do"]) ? Request["do"].ToString() : ""; itemID = !string.IsNullOrEmpty(Request["itemid"]) ? Convert.ToInt32(Request["itemid"]) : 0; if (itemID != 0) { lh = dapLopHoc.getByID(itemID); } tbl_LopHocs.AddRange(dapLopHoc.getData()); tbl_GiaoViens.AddRange(dapGiaoVien.getData()); }