public void bindData() { string Fromdate1 = txtdate.Text.Split('/')[1].ToString() + "/" + txtdate.Text.Split('/')[0].ToString() + "/" + txtdate.Text.Split('/')[2].ToString(); string Todate1 = txttodate.Text.Split('/')[1].ToString() + "/" + txttodate.Text.Split('/')[0].ToString() + "/" + txttodate.Text.Split('/')[2].ToString(); //string Fromdate1 = txtdate.Text.Split('/')[1].ToString() + "/" + txtdate.Text.Split('/')[0].ToString() + "/" + txtdate.Text.Split('/')[2].ToString(); DateTime Fromdate = Convert.ToDateTime(Fromdate1); // string Todate1 = txttodate.Text.Split('/')[1].ToString() + "/" + txttodate.Text.Split('/')[0].ToString() + "/" + txttodate.Text.Split('/')[2].ToString(); DateTime Todate = Convert.ToDateTime(Todate1); DataTable dt = new DataTable(); dt = Cheque_CashDetails.Get_ChequeChashDoCancel(Fromdate, Todate).Tables[0]; lblmessage.Text = ""; if (dt.Rows.Count != 0) { GrdViewChequedate.DataSource = dt; GrdViewChequedate.DataBind(); // pnlchequedate.Visible = true; GrdViewChequedate.Visible = true; } else { message("No such ChequeDate"); GrdViewChequedate.Visible = false; txtdate.Focus(); } }
public void bindData() { string Fromdate = txtdate.Text.Split('/')[1].ToString() + "/" + txtdate.Text.Split('/')[0].ToString() + "/" + txtdate.Text.Split('/')[2].ToString(); string Todate = txttodate.Text.Split('/')[1].ToString() + "/" + txttodate.Text.Split('/')[0].ToString() + "/" + txttodate.Text.Split('/')[2].ToString(); //string date = txtdate.Text.Split('/')[0].ToString() + "/" + txtdate.Text.Split('/')[1].ToString() + "/" + txtdate.Text.Split('/')[2].ToString(); // ChequeDate = Convert.ToString(Fromdate); DataTable dt = new DataTable(); dt = Cheque_CashDetails.Get_ChequeChashReport(Fromdate, Todate).Tables[0]; lblmessage.Text = ""; if (dt.Rows.Count != 0) { GrdViewChequedate.DataSource = dt; GrdViewChequedate.DataBind(); minusAmt = Convert.ToDecimal(dt.Rows[0]["Amount"].ToString()); lblminusamt.Text = string.Format("{0:0.00}", Convert.ToDecimal(dt.Rows[0]["Amount"].ToString())); pnlchequedate.Visible = true; GrdViewChequedate.Visible = true; } else { if (check != "save") { message("No such ChequeDate"); } GrdViewChequedate.Visible = false; txtdate.Focus(); } }