protected void Page_Load(object sender, EventArgs e) { userLogin = getUserLogin(); if (!IsPostBack) { try { InitialBUS(); LoadMailGroupLists(); LoadMailConfigList(); LoadEventList(); LoadSignatureList(); // Khoi tao session for store contentSendEvent ContentSendEventBUS cseBus = new ContentSendEventBUS(); Session["listContentSendEvent"] = cseBus.GetById(0); LoadContentList(); } catch (Exception ex) { logs.Error(userLogin.Username + "-Create-Event - Page_Load", ex); pnError.Visible = true; lblError.Text = ex.Message; } } }
protected void btnCreateNew_Click(object sender, EventArgs e) { try { resetForm(); hdfEventId.Value = ""; Response.Redirect(Request.RawUrl); // Set null value for listContentSendEvent session. ContentSendEventBUS cseBus = new ContentSendEventBUS(); Session["listContentSendEvent"] = cseBus.GetById(0); } catch (Exception ex) { logs.Error(userLogin.Username + "Create-Event - btnCreateNew_Click", ex); pnError.Visible = true; lblError.Text = ex.Message; } }