Maybe, for simplicities sake, you should just stick to informing the user that the date they picked is invalid. You seem very new to this, and adding complexity like this could well be beyond you right now - unfortunately, I don't have the time to write a fully working sample for you to demonstrate how this all hangs together.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
So the user can select2 different dates, a start date and an end date from2 calendars, when they click 'add' the dates between&including the dates selected will be added to the DB, each date as a separate record.
This works fine however I dont want weekends to be added to the DB.
Iv updated the UI of datepicker http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerCustomCellRender.html but if a user selects fri-mon for example fri,sat,sun and mon will be added to the db Iv tried to only run the code if datyofweek isnot saturday or sunday
public ActionResult listHolidays(Holiday holiday, int? PersonId, string HolidayDate, string endDate)
DateTime startDates = Convert.ToDateTime(HolidayDate),
endDates = Convert.ToDateTime(endDate);
while (startDates <= endDates)
if (startDates.DayOfWeek != DayOfWeek.Saturday || startDates.DayOfWeek != DayOfWeek.Sunday)
Holiday holiday1 = new Holiday();
holiday1.PersonId = PersonId.Value;
holiday1.HolidayDate = startDates;
//say start date is 10. AddDays(1) will make it 11 then return it to startDates in 'startDates' = startdates,
//but doesnt chage the value of startdates = 'startdates'
// startDates = startDates.AddDays(1);
startDates = startDates.AddDays(1);
I have created a windows service, I want to deploy it on the server. Can anybody please help me in deploying it. When I googled for it, I found that I have to have project installer file in my project.
What is project installer file, how should I write it to deploy my windows service. I am new to this windows service field, any kind of help, code snippet, or link would be very helpful.