protected void WorkWeekGrid_OnInitNewRow(object sender, ASPxDataInitNewRowEventArgs e) { var workWeek = WorkWeek.GetTheMostRecentWorkWeek(); if (workWeek != null) { var startDate = workWeek.EndDate.AddDays(1); e.NewValues["StartDate"] = startDate; e.NewValues["EndDate"] = startDate.AddDays(6); e.NewValues["Caption"] = string.Format("{0}-ს", startDate.ToString("MMM dd, yyyy", CultureInfo.CreateSpecificCulture("ka-ge"))); } }
void CopyAsNewAction(int fromWorkWeekID) { var workWeek = WorkWeek.GetTheMostRecentWorkWeek(); if (workWeek == null) { return; } var startDate = workWeek.EndDate.AddDays(1); var enddate = startDate.AddDays(6); var caption = string.Format("{0}-ს კვირა", startDate.ToString("MMM dd, yyyy", CultureInfo.CreateSpecificCulture("ka-ge"))); var id = new WorkWeek().TPS_WorkWeeks(0, null, caption, startDate, enddate, true, fromWorkWeekID); Response.Redirect("HallsSchedule.aspx?weekid=" + id); }