public void fillddstate() { string state = "SELECT distinct state,state as STATE FROM [atms] where CH = '" + Session["sess_username"].ToString() + "'"; obj.BindListboxWithValue(ddstate, state); if (txtuser.Text != "") { SqlDataSource2.SelectCommand = "select convert(datetime,vdate) as [vdate], COUNT(*) as [visit] from DR_CTP d inner join atms a on a.atmid = d.ATMID where convert(datetime,vdate) BETWEEN CONVERT(VARCHAR(10), dateadd(D, -6, GETDATE()), 101) AND CONVERT(VARCHAR(10), GETDATE(), 101) and a.state in (" + txtuser.Text + ") and CH = '" + Session["sess_username"].ToString() + "' group by vdate union all select CONVERT(VARCHAR(10), GETDATE(), 101) AS [vDATE],'0' union all select dateadd(D,-1,CONVERT(VARCHAR(10), GETDATE(), 101)) AS [vDATE],'0' union all select dateadd(D,-2,CONVERT(VARCHAR(10), GETDATE(), 101)) AS [vDATE],'0' union all select dateadd(D,-3,CONVERT(VARCHAR(10), GETDATE(), 101)) AS [vDATE],'0' union all Select dateadd(D,-4,CONVERT(VARCHAR(10), GETDATE(), 101)) AS [vDATE],'0' union all select dateadd(D,-5,CONVERT(VARCHAR(10), GETDATE(), 101)) AS [vDATE],'0' union all select dateadd(D,-6,CONVERT(VARCHAR(10), GETDATE(), 101)) AS [vDATE],'0' order by convert(datetime,vdate)"; } else { SqlDataSource2.SelectCommand = "select convert(datetime,vdate) as [vdate], COUNT(*) as [visit] from DR_CTP d inner join atms a on a.atmid = d.ATMID where convert(datetime,vdate) BETWEEN CONVERT(VARCHAR(10), dateadd(D, -6, GETDATE()), 101) AND CONVERT(VARCHAR(10), GETDATE(), 101) and CH = '" + Session["sess_username"].ToString() + "' group by vdate union all select CONVERT(VARCHAR(10), GETDATE(), 101) AS [vDATE],'0' union all select dateadd(D,-1,CONVERT(VARCHAR(10), GETDATE(), 101)) AS [vDATE],'0' union all select dateadd(D,-2,CONVERT(VARCHAR(10), GETDATE(), 101)) AS [vDATE],'0' union all select dateadd(D,-3,CONVERT(VARCHAR(10), GETDATE(), 101)) AS [vDATE],'0' union all Select dateadd(D,-4,CONVERT(VARCHAR(10), GETDATE(), 101)) AS [vDATE],'0' union all select dateadd(D,-5,CONVERT(VARCHAR(10), GETDATE(), 101)) AS [vDATE],'0' union all select dateadd(D,-6,CONVERT(VARCHAR(10), GETDATE(), 101)) AS [vDATE],'0' order by convert(datetime,vdate)"; } }
protected void Page_Load(object sender, EventArgs e) { // defaultCalendarExtender.StartDate = Convert.ToDateTime(DateTime.Now.Date.AddDays(-(Convert.ToDouble((DateTime.Now.Date.Day)))).ToString("MM/dd/yyyy")); //defaultCalendarExtender.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); // defaultCalendarExtender1.StartDate = Convert.ToDateTime(DateTime.Now.Date.AddDays(-(Convert.ToDouble((DateTime.Now.Date.Day)))).ToString("MM/dd/yyyy")); //defaultCalendarExtender1.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); if (!Page.IsPostBack) { txt_frmDate.Text = DateTime.Now.Date.AddDays((-(Convert.ToDouble((DateTime.Now.Date.Day)))) + 1).ToString("MM'/'dd'/'yyyy"); txt_toDate.Text = DateTime.Now.Date.ToString("MM'/'dd'/'yyyy"); DropDownList1.DataBind(); DropDownList1.Items.Add("ALL"); DropDownList1.Items.FindByText("ALL").Value = "%"; DropDownList1.Items.FindByValue("%").Selected = true; string state = "SELECT distinct state,state as STATE FROM [atms]"; obj.BindListboxWithValue(ddstate, state); } else { } }
protected void Page_Load(object sender, EventArgs e) { defaultCalendarExtender.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); defaultCalendarExtender1.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); txt_frmDate.Attributes.Add("readonly", "readonly"); txt_toDate.Attributes.Add("readonly", "readonly"); #region Add 'ALL' to userid dropdown list /*------------------------------------------------------------------------------------------------*/ /* Add 'ALL' to userid dropdown list * /*------------------------------------------------------------------------------------------------*/ if (!Page.IsPostBack) { DropDownList1.DataBind(); DropDownList1.Items.Add("ALL"); DropDownList1.Items.FindByText("ALL").Value = "%"; DropDownList1.Items.FindByValue("%").Selected = true; } /*------------------------------------------------------------------------------------------------*/ #endregion if (!Page.IsPostBack) { string state = "SELECT distinct state,state as STATE FROM [atms] where rcm = '" + Session["sess_username"].ToString() + "'"; obj.BindListboxWithValue(ddstate, state); txt_frmDate.Text = System.DateTime.Now.ToString("MM'/'dd'/'yyyy"); txt_toDate.Text = System.DateTime.Now.ToString("MM'/'dd'/'yyyy"); btn_search_Click(sender, e); } }
protected void Page_Load(object sender, EventArgs e) { CalendarExtender1.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); CalendarExtender2.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); //CalendarExtender1.EndDate = toDate; //CalendarExtender2.EndDate = toDate; if (!Page.IsPostBack) { dd_bank.DataBind(); dd_bank.Items.Add("ALL"); dd_bank.Items.FindByText("ALL").Value = "%"; dd_bank.Items.FindByValue("%").Selected = true; dd_cust.DataBind(); dd_cust.Items.Add("ALL"); dd_cust.Items.FindByText("ALL").Value = "%"; dd_cust.Items.FindByValue("%").Selected = true; string state = "SELECT distinct state,state as STATE FROM [atms] where CH = '" + Session["sess_username"].ToString() + "'"; obj.BindListboxWithValue(ddstate, state); } }
protected void Page_Load(object sender, EventArgs e) { string year = ""; if (System.DateTime.Now.ToString("MM") == "01") { year = System.DateTime.Now.AddYears(-1).ToString("yyyy"); } else { year = System.DateTime.Now.ToString("yyyy"); } //CalendarExtender1.StartDate = Convert.ToDateTime(System.DateTime.Now.AddMonths(-1).ToString("MM") + "/" + "01/" + year); CalendarExtender1.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); //CalendarExtender2.StartDate = Convert.ToDateTime(System.DateTime.Now.AddMonths(-1).ToString("MM") + "/" + "01/" + year); CalendarExtender2.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); if (Page.IsPostBack) { } else { txt_frmDate.Text = System.DateTime.Now.ToString("MM'/'dd'/'yyyy"); txt_toDate.Text = System.DateTime.Now.ToString("MM'/'dd'/'yyyy"); string state = "SELECT distinct state,state as STATE FROM [atms] where rm = '" + Session["sess_username"].ToString() + "'"; obj.BindListboxWithValue(ddstate, state); } }
protected void Page_Load(object sender, EventArgs e) { //defaultCalendarExtender.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); //defaultCalendarExtender1.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("dd/MM/yyyy")); //txt_frmDate.Attributes.Add("readonly", "readonly"); //txt_toDate.Attributes.Add("readonly", "readonly"); #region Add 'ALL' to userid dropdown list /*------------------------------------------------------------------------------------------------*/ /* Add 'ALL' to userid dropdown list * /*------------------------------------------------------------------------------------------------*/ if (!Page.IsPostBack) { chk123.Visible = false; Session["sess_x"] = ""; DropDownList1.DataBind(); //DropDownList1.Items.Add("ALL"); //DropDownList1.Items.FindByText("ALL").Value = "%"; //DropDownList1.Items.FindByValue("%").Selected = true; string state = "SELECT distinct state,state as STATE FROM [atms] "; obj.BindListboxWithValue(ddstate, state); } else { chk123.Visible = true; } /*------------------------------------------------------------------------------------------------*/ #endregion }
protected void Page_Load(object sender, EventArgs e) { try { defaultCalendarExtender.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); defaultCalendarExtender1.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); } catch (Exception ex) { } // defaultCalendarExtender.EndDate = toDate; //defaultCalendarExtender1.EndDate = toDate; /*------------------------------------------------------------------------------------------------*/ /* Add 'ALL' to userid dropdown list and keep focus on current month and year on first page load, * /*-----------------------------------------------------------------------------------------------*/ if (!Page.IsPostBack) { DropDownList1.DataBind(); DropDownList1.Items.Add("ALL"); DropDownList1.Items.FindByText("ALL").Value = "%"; DropDownList1.Items.FindByValue("%").Selected = true; string state = "SELECT distinct state,state as STATE FROM [atms]"; obj.BindListboxWithValue(ddstate, state); } //GridView1.DataSource = GetProducts(); //GridView1.DataBind(); /*------------------------------------------------------------------------------------------------*/ }
protected void Page_Load(object sender, EventArgs e) { try { defaultCalendarExtender.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); defaultCalendarExtender1.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); } catch (Exception ex) { } txt_frmDate.Attributes.Add("readonly", "readonly"); txt_toDate.Attributes.Add("readonly", "readonly"); #region Add 'ALL' to userid dropdown list /*------------------------------------------------------------------------------------------------*/ /* Add 'ALL' to userid dropdown list * /*------------------------------------------------------------------------------------------------*/ if (!Page.IsPostBack) { DropDownList1.DataBind(); DropDownList1.Items.Add("ALL"); DropDownList1.Items.FindByText("ALL").Value = "%"; DropDownList1.Items.FindByValue("%").Selected = true; string state = "SELECT distinct state,state as STATE FROM [atms] where bankid='TAMILNAD MERCANTILE BANK LIMITED'"; obj.BindListboxWithValue(ddstate, state); } /*------------------------------------------------------------------------------------------------*/ #endregion }
protected void Page_Load(object sender, EventArgs e) { CommonClass obj = new CommonClass(); txt_frmDate.Attributes.Add("readonly", "readonly"); //txt_toDate.Attributes.Add("readonly", "readonly"); #region Add 'ALL' to userid dropdown list /*------------------------------------------------------------------------------------------------*/ /* Add 'ALL' to userid dropdown list * /*------------------------------------------------------------------------------------------------*/ if (!Page.IsPostBack) { chk123.Visible = false; Session["sess_x"] = ""; //DropDownList1.DataBind(); //DropDownList1.Items.Add("ALL"); //DropDownList1.Items.FindByText("ALL").Value = "%"; //DropDownList1.Items.FindByValue("%").Selected = true; string state = "SELECT distinct state,state as STATE FROM [atms] where RM = '" + Session["sess_username"].ToString() + "'"; obj.BindListboxWithValue(ddstate, state); } else { chk123.Visible = true; } /*------------------------------------------------------------------------------------------------*/ #endregion }
protected void Page_Load(object sender, EventArgs e) { defaultCalendarExtender.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); defaultCalendarExtender1.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); // defaultCalendarExtender.EndDate = toDate; //defaultCalendarExtender1.EndDate = toDate; /*------------------------------------------------------------------------------------------------*/ /* Add 'ALL' to userid dropdown list and keep focus on current month and year on first page load, * /*------------------------------------------------------------------------------------------------*/ if (!Page.IsPostBack) { DropDownList1.DataBind(); DropDownList1.Items.Add("ALL"); DropDownList1.Items.FindByText("ALL").Value = "%"; DropDownList1.Items.FindByValue("%").Selected = true; string state = "SELECT distinct state,state as STATE FROM [atms] where rcm = '" + Session["sess_username"].ToString() + "'"; obj.BindListboxWithValue(ddstate, state); } /*------------------------------------------------------------------------------------------------*/ }
protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack) { } else { txt_frmDate.Text = DateTime.Now.Date.AddDays((-(Convert.ToDouble((DateTime.Now.Date.Day)))) + 1).ToString("MM'/'dd'/'yyyy"); txt_toDate.Text = DateTime.Now.Date.ToString("MM'/'dd'/'yyyy"); string state = "SELECT distinct state,state as STATE FROM [atms] where rm = '" + Session["sess_username"].ToString() + "'"; obj.BindListboxWithValue(ddstate, state); } }
protected void Page_Load(object sender, EventArgs e) { //defaultCalendarExtender.StartDate = Convert.ToDateTime(DateTime.Now.Date.AddDays(-(Convert.ToDouble((DateTime.Now.Date.Day)))).ToString("MM/dd/yyyy")); //defaultCalendarExtender.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); //defaultCalendarExtender1.StartDate = Convert.ToDateTime(DateTime.Now.Date.AddDays(-(Convert.ToDouble((DateTime.Now.Date.Day)))).ToString("MM/dd/yyyy")); //defaultCalendarExtender1.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); txt_frmDate.Text = DateTime.Now.Date.AddDays((-(Convert.ToDouble((DateTime.Now.Date.Day)))) + 1).ToString("MM'/'dd'/'yyyy"); txt_toDate.Text = DateTime.Now.Date.ToString("MM'/'dd'/'yyyy"); if (!IsPostBack) { string state = "SELECT distinct state,state as STATE FROM [atms] where bankid='TAMILNAD MERCANTILE BANK LIMITED'"; obj.BindListboxWithValue(ddstate, state); } }
protected void Page_Load(object sender, EventArgs e) { //defaultCalendarExtender.StartDate = Convert.ToDateTime(DateTime.Now.Date.AddDays(-(Convert.ToDouble((DateTime.Now.Date.Day)))).ToString("MM/dd/yyyy")); //defaultCalendarExtender.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); //defaultCalendarExtender1.StartDate = Convert.ToDateTime(DateTime.Now.Date.AddDays(-(Convert.ToDouble((DateTime.Now.Date.Day)))).ToString("MM/dd/yyyy")); //defaultCalendarExtender1.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); txt_frmDate.Text = DateTime.Now.Date.AddDays((-(Convert.ToDouble((DateTime.Now.Date.Day)))) + 1).ToString("MM'/'dd'/'yyyy"); txt_toDate.Text = DateTime.Now.Date.ToString("MM'/'dd'/'yyyy"); if (!IsPostBack) { string state = "SELECT distinct state,state as STATE FROM [atms] where CH = '" + Session["sess_username"].ToString() + "'"; obj.BindListboxWithValue(ddstate, state); } }
protected void Page_Load(object sender, EventArgs e) { try { CalendarExtender1.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); CalendarExtender2.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); } catch (Exception ex) { } //CalendarExtender1.EndDate = toDate; //CalendarExtender2.EndDate = toDate; if (!Page.IsPostBack) { dd_bank.DataBind(); dd_bank.Items.Add("ALL"); dd_bank.Items.FindByText("ALL").Value = "%"; dd_bank.Items.FindByValue("%").Selected = true; dd_cust.DataBind(); dd_cust.Items.Add("ALL"); dd_cust.Items.FindByText("ALL").Value = "%"; dd_cust.Items.FindByValue("%").Selected = true; string state = "SELECT distinct state,state as STATE FROM [atms]"; obj.BindListboxWithValue(ddstate, state); } if (Page.IsPostBack) { if (Request.QueryString["export"] == "true") { btn_Update_Click(sender, e); GridView1.AllowPaging = false; GridView1.DataBind(); Response.AddHeader("content-disposition", "attachment;filename=AuditReport.xls"); Response.Charset = String.Empty; Response.ContentType = "application/vnd.xls"; System.IO.StringWriter sw = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter hw = new HtmlTextWriter(sw); GridView1.RenderControl(hw); Response.Write(sw.ToString()); Response.End(); Response.Redirect("auditforaperiod.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { /*------------------------------------------------------------------------------------------------*/ /* Add 'ALL' to userid dropdown list and keep focus on current month and year on first page load, * /*------------------------------------------------------------------------------------------------*/ if (!Page.IsPostBack) { DropDownList1.DataBind(); DropDownList1.Items.Add("ALL"); DropDownList1.Items.FindByText("ALL").Value = "%"; DropDownList1.Items.FindByValue("%").Selected = true; string state = "SELECT distinct state,state as STATE FROM [atms] where CH = '" + Session["sess_username"].ToString() + "'"; obj.BindListboxWithValue(ddstate, state); } /*------------------------------------------------------------------------------------------------*/ }
protected void Page_Load(object sender, EventArgs e) { /*------------------------------------------------------------------------------------------------*/ /* Add 'ALL' to userid dropdown list and keep focus on current month and year on first page load, * /*------------------------------------------------------------------------------------------------*/ if (!Page.IsPostBack) { DropDownList1.DataBind(); DropDownList1.Items.Add("ALL"); DropDownList1.Items.FindByText("ALL").Value = "%"; DropDownList1.Items.FindByValue("%").Selected = true; string state = "SELECT distinct state,state as STATE FROM [atms] where bankid='TAMILNAD MERCANTILE BANK LIMITED'"; obj.BindListboxWithValue(ddstate, state); } /*------------------------------------------------------------------------------------------------*/ }
protected void Page_Load(object sender, EventArgs e) { try { //defaultCalendarExtender.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); //defaultCalendarExtender1.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); } catch (Exception ex) { } // defaultCalendarExtender.EndDate = toDate; //defaultCalendarExtender1.EndDate = toDate; /*------------------------------------------------------------------------------------------------*/ /* Add 'ALL' to userid dropdown list and keep focus on current month and year on first page load, /*-----------------------------------------------------------------------------------------------*/ if (!Page.IsPostBack) { string state = "SELECT distinct state,state as STATE FROM [atms]"; obj.BindListboxWithValue(ddstate, state); } /*------------------------------------------------------------------------------------------------*/ }
protected void Page_Load(object sender, EventArgs e) { string year = ""; if (System.DateTime.Now.ToString("MM") == "01") { year = System.DateTime.Now.AddYears(-1).ToString("yyyy"); } else { year = System.DateTime.Now.ToString("yyyy"); } if (Page.IsPostBack) { } else { txt_frmDate.Text = System.DateTime.Now.ToString("MM'/'dd'/'yyyy"); txt_toDate.Text = System.DateTime.Now.ToString("MM'/'dd'/'yyyy"); string state = "SELECT distinct state,state as STATE FROM [atms] where CH = '" + Session["sess_username"].ToString() + "'"; obj.BindListboxWithValue(ddstate, state); } }
protected void Page_Load(object sender, EventArgs e) { string year = ""; if (System.DateTime.Now.ToString("MM") == "01") { year = System.DateTime.Now.AddYears(-1).ToString("yyyy"); } else { year = System.DateTime.Now.ToString("yyyy"); } if (Page.IsPostBack) { } else { txt_frmDate.Text = System.DateTime.Now.ToString("MM'/'dd'/'yyyy"); txt_toDate.Text = System.DateTime.Now.ToString("MM'/'dd'/'yyyy"); string state = "SELECT distinct state,state as STATE FROM [atms] where bankid='TAMILNAD MERCANTILE BANK LIMITED'"; obj.BindListboxWithValue(ddstate, state); } }
protected void Page_Load(object sender, EventArgs e) { try { defaultCalendarExtender.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); defaultCalendarExtender1.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); } catch (Exception ex) { } txt_frmDate.Attributes.Add("readonly", "readonly"); txt_toDate.Attributes.Add("readonly", "readonly"); #region Add 'ALL' to userid dropdown list /*------------------------------------------------------------------------------------------------*/ /* Add 'ALL' to userid dropdown list * /*------------------------------------------------------------------------------------------------*/ if (!Page.IsPostBack) { // obj.NonExecuteQuery("update DR_CTP set version='MP_V2.4' where version='MP_V2.5'"); DropDownList1.DataBind(); DropDownList1.Items.Add("ALL"); DropDownList1.Items.FindByText("ALL").Value = "%"; DropDownList1.Items.FindByValue("%").Selected = true; string state = "SELECT distinct state,state as STATE FROM [atms]"; obj.BindListboxWithValue(ddstate, state); txt_frmDate.Text = System.DateTime.Now.ToString("MM'/'dd'/'yyyy"); txt_toDate.Text = System.DateTime.Now.ToString("MM'/'dd'/'yyyy"); btn_search_Click(sender, e); } /*------------------------------------------------------------------------------------------------*/ #endregion }
protected void Page_Load(object sender, EventArgs e) { try { defaultCalendarExtender.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); defaultCalendarExtender1.EndDate = Convert.ToDateTime(DateTime.Now.Date.ToString("MM/dd/yyyy")); } catch (Exception ex) { } txt_frmDate.Attributes.Add("readonly", "readonly"); txt_toDate.Attributes.Add("readonly", "readonly"); if (string.IsNullOrEmpty(txt_toDate.Text.Trim())) { txt_frmDate.Text = DateTime.Now.ToString("MM'/'dd'/'yyyy"); txt_toDate.Text = DateTime.Now.ToString("MM'/'dd'/'yyyy"); } #region Add 'ALL' to userid dropdown list /*------------------------------------------------------------------------------------------------*/ /* Add 'ALL' to userid dropdown list * /*------------------------------------------------------------------------------------------------*/ if (!Page.IsPostBack) { Session["sess_x"] = ""; string state = "SELECT distinct state,state as STATE FROM [atms] where rm = '" + Session["sess_username"].ToString() + "'"; obj.BindListboxWithValue(ddstate, state); } else { } /*------------------------------------------------------------------------------------------------*/ #endregion }