hello ,
I am finish with this Calculate column total in GridView footer using C# in ASP.Net total
and i want add this dropdown like this Filter GridView based on Year in DropDownList in ASP.Net
how about year because when i try select year nothing in database
my date formating like yyyy/MM/dd -->> @datestart datetime = NULL
USE [kankon]
GO
/****** Object: StoredProcedure [dbo].[GetDetails] Script Date: 8/24/2020 4:51:15 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[GetDetails]
@id INT = NULL
,@idnamev nvarchar(MAX) = NULL
,@namevacation nvarchar(MAX) = NULL
,@idcivilv nvarchar(MAX) = NULL
,@infovacation nvarchar(MAX) = NULL
,@datestart datetime = NULL
,@dateend datetime = NULL
,@vacationdata datetime = NULL
,@el3malv nvarchar(MAX) = NULL
,@datesp10 nvarchar(MAX) = NULL
,@eldarajah nvarchar(MAX) = NULL
,@totalva nvarchar(MAX) = NULL
,@jop nvarchar(MAX) = NULL
,@name nvarchar(MAX) = NULL
,@ContentType nvarchar(MAX) = NULL
,@backupmyfile varbinary(MAX) = NULL
AS
BEGIN
SELECT Id, idnamev, namevacation, idcivilv, infovacation, datestart, dateend,vacationdata,el3malv,datesp10,eldarajah,totalva,jop,name,ContentType,backupmyfile
FROM Table_vacation
WHERE YEAR(datestart) = YEAR(GETDATE())
AND (datestart = @datestart OR ISNULL(@datestart,'') = '')
AND (namevacation = @namevacation OR ISNULL(@namevacation,'') = '')
END