Help needed with building a Scheduling logic represented using DataGrid.
-
Hi, I'm working on a page that generates a schedule for each month. The schedule is viewed using a DataGrid and I intend to build the schedule using a DataSet with a table adding rows to it sequentially for each day (The values in the rows are calculated based upon Business rules). I build this schedule sequentially like...I'm represting a pseudo code kinda code here. DataSet dtBPSchedule = new DataSet(). DataTable dtScheduler = new DataTable(); dtBPSchedule.Tables.Add(dtScheduler); Foreach day in CurrentMonth.Days { get the julian day of the day get the day of week of the current day. check whether day is a holiday. DataRow drBPRow = new DataRow(). Add all the column values based on rules into this Row and next Add the row into the table. etc etc... } dgBPSchedule.DataSource = dtBPSchedule.Tables["dtScheduler"]; dgBPSchedule.DataBind(); I wanted to use a Calendar web server control (by hiding it) to build this kinda logic but not sure whether this could be used or not. I'm sure someone wud have worked on this kinda stuff before and would appreciate if you could throw some light on this. Simply putting, I want to use the Calendar as a Class with properties Month and Days. Days should be something like a collection allowing the looping logic I specified above.I've been working on this almost for the whole day and got no where near to understanding how to do this. Please, I would greatly appreciate if I can get some help with this. Thanks a lot. ~~~~~~~~~~~~~~~~~~~~~~~~ Shravan Addaypally .NET Apps Developer BellSouth Billing Inc. Birmingham, AL 35205 ~~~~~~~~~~~~~~~~~~~~~~~~
-
Hi, I'm working on a page that generates a schedule for each month. The schedule is viewed using a DataGrid and I intend to build the schedule using a DataSet with a table adding rows to it sequentially for each day (The values in the rows are calculated based upon Business rules). I build this schedule sequentially like...I'm represting a pseudo code kinda code here. DataSet dtBPSchedule = new DataSet(). DataTable dtScheduler = new DataTable(); dtBPSchedule.Tables.Add(dtScheduler); Foreach day in CurrentMonth.Days { get the julian day of the day get the day of week of the current day. check whether day is a holiday. DataRow drBPRow = new DataRow(). Add all the column values based on rules into this Row and next Add the row into the table. etc etc... } dgBPSchedule.DataSource = dtBPSchedule.Tables["dtScheduler"]; dgBPSchedule.DataBind(); I wanted to use a Calendar web server control (by hiding it) to build this kinda logic but not sure whether this could be used or not. I'm sure someone wud have worked on this kinda stuff before and would appreciate if you could throw some light on this. Simply putting, I want to use the Calendar as a Class with properties Month and Days. Days should be something like a collection allowing the looping logic I specified above.I've been working on this almost for the whole day and got no where near to understanding how to do this. Please, I would greatly appreciate if I can get some help with this. Thanks a lot. ~~~~~~~~~~~~~~~~~~~~~~~~ Shravan Addaypally .NET Apps Developer BellSouth Billing Inc. Birmingham, AL 35205 ~~~~~~~~~~~~~~~~~~~~~~~~
hi check this out ... http://www.aspnet-solutions.com/chapter\_5.htm Prakash Kalakoti