- if (!Page.IsPostBack)
- {
- var data = (from d in ldc.SetFinancialYearTBs
- where d.IsActive == true && d.ParentPanomtechServiceID == Convert.ToString(Session["PPServiceID"])
- select new { d.PkFY, d.FY }).ToList();
- drpFY.DataSource = data;
- drpFY.DataTextField = "FY";
- drpFY.DataValueField = "PkFY";
- drpFY.DataBind();
- drpFY.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Select Year", "0"));
- var CurFy = ldc.SetFinancialYearTBs.Where(d => d.IsActive == true && d.ParentPanomtechServiceID == Convert.ToString(Session["PPServiceID"]) && d.IsCurrentFY == true).FirstOrDefault();
- if (CurFy != null)
- {
- int Index = drpFY.Items.IndexOf(drpFY.Items.FindByValue(CurFy.PkFY));
- drpFY.SelectedIndex = Index;
- }
- public void HtmlReport()
- {
- string strfromdate = "01-Apr-"+drpFY.SelectedItem.Text.Split('-')[0];
- string strTodate = "31-Mar-" + drpFY.SelectedItem.Text.Split('-')[1];
- string stryear = drpFY.SelectedItem.Text.Split('-')[1];
- var daa = (from d in ldc1.AccountGroupMasterTBs
- join l in ldc1.LedgerTBs on d.GroupID equals l.Under
- where d.Pan_ID == "pancpn"
- && d.IsPrimary == true && d.NatureofGroup == "Liabilities"
- orderby d.Name ascending
- select new { d.Name,l.Open_Bal_Amount , l.Open_Bal_Date }).ToList();
- daa = daa.Where(d => (DateTime.ParseExact(d.Open_Bal_Date, "dd-MMM-yyyy", CultureInfo.InvariantCulture) >= DateTime.ParseExact(strfromdate, "dd-MMM-yyyy", CultureInfo.InvariantCulture))
- && (DateTime.ParseExact(d.Open_Bal_Date, "dd-MMM-yyyy", CultureInfo.InvariantCulture) <= DateTime.ParseExact(strTodate, "dd-MMM-yyyy", CultureInfo.InvariantCulture))
- ).ToList();
Please sir, i have dropdownlist of financial year 2017-2018 and 2019-2020. ok.
i want to fetch record of 2017-2018 in html report.