private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { Class.DanhMuc_TruongDaoTao dm = new Class.DanhMuc_TruongDaoTao(); dm.SchoolCode = txtCode.Text; dm.SchoolName = txtName.Text; dm.Description = txtDescription.Text; dm.Active = checkActive.Checked; if (txtCode.Enabled == true) { if (dm.Insert()) { Class.App.SaveSuccessfully(); LoadTruongDaoTao(); } else { Class.App.SaveNotSuccessfully(); } } else { if (dm.Update()) { Class.App.SaveSuccessfully(); LoadTruongDaoTao(); } else { Class.App.SaveNotSuccessfully(); } } }
private string LayCode() { string code = null; Class.DanhMuc_TruongDaoTao dm = new Class.DanhMuc_TruongDaoTao(); code = dm.GetNewCode(); return(code); }
private void LoadTruongDaoTao() { Class.DanhMuc_TruongDaoTao dmtdt = new Class.DanhMuc_TruongDaoTao(); gridControl1.DataSource = dmtdt.GetAllList_SCHOOL(); }