public void BindBankPDetails()
    {
        GrdBankPDetails.DataSource = BankPayment.GetBankPayment((txtbankcodep.Text.Trim()), fdt, tdt);

        string page = Request.Url.Segments[Request.Url.Segments.Length - 1].ToString().ToLower();

        if (page != "bankpayment.aspx")
        {
            GrdBankPDetails.Columns[7].Visible = false;
        }
        GrdBankPDetails.DataBind();
    }
Example #2
0
    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 = BankPayment.GetBankPayment(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();
        }
    }
Example #3
0
    private void PrindFunction()
    {
        Session["Data"] = null;
        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 = BankPayment.GetBankPayment(BnkCode, fdt, tdt);

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (txtsubgroup.Text.Trim() != "")
                {
                    DataView dv = new DataView(ds.Tables[0]);
                    dv.RowFilter    = "GR_HEAD = '" + txtsubgroup.Text.Trim() + "'";
                    Session["Data"] = dv;
                    FillReport(dv);
                }
                else
                {
                    DataView dv1 = new DataView(ds.Tables[0]);
                    Session["Data"] = dv1;
                    FillReport(dv1);
                }
                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();
        //Session["Data"] = null;
    }
    protected void btnget_Click(object sender, EventArgs e)
    {
        string BnkCode = txtbankcodep.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 = BankPayment.GetBankPayment(BnkCode, fdt, tdt);
            if (ds.Tables[0].Rows.Count > 0)
            {
                GrdBankPDetails.DataSource = BankPayment.GetBankPayment(BnkCode, fdt, tdt);
                string page = Request.Url.Segments[Request.Url.Segments.Length - 1].ToString().ToLower();
                if (page != "bankpayment.aspx")
                {
                    GrdBankPDetails.Columns[7].Visible = false;
                }
                GrdBankPDetails.DataBind();


                PnlBankPDetails.Visible = true;
            }
            else
            {
                PnlBankPDetails.Visible = false;
                MessageBox("Records Not Available ");
            }
        }
        else
        {
            PnlBankPDetails.Visible = false;
            MessageBox("From Date is greater than To Date");
        }
    }