public void CreateRpt() { int cMonth = Convert.ToInt32(ddlCurrentMonth.SelectedValue); int fMonth = Convert.ToInt32(ddlFirstMonth.SelectedValue); int sMonth = Convert.ToInt32(ddlSecondMonth.SelectedValue); string code = ddlStockItem.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_CurrMonthInfo_Result> list = bll.DeptItemLst(code, cMonth, fMonth); ReportDocument report = new TrendForEachItem(); report.SetDataSource(list); rptEachItemView.ReportSource = report; rptEachItemView.RefreshReport(); lblMessage.Visible = false; } } else { int fmYear = bll.GetYear(cMonth, fMonth); int smYear = bll.GetYear(cMonth, sMonth); IList list = bll.DeptItemLstByThreeMonths(code, cMonth, fMonth,sMonth, fmYear, smYear); ReportDocument report = new TrendForEachItem(); report.SetDataSource(list); rptEachItemView.ReportSource = report; rptEachItemView.RefreshReport(); lblMessage.Visible = false; } }
public void CreateRpt() { int cMonth = Convert.ToInt32(ddlCurrentMonth.SelectedValue); int pMonth = Convert.ToInt32(ddlPastFirstMonth.SelectedValue); string code = ddlStockItem.SelectedValue; bool chk = bll.ChkMonth(cMonth, pMonth); if (chk == false) { lblMessage.Visible = true; lblMessage.Text = "* please choose again......"; } else { List<sp_CurrMonthInfo_Result> list = bll.DeptItemLst(code, cMonth, pMonth); ReportDocument report = new TrendForEachItem(); report.SetDataSource(list); rptEachItemView.ReportSource = report; rptEachItemView.RefreshReport(); lblMessage.Visible = false; } }