public void BindData() { if (txtFromDate.Text != "" && txtToDate.Text != "") { string FromDate1 = (txtFromDate.Text.Split('/')[1] + "/" + txtFromDate.Text.Split('/')[0] + "/" + txtFromDate.Text.Split('/')[2]); string ToDate1 = (txtToDate.Text.Split('/')[1] + "/" + txtToDate.Text.Split('/')[0] + "/" + txtToDate.Text.Split('/')[2]); DateTime FromDate = Convert.ToDateTime(FromDate1); DateTime ToDate = Convert.ToDateTime(ToDate1); string srdSorD = "transfer"; DataSet ds = new DataSet(); { ds = BankReceiptPayment.idv_Chetana_Get_Trial_Balance(FromDate, ToDate, srdSorD, Convert.ToInt32(strFY), string.Empty); if (ds.Tables[0].Rows.Count != 0) { DataView dv = new DataView(ds.Tables[0]); ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("Report/TrialBalanceReport.rpt")); rd.Database.Tables[0].SetDataSource(dv); rd.SetParameterValue("IsPrint", Convert.ToBoolean(true)); cristTrialBalance.ReportSource = rd; btntransfer.Visible = true; } else { MessageBox("No Record Found"); } } } }
public void BindData() { if (txtFromDate.Text != "" && txtToDate.Text != "") { string FromDate1 = (txtFromDate.Text.Split('/')[1] + "/" + txtFromDate.Text.Split('/')[0] + "/" + txtFromDate.Text.Split('/')[2]); string ToDate1 = (txtToDate.Text.Split('/')[1] + "/" + txtToDate.Text.Split('/')[0] + "/" + txtToDate.Text.Split('/')[2]); DateTime FromDate = Convert.ToDateTime(FromDate1); DateTime ToDate = Convert.ToDateTime(ToDate1); Isdebit = ddlDebitCredit.SelectedValue.ToString(); string srdSorD = DDLCustomer.SelectedValue + "@" + Isdebit; DataSet ds = new DataSet(); if (rdSorD.SelectedValue == "Detail") { ds = BankReceiptPayment.idv_Chetana_Get_Trial_Balance(FromDate, ToDate, srdSorD, Convert.ToInt32(strFY), txtGroup.Text.Trim().ToString()); if (ds.Tables[0].Rows.Count != 0) { DataView dv = new DataView(ds.Tables[0]); ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("Report/TrialBalanceReport.rpt")); rd.Database.Tables[0].SetDataSource(dv); rd.SetParameterValue("IsPrint", Convert.ToBoolean(IsPrint.Checked)); cristTrialBalance.ReportSource = rd; //btntransfer.Visible = true; } else { MessageBox("No Record Found"); } } else { ds = BankReceiptPayment.Idv_Chetana_Get_Trial_Balance_Summary(FromDate, ToDate, srdSorD, Convert.ToInt32(strFY), txtGroup.Text.Trim().ToString()); if (ds.Tables[0].Rows.Count != 0) { DataView dv = new DataView(ds.Tables[0]); ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("Report/TrialBalanceReport_Summary.rpt")); rd.Database.Tables[0].SetDataSource(dv); rd.SetParameterValue("IsPrint", Convert.ToBoolean(IsPrint.Checked)); // rd.SetParameterValue("IsDebit_Credit", Isdebit); cristTrialBalance.ReportSource = rd; // btntransfer.Visible = true; } else { MessageBox("No Record Found"); } } } }
public void Bind() { DataSet ds = new DataSet(); ds = BankReceiptPayment.idv_Chetana_Get_Trial_Balance(); gvTrileBlance.DataSource = ds; gvTrileBlance.DataBind(); gvTrileBlance.Visible = true; lblGrand.Visible = true; lblnetcredit.Visible = true; lblnetdebit.Visible = true; lblnetdebit.Text = string.Format("{0:0.00}", Convert.ToDecimal(ds.Tables[1].Rows[0]["Net_Debit"].ToString())); lblnetcredit.Text = string.Format("{0:0.00}", Convert.ToDecimal(ds.Tables[1].Rows[0]["Net_Credit"].ToString())); }