public void Update_Click(object sender, DirectEventArgs e) { int ID = int.Parse(hdfMaBC.Text); MauBaoCaoDongInfo content = new MauBaoCaoDongController().GetContent(ID); DAL.MauBaoCaoDong bcd = new DAL.MauBaoCaoDong(); //htmlEditor.Text = content.ReportContent; bcd.ReportContent = htmlEditor.Text; bcd.EditedDate = DateTime.Now; bcd.EditedBy = CurrentUser.ID; bcd.ID = ID; new MauBaoCaoDongController().Update(bcd); Dialog.ShowNotification("Cập nhật mẫu báo cáo: " + "\n" + content.ReportName.ToString() + " thành công"); }
protected void btnSave_Click(object sender, DirectEventArgs e) { DAL.MauBaoCaoDong bcd = new DAL.MauBaoCaoDong(); string name = txtNameHTML.Text; string s = htmlEditor.Text; bcd.ReportName = name; bcd.ReportContent = s; bcd.ContentBy = ""; bcd.CreatedDate = DateTime.Now; bcd.CreatedBy = CurrentUser.ID; new MauBaoCaoDongController().InsertMauBCD(bcd); cbxBC_Store.DataSource = new MauBaoCaoDongController().GetByName(); cbxBC_Store.DataBind(); Dialog.ShowNotification("Thêm mới mẫu báo cáo: " + "\n" + name + " thành công"); wdNameFileHTML.Hide(); }