public void BindBankRDetails() { string page = Request.Url.Segments[Request.Url.Segments.Length - 1].ToString().ToLower(); if (page != "bankreceipt.aspx") { GrdBankRDetails.DataSource = BankReceipt.GetBankReceipt((txtbankcoder.Text.Trim()), fdt, tdt); GrdBankRDetails.Columns[7].Visible = false; } GrdBankRDetails.DataBind(); }
protected void btnget_Click(object sender, EventArgs e) { try { string BnkCode = txtbankcoder.Text.Trim(); frdate = txtFromDate.Text.Split('/')[2] + "/" + txtFromDate.Text.Split('/')[1] + "/" + txtFromDate.Text.Split('/')[0]; todate = txttoDate.Text.Split('/')[2] + "/" + txttoDate.Text.Split('/')[1] + "/" + txttoDate.Text.Split('/')[0]; tdt = Convert.ToDateTime(todate); fdt = Convert.ToDateTime(frdate); if (tdt >= fdt) { DataSet ds = new DataSet(); ds = BankReceipt.GetBankReceipt(BnkCode, fdt, tdt); if (ds.Tables[0].Rows.Count > 0) { Session["Data"] = ds.Tables[0]; FillReport(ds.Tables[0]); //string page = Request.Url.Segments[Request.Url.Segments.Length - 1].ToString().ToLower(); //if (page != "bankreceipt.aspx") //{ // GrdBankRDetails.Columns[7].Visible = false; //} //GrdBankRDetails.DataBind(); PnlBankRDetails.Visible = true; } else { PnlBankRDetails.Visible = false; MessageBox("Records Not Available "); } } else { PnlBankRDetails.Visible = false; MessageBox("From Date is greater than To Date"); } txtbankcoder.Focus(); } catch (Exception ex) { MessageBox(ex.Message.ToString()); txtbankcoder.Focus(); } }
protected void btnget_Click(object sender, EventArgs e) { //Response.Write("Hello"); string BnkCode = txtbankcoder.Text.Trim(); frdate = txtFromDate.Text.Split('/')[2] + "/" + txtFromDate.Text.Split('/')[1] + "/" + txtFromDate.Text.Split('/')[0]; todate = txttoDate.Text.Split('/')[2] + "/" + txttoDate.Text.Split('/')[1] + "/" + txttoDate.Text.Split('/')[0]; tdt = Convert.ToDateTime(todate); fdt = Convert.ToDateTime(frdate); if (tdt >= fdt) { DataSet ds = new DataSet(); ds = BankReceipt.GetBankReceipt(BnkCode, fdt, tdt); if (ds.Tables[0].Rows.Count > 0) { GrdBankRDetails.DataSource = ds; string page = Request.Url.Segments[Request.Url.Segments.Length - 1].ToString().ToLower(); if (page != "bankreceipt.aspx") { GrdBankRDetails.Columns[7].Visible = false; } GrdBankRDetails.DataBind(); PnlBankRDetails.Visible = true; } else { PnlBankRDetails.Visible = false; MessageBox("Records Not Available "); } } else { PnlBankRDetails.Visible = false; MessageBox("From Date is greater than To Date"); } txtbankcoder.Focus(); UpdatePanel4.Update(); }