public void fillData() { Session["DataFill"] = null; string Fromdate = txtFromDate.Text.Split('/')[1] + "/" + txtFromDate.Text.Split('/')[0] + "/" + txtFromDate.Text.Split('/')[2]; string Todate = txtToDate.Text.Split('/')[1] + "/" + txtToDate.Text.Split('/')[0] + "/" + txtToDate.Text.Split('/')[2]; Label lblAccount = null; TextBox txt = null; string accode = ""; foreach (GridViewRow row in grdTEmpData.Rows) { lblAccount = (Label)row.FindControl("lblCode"); txt = (TextBox)row.FindControl("txtIntRate"); accode = accode + lblAccount.Text.Trim() + "-" + txt.Text.Trim() + ","; } if (Session["DataFill"] == null) { Session["DataFill"] = LoanPartyMaster.Report_LoanInterest(accode, Convert.ToDateTime(Fromdate), Convert.ToDateTime(Todate), Convert.ToInt32(strFY), txtDays.Text.Trim(), "LG02").Tables[0]; } ReportDocument crystalReport = new ReportDocument(); crystalReport.Load(Server.MapPath("Report/interestCalc.rpt")); crystalReport.SetDataSource((DataTable)Session["DataFill"]); if (grdTEmpData.Rows.Count > 0) { crtIntrest.ReportSource = crystalReport; } }
public void ShowDetails(int getnew) { string Bookcode = txtbkcod.Text.ToString().Split(':')[0].Trim(); if (getnew == 1) { Session["StockLedger"] = null; } DataSet ds = new DataSet(); if (Session["StockLedger"] == null) { Session["StockLedger"] = LoanPartyMaster.Idv_Chetana_Stock_Ledger_Report(Bookcode, Convert.ToDateTime(txtFromDate.Text.Split('/')[1] + "/" + txtFromDate.Text.Split('/')[0] + "/" + txtFromDate.Text.Split('/')[2]), Convert.ToDateTime(txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2]), Convert.ToInt32(strFY)); } //DataSet ds2 = new DataSet(); // ds2 = Idv.Chetana.BAL.Specimen.Idv_Chetana_Get_CustomerDetailsForReport(Convert.ToInt32(ddlCustmore.SelectedValue.ToString())); ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("Report/StockLedger.rpt")); rd.Database.Tables[0].SetDataSource(((DataSet)Session["StockLedger"]).Tables[0]); // rd.Database.Tables[1].SetDataSource(dv2); //rd.SetDataSource(ds); crtStLedger.ReportSource = rd; }
public void ShowDetails(int getnew) { if (getnew == 1) { Session["DataFillAging"] = null; } DataSet ds = new DataSet(); if (Session["DataFillAging"] == null) { Session["DataFillAging"] = LoanPartyMaster.Idv_Chetana_Stock_Aging_Report( // (txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2]), Convert.ToDateTime(txtFromDate.Text.Split('/')[1] + "/" + txtFromDate.Text.Split('/')[0] + "/" + txtFromDate.Text.Split('/')[2]), Convert.ToDateTime(txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2]), Convert.ToInt32(strFY), ""); } //DataSet ds2 = new DataSet(); // ds2 = Idv.Chetana.BAL.Specimen.Idv_Chetana_Get_CustomerDetailsForReport(Convert.ToInt32(ddlCustmore.SelectedValue.ToString())); ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("~/Report/StockAgeingReport.rpt")); rd.Database.Tables[0].SetDataSource(((DataSet)Session["DataFillAging"]).Tables[0]); // rd.Database.Tables[1].SetDataSource(dv2); //rd.SetDataSource(ds); crtAgging.ReportSource = rd; }
protected void btnSave_Click(object sender, EventArgs e) { string Irt = TxtIRate.Text; LoanPartyMaster objLP = new LoanPartyMaster(); objLP.PartyID = Convert.ToInt32(LblPartyID.Text); objLP.PartyCode = TxtPartyCode.Text.Trim(); objLP.PartyName = TxtPartyName.Text.Trim(); objLP.Address = TxtAddress.Text.Trim(); objLP.Zip = TxtZip.Text.Trim(); objLP.CityID = Convert.ToInt32(DDLCity.SelectedValue.ToString()); objLP.Phone1 = TxtPhone1.Text.Trim(); objLP.Phone2 = TxtPhone2.Text.Trim(); objLP.LoanReceivedGiven = RdRG.Text.Trim(); objLP.EmailID = TxtEmailID.Text.Trim(); objLP.InterestRate = Convert.ToInt32(Irt); objLP.CreditLimit = Convert.ToDecimal(TxtCreditLimit.Text.Trim()); objLP.CreditDays = TxtCreditDays.Text.Trim(); objLP.IsActive = ChekActive.Checked; if (LblPartyID.Text == "0") { objLP.Save(); MessageBox("Record saved successfully"); BindGvLoanParty(); PnlAddLoanParty.Visible = true; PnlLoanPartyDetails.Visible = false; } else if (LblPartyID.Text != "0" || LblPartyID.Text != "") { objLP.Save(); MessageBox("Record updated successfully"); BindGvLoanParty(); PnlAddLoanParty.Visible = false; PnlLoanPartyDetails.Visible = true; filter.Visible = false; } try { TxtPartyCode.Text = ""; TxtPartyName.Text = ""; TxtAddress.Text = ""; TxtZip.Text = ""; DDLState.SelectedValue = null; DDLCity.Enabled = false; TxtPhone1.Text = ""; TxtPhone2.Text = ""; RdRG.Text = ""; TxtEmailID.Text = ""; TxtIRate.Text = ""; TxtCreditLimit.Text = ""; TxtCreditDays.Text = ""; ChekActive.Checked = false; } catch { } }
public void ShowDetails(int getnew) { if (getnew == 1) { Session["DataFillAging"] = null; } string CustCode = ""; string Zone = "0"; if (DDLSuperZone.SelectedIndex == 0) { CustCode = "2"; } else if (DDLZone.SelectedIndex != 0) { CustCode = "1"; Zone = DDLZone.SelectedValue.ToString(); } DataSet ds = new DataSet(); if (Session["DataFillAging"] == null) { ds = LoanPartyMaster.Idv_Chetana_Customer_Aging_Report(Convert.ToInt32(Zone), // (txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2]), "01/04/2012", (txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2]), Convert.ToInt32(strFY), CustCode); DataView dv = new DataView(ds.Tables[0]); if (txtFromAmount.Text.Trim() == "" && txtToAmount.Text.Trim() == "") { } else { dv.RowFilter = " Total >=" + Convert.ToInt32(txtFromAmount.Text.Trim()) + " AND Total <=" + Convert.ToInt32(txtToAmount.Text.Trim()); } //dv.RowFilter = " Total >=" + Convert.ToInt32(txtFromAmount.Text.Trim()) + " AND Total <=" + Convert.ToInt32(txtToAmount.Text.Trim()); Session["DataFillAging"] = dv.ToTable(); } //DataSet ds2 = new DataSet(); // ds2 = Idv.Chetana.BAL.Specimen.Idv_Chetana_Get_CustomerDetailsForReport(Convert.ToInt32(ddlCustmore.SelectedValue.ToString())); ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("~/Report/AgingReport.rpt")); rd.Database.Tables[0].SetDataSource(((DataTable)Session["DataFillAging"])); // rd.Database.Tables[1].SetDataSource(dv2); //rd.SetDataSource(ds); crtAgging.ReportSource = rd; }
public void ShowDetails(int Showata) { DataSet ds = new DataSet(); if (RdbtnSelect.SelectedValue == "Commission_Report") { if (Showata == 1) { Session["DataFillCommission"] = null; } if (Session["DataFillCommission"] == null) { ds = LoanPartyMaster.Report_Commision(Convert.ToInt32(DDLSuperZone.SelectedValue.ToString()), Convert.ToInt32(DDLZone.SelectedValue.ToString()), (txtFrom.Text.Split('/')[1] + "/" + txtFrom.Text.Split('/')[0] + "/" + txtFrom.Text.Split('/')[2]), (txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2]), Convert.ToInt32(strFY)); Session["DataFillCommission"] = ds; } ds = (DataSet)Session["DataFillCommission"]; //DataSet ds2 = new DataSet(); //ds2 = Idv.Chetana.BAL.Specimen.Idv_Chetana_Get_CustomerDetailsForReport(Convert.ToInt32(ddlCustmore.SelectedValue.ToString())); ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("~/Report/CommissionReport.rpt")); //if (ds.Tables[1].Rows.Count > 0) //{ rd.Database.Tables[0].SetDataSource(ds.Tables[0]); //rd.Database.Tables[1].SetDataSource(ds.Tables[1]); //rd.Database.Tables[1].SetDataSource(dv2); //rd.SetDataSource(ds); //} //else //{ // if (Showata == 1) // { // MessageBox("Target yet not set to selected Zone"); // } //} CustomerReportView.ReportSource = rd; } else { int szone = 0; if (DDLSuperZone.SelectedIndex == 0) { szone = 0; } else { szone = Convert.ToInt32(DDLSuperZone.SelectedValue.ToString()); } ds = OtherClass.Idv_Chetana_Report_Comm(szone, 0, (txtFrom.Text.Split('/')[1] + "/" + txtFrom.Text.Split('/')[0] + "/" + txtFrom.Text.Split('/')[2]), (txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2]), Convert.ToInt32(strFY)); ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("~/Report/CommissionReport_Summary.rpt")); if (ds.Tables[0].Rows.Count > 0) { rd.SetDataSource(ds.Tables[0]); rd.SetParameterValue("FDate", txtFrom.Text.Split('/')[1] + "/" + txtFrom.Text.Split('/')[0] + "/" + txtFrom.Text.Split('/')[2]); rd.SetParameterValue("TDate", txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2]); } else { if (Showata == 1) { MessageBox("Target yet not set to selected Zone"); } } CustomerReportView.ReportSource = rd; } }
public void BindGvLoanParty() { GrdLoanParty.DataSource = LoanPartyMaster.GetLoanPartyMaster(); GrdLoanParty.DataBind(); }