piu bhosale

piu bhosale

  • NA
  • 31
  • 780

drpdwnlist of financial year fetch records in html report

Feb 6 2020 12:09 AM
  1. if (!Page.IsPostBack)  
  2. {  
  3. var data = (from d in ldc.SetFinancialYearTBs  
  4. where d.IsActive == true && d.ParentPanomtechServiceID == Convert.ToString(Session["PPServiceID"])  
  5. select new { d.PkFY, d.FY }).ToList();  
  6. drpFY.DataSource = data;  
  7. drpFY.DataTextField = "FY";  
  8. drpFY.DataValueField = "PkFY";  
  9. drpFY.DataBind();  
  10. drpFY.Items.Insert(0, new System.Web.UI.WebControls.ListItem("Select Year""0"));  
  11. var CurFy = ldc.SetFinancialYearTBs.Where(d => d.IsActive == true && d.ParentPanomtechServiceID == Convert.ToString(Session["PPServiceID"]) && d.IsCurrentFY == true).FirstOrDefault();  
  12. if (CurFy != null)  
  13. {  
  14. int Index = drpFY.Items.IndexOf(drpFY.Items.FindByValue(CurFy.PkFY));  
  15. drpFY.SelectedIndex = Index;  
  16. }  
  17. public void HtmlReport()  
  18. {  
  19. string strfromdate = "01-Apr-"+drpFY.SelectedItem.Text.Split('-')[0];  
  20. string strTodate = "31-Mar-" + drpFY.SelectedItem.Text.Split('-')[1];  
  21. string stryear = drpFY.SelectedItem.Text.Split('-')[1];  
  22. var daa = (from d in ldc1.AccountGroupMasterTBs  
  23. join l in ldc1.LedgerTBs on d.GroupID equals l.Under  
  24. where d.Pan_ID == "pancpn"  
  25. && d.IsPrimary == true && d.NatureofGroup == "Liabilities"  
  26. orderby d.Name ascending  
  27. select new { d.Name,l.Open_Bal_Amount , l.Open_Bal_Date }).ToList();  
  28. daa = daa.Where(d => (DateTime.ParseExact(d.Open_Bal_Date, "dd-MMM-yyyy", CultureInfo.InvariantCulture) >= DateTime.ParseExact(strfromdate, "dd-MMM-yyyy", CultureInfo.InvariantCulture))  
  29. && (DateTime.ParseExact(d.Open_Bal_Date, "dd-MMM-yyyy", CultureInfo.InvariantCulture) <= DateTime.ParseExact(strTodate, "dd-MMM-yyyy", CultureInfo.InvariantCulture))  
  30. ).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.

Answers (1)