private void Page_Load(object sender, System.EventArgs e) { try { BaseUrl = ConfigurationManager.AppSettings["BaseURL"]; strconn = ConfigurationManager.AppSettings["Iframaddsense"]; try { if (string.IsNullOrEmpty(BLL.LoginInfo.Userid)) { Response.Redirect(BLL.Constants.OldAdminUrl + "login.aspx", false); } } catch { Response.Redirect(BLL.Constants.OldAdminUrl + "login.aspx", false); } //upload pages on main site if (IsPostBack) { //string day1 = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"); //string day2 = DateTime.Now.ToString("yyyy-MM-dd"); Session["day1"] = txtstartdate.Text; Session["day2"] = txtenddate.Text; if (null != Request.QueryString["p"]) { pagenumber = Convert.ToInt32(Request.QueryString["p"].ToString()); } else { pagenumber = 1; } PromotinalLinkReportList(GetDate(txtstartdate.Text), GetDate(txtenddate.Text), ddllink.SelectedValue); // PromotinalLinkReportList(GetDate(txtstartdate.Text), GetDate(txtenddate.Text), Request.QueryString["referrerid"]); } else { //string day1 = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"); //string day2 = DateTime.Now.ToString("yyyy-MM-dd"); txtstartdate.Text = DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy"); txtenddate.Text = DateTime.Now.ToString("dd/MM/yyyy"); FillOfferLink(); if (Session["offerlink"] == null) { Session["offerlink"] = "0"; } else { Session["offerlink"] = ddllink.SelectedValue; } PromotinalLinkReportList(GetDate(txtstartdate.Text), GetDate(txtenddate.Text), ddllink.SelectedValue); disp_labels(); if (Request.QueryString["clear"] != null) { txtstartdate.Text = DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy"); txtenddate.Text = DateTime.Now.ToString("dd/MM/yyyy"); Session["day1"] = txtstartdate.Text; Session["day2"] = txtenddate.Text; ddllink.SelectedValue = "0"; Session["offerlink"] = "0"; } if (Request.QueryString["excel"] != null) { if (Request.QueryString["excel"] == "excel") { if (Session["day1"] == null && Session["day2"] == null) { Session["day1"] = DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy"); Session["day2"] = DateTime.Now.ToString("dd/MM/yyyy"); } using (ReportMgmt obj = new ReportMgmt(strconn)) { DataTable dtexcel = obj.GetUserJourneyList(GetDate(Session["day1"].ToString()), GetDate(Session["day2"].ToString()), ddllink.SelectedValue); ExcelMgmt objexcel = new ExcelMgmt(); string excelfilename = "userjourney_" + DateTime.Now.ToString("ddMMyyyyHHmmsss") + ".csv"; objexcel.WriteToCSV(dtexcel, excelfilename); } } } if (null != Request.QueryString["p"]) { pagenumber = Convert.ToInt32(Request.QueryString["p"].ToString()); } else { pagenumber = 1; } //if (Request.QueryString["referrerid"] != null) //{ // txtstartdate.Text = DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy"); // txtenddate.Text = DateTime.Now.ToString("dd/MM/yyyy"); // PromotinalLinkReportList(GetDate(txtstartdate.Text), GetDate(txtenddate.Text), Request.QueryString["referrerid"]); //} } } catch (Exception ex) { CommonLib.ExceptionHandler.WriteLog(CommonLib.Sections.Admin, "Report/LinkWiseLandingReport.aspx.cs Page_Load", ex); } }
private void Page_Load(object sender, System.EventArgs e) { try { BaseUrl = ConfigurationManager.AppSettings["BaseURL"]; strconn = ConfigurationManager.AppSettings["Iframaddsense"]; try { if (string.IsNullOrEmpty(BLL.LoginInfo.Userid)) { Response.Redirect(BLL.Constants.OldAdminUrl + "login.aspx", false); } } catch { Response.Redirect(BLL.Constants.OldAdminUrl + "login.aspx", false); } if (IsPostBack) { string day1 = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"); string day2 = DateTime.Now.ToString("yyyy-MM-dd"); if (null != Request.QueryString["p"]) { pagenumber = Convert.ToInt32(Request.QueryString["p"].ToString()); } else { pagenumber = 1; } PromotinalLinkReportList(day1, day2); } else { string day1 = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"); string day2 = DateTime.Now.ToString("yyyy-MM-dd"); disp_labels(); if (Request.QueryString["excel"] != null) { if (Request.QueryString["excel"] == "excel") { using (PromotionalLinkReportMgmt obj = new PromotionalLinkReportMgmt(strconn)) { DataTable dtexcel = obj.GetPromotionalExitClickList(day1, day2); ExcelMgmt objexcel = new ExcelMgmt(); string excelfilename = "promotionlink_" + DateTime.Now.ToString("ddMMyyyyHHmmsss") + ".csv"; objexcel.WriteToCSV(dtexcel, excelfilename); } } } if (null != Request.QueryString["p"]) { pagenumber = Convert.ToInt32(Request.QueryString["p"].ToString()); } else { pagenumber = 1; } PromotinalLinkReportList(day1, day2); } } catch (Exception ex) { CommonLib.ExceptionHandler.WriteLog(CommonLib.Sections.Admin, "OfferLink/List_PromotionalLinkReport.aspx.cs Page_Load", ex); } }
private void Page_Load(object sender, System.EventArgs e) { try { BaseUrl = ConfigurationManager.AppSettings["BaseURL"]; strconn = ConfigurationManager.AppSettings["Iframaddsense"]; try { if (string.IsNullOrEmpty(BLL.LoginInfo.Userid)) { Response.Redirect(BLL.Constants.OldAdminUrl + "login.aspx", false); } } catch { Response.Redirect(BLL.Constants.OldAdminUrl + "login.aspx", false); } if (IsPostBack) { Session["day1"] = txtstartdate.Text; Session["day2"] = txtenddate.Text; if (null != Request.QueryString["p"]) { pagenumber = Convert.ToInt32(Request.QueryString["p"].ToString()); } else { pagenumber = 1; } PromotinalLinkReportList(GetDate(txtstartdate.Text), GetDate(txtenddate.Text), Request.QueryString["referrerid"], pagesize, pagenumber); } else { if (null != Request.QueryString["p"]) { pagenumber = Convert.ToInt32(Request.QueryString["p"].ToString()); } else { pagenumber = 1; } disp_labels(); if (Request.QueryString["clear"] != null) { txtstartdate.Text = DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy"); txtenddate.Text = DateTime.Now.ToString("dd/MM/yyyy"); Session["day1"] = txtstartdate.Text; Session["day2"] = txtenddate.Text; } if (Request.QueryString["excel"] != null) { if (Request.QueryString["excel"] == "excel") { if (Session["day1"] == null && Session["day2"] == null) { Session["day1"] = DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy"); Session["day2"] = DateTime.Now.ToString("dd/MM/yyyy"); } using (PromotionalLinkReportMgmt obj = new PromotionalLinkReportMgmt(strconn)) { DataTable dtexcel = obj.GetPromotionalExitClickListDetails(GetDate(Session["day1"].ToString()), GetDate(Session["day2"].ToString()), Request.QueryString["referrerid"], pagesize, pagenumber); ExcelMgmt objexcel = new ExcelMgmt(); string excelfilename = "promotionlinkdetails_" + DateTime.Now.ToString("ddMMyyyyHHmmsss") + ".csv"; objexcel.WriteToCSV(dtexcel, excelfilename); } } } if (Request.QueryString["referrerid"] != null) { txtstartdate.Text = DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy"); txtenddate.Text = DateTime.Now.ToString("dd/MM/yyyy"); PromotinalLinkReportList(GetDate(txtstartdate.Text), GetDate(txtenddate.Text), Request.QueryString["referrerid"], pagesize, pagenumber); } } } catch (Exception ex) { CommonLib.ExceptionHandler.WriteLog(CommonLib.Sections.Admin, "OfferLink/PromotionalLinkReportDetails.aspx.cs Page_Load", ex); } }