Jyoti Jodha

Jyoti Jodha

  • NA
  • 1.7k
  • 408.5k

how to show all Records Datewise in windows application c#

May 31 2017 3:14 AM
how to show all Records Datewise in windows application c#
if double click on month
then open new form and show date wise all records in windows application c#
 
 
Month Query is
 
Select ROW_NUMBER() over(ORDER BY DATENAME(MONTH, convert(datetime,Date,105))+'-'+DATENAME(year, convert(datetime,Date,105)) ASC) as ID,
DATENAME(MONTH, convert(datetime,Date,105))+'-'+DATENAME(year, convert(datetime,Date,105)) as Month,
sum(case when Amount='' then 0 else cast(isnull(Amount,0) as numeric(18,2)) end) as Amount,
sum(case when Addcost='' then 0 else cast(isnull(Addcost,0) as numeric(18,2)) end) as Addcost ,
sum(case when Discount='' then 0 else cast(isnull(Discount,0) as numeric(18,2)) end) as Discount ,
sum(case when Tax_Amount='' then 0 else cast(isnull(Tax_Amount,0) as numeric(18,2)) end) as Tax_Amount,
sum(case when Total_Amount=''then 0 else cast(isnull(Total_Amount,0) as numeric(18,2)) end)as Total_Amount from MainBillForm
where Sno=0 group by DATENAME(MONTH, convert(datetime,Date,105))+'-'+DATENAME(year, convert(datetime,Date,105)),
Year(Convert(datetime,Date,105)),month(Convert(datetime,Date,105))
order by Year(Convert(datetime,Date,105)),month(Convert(datetime,Date,105))
 
 
 
 
 
 
 

Answers (1)