I want to display "time in,time out & status" columns into Calendar.... This is the Back-Code for calendar:
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e) { DataSet ds = GetData(); //string link = "private DataSet GetData() { SqlConnection myConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["conString"].ConnectionString); SqlDataAdapter ad = new SqlDataAdapter("CalendarAttendance", myConnection); DataSet ds = new DataSet(); ad.Fill(ds); return ds; }This is the stored Procedure:"CalendarAttendance" ALTER PROCEDURE [dbo].[CalendarAttendance] @Employeeid int,@status varchar(5), @transaction_date datetime, @actual_time_in datetime, @actual_time_out datetime
AS BEGIN SET NOCOUNT ON; SELECT actual_time_in=@actual_time_in, actual_time_out=@actual_time_out, status=@status FROM tblschedule where Employeeid = @Employeeid ENDIm getting an error : Procedure or function 'CalendarAttendance' expects parameter '@Employeeid', which was not supplied. I want the Calendar to display time_in,time_out & status according to respective days and of that employee who has logged in. Plz correct the code & Stored Procedure wherever necessary..
ali tuncerPosted May 6, 2016, 4:26 AM
First thing, you need to make sureyouget desired data from stored procedure, I don't have your database, so you need tofindout. That's why you need to check if your dataset has values in it..You can put a breakpoint..
Viraj KawthankarPosted May 6, 2016, 3:57 AM
Viraj KawthankarPosted May 6, 2016, 1:39 AM
ali tuncerPosted May 5, 2016, 8:06 AM
Viraj KawthankarPosted May 5, 2016, 7:25 AM
ali tuncerPosted May 5, 2016, 5:45 AM
Do you have data in your dataset (ds) ?
Viraj KawthankarPosted May 5, 2016, 5:24 AM
" + "OUT:" + row["actual_time_out"] as String + "
" + "WR_HRS:" + row["status"] as String + "" + "
";
ali tuncerPosted May 4, 2016, 10:51 AM
FROM tblschedule where Employeeid = @Employeeid
da.SelectCommand.CommandType = CommandType.StoredProcedure;
da.SelectCommand.Parameters.Add("@Employeeid", SqlDbType.Int).Value = 1 //here you pass employee id
DataSet ds = new DataSet();
da.Fill(ds);
return ds;