Exemple #1
0
    protected void btnget_Click(object sender, EventArgs e)
    {
        string from = txtfromDate.Text.Split('/')[2] + "/" + txtfromDate.Text.Split('/')[1] + "/" + txtfromDate.Text.Split('/')[0];
        string To   = txttoDate.Text.Split('/')[2] + "/" + txttoDate.Text.Split('/')[1] + "/" + txttoDate.Text.Split('/')[0];

        fdate = Convert.ToDateTime(from);
        tdate = Convert.ToDateTime(To);
        if (fdate > tdate)
        {
            MessageBox("From Date is Greater than ToDate");
            txtfromDate.Focus();
        }
        else
        {
            DataTable dt = new DataTable();
            dt = CreditNote.GetTotalCN_Bydt(Convert.ToInt32(strFY), fdate, tdate).Tables[0];
            if (dt.Rows.Count > 0)
            {
                Session["CNlist"] = dt;
                show(dt);
            }
            else
            {
                MessageBox("No Records Found");
            }
        }
        //show();
    }