public void checkMonth() { int cMonth = Convert.ToInt32(ddlCurrentMonth.SelectedValue); int fMonth = Convert.ToInt32(ddlFirstMonth.SelectedValue); int sMonth = Convert.ToInt32(ddlSecondMonth.SelectedValue); if (ddlSelectType.SelectedValue == "Multiple") { bool chk = bll.ChkMonth(cMonth, fMonth); if (chk == false) { lblMessage.Visible = true; lblMessage.Text = "* please choose again......"; } else { List<sp_CurrMonthPurchase_Result> cList = bll.CurrMonthPurchase(fMonth, cMonth); ReportDocument report = new TrendForPurchasedItems(); report.SetDataSource(cList); rptPurchaseItemView.ReportSource = report; rptPurchaseItemView.RefreshReport(); lblMessage.Visible = false; } } else { //bool chk = bll.ChkMonth(fMonth, sMonth); //if (chk == false) //{ // lblMessage.Visible = true; // lblMessage.Text = "* please choose again......"; //} //else //{ int fmYear = bll.GetYear(cMonth, fMonth); int smYear = bll.GetYear(cMonth, sMonth); IList cList = bll.PurchaseCatByThreeMonth(cMonth, fMonth, sMonth, fmYear, smYear); if (cList.Count <= 0) { lblMessages.Visible = true; lblMessages.Text = "No Data Found In One or More Months"; } else { ReportDocument report = new TrendForPurchasedItems(); report.SetDataSource(cList); rptPurchaseItemView.ReportSource = report; rptPurchaseItemView.RefreshReport(); lblMessage.Visible = false; lblMessages.Visible = false; } //} } }
public void checkMonth() { int cMonth = Convert.ToInt32(ddlCurrentMonth.SelectedValue); int pMonth = Convert.ToInt32(ddlPastFirstMonth.SelectedValue); bool chk = bll.ChkMonth(cMonth, pMonth); if (chk == false) { lblMessage.Visible = true; lblMessage.Text = "* please choose again......"; } else { List<sp_CurrMonthPurchase_Result> cList = bll.CurrMonthPurchase(pMonth, cMonth); ReportDocument report = new TrendForPurchasedItems(); report.SetDataSource(cList); rptPurchaseItemView.ReportSource = report; rptPurchaseItemView.RefreshReport(); lblMessage.Visible = false; } }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { TrendForPurchasedItems rpt = new TrendForPurchasedItems(); rpt.Site = this.Site; return rpt; }