TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
piu bhosale
NA
31
894
drpdwnlist of financial year fetch records in html report
Feb 6 2020 12:09 AM
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.
Reply
Answers (
1
)
Running an oracle stored procedure in c#
Migration from .net framework 3.5 to .net core 3.1