private List <CalendarCellInfo> CreateCalendarCellInfoList_Calendar(PageCaller PG, string StrCellInfoList) { List <CalendarCellInfo> CalendarCellInfoList = new List <CalendarCellInfo>(); string[] ArStrDateShiftList = StrCellInfoList.Split(new char[] { '%' }); string TempArStrDateShiftListPart = string.Empty; foreach (string ArStrDateShiftListPart in ArStrDateShiftList) { if (ArStrDateShiftListPart != string.Empty && ArStrDateShiftListPart.Contains("SID")) { TempArStrDateShiftListPart = ArStrDateShiftListPart.Replace("SID=", string.Empty).Replace("M=", string.Empty).Replace("D=", string.Empty); string[] ArDateShift = TempArStrDateShiftListPart.Split(new char[] { '#' }); int month = int.Parse(ArDateShift[0]); int day = int.Parse(ArDateShift[1]); CalendarCellInfo calendarCellInfo = new CalendarCellInfo(); calendarCellInfo.Month = month; calendarCellInfo.Day = day; if (PG == PageCaller.WorkGroups) { decimal shiftID = decimal.Parse(ArDateShift[2]); calendarCellInfo.ShiftID = shiftID; } CalendarCellInfoList.Add(calendarCellInfo); } } return(CalendarCellInfoList); }
private void InitializePage_Calendar() { if (HttpContext.Current.Request.QueryString.AllKeys.Contains("PageCaller")) { PageCaller PG = (PageCaller)Enum.Parse(typeof(PageCaller), HttpContext.Current.Request.QueryString["PageCaller"]); switch (PG) { case PageCaller.WorkGroups: this.TlbCalendar_DialogCalendar.Items[1].Visible = true; this.TlbCalendar_DialogCalendar.Items[2].Visible = false; this.TlbCalendar_DialogCalendar.Items[3].Visible = false; this.lblTypes_DialogCalendar.Text = this.lblTypesInCalendar_Calendar.Text = GetLocalResourceObject("Shift").ToString(); break; case PageCaller.Holidays: this.TlbCalendar_DialogCalendar.Items[1].Visible = false; this.TlbCalendar_DialogCalendar.Items[2].Visible = true; this.TlbCalendar_DialogCalendar.Items[3].Visible = true; this.lblTypes_DialogCalendar.Text = lblTypesInCalendar_Calendar.Text = GetLocalResourceObject("State").ToString(); break; } this.FillCalData_Calendar((PageCaller)Enum.Parse(typeof(PageCaller), HttpContext.Current.Request.QueryString["PageCaller"].ToString()), (CalViewState)Enum.Parse(typeof(CalViewState), HttpContext.Current.Request.QueryString["CalViewState"].ToString()), decimal.Parse(HttpContext.Current.Request.QueryString["GroupID"]), int.Parse(HttpContext.Current.Request.QueryString["UIYear"])); this.Fill_cmbTypes_Calendar(PG); } }
public string[] UpdateCalendar_CalendarPage(string sender, string GroupID, string Year, string StrCellInfoList) { this.InitializeCulture(); PageCaller pageCaller = (PageCaller)Enum.Parse(typeof(PageCaller), this.StringBuilder.CreateString(sender)); decimal groupID = decimal.Parse(this.StringBuilder.CreateString(GroupID), CultureInfo.InvariantCulture); int year = int.Parse(this.StringBuilder.CreateString(Year), CultureInfo.InvariantCulture); IList <CalendarCellInfo> calendarCellInfoList = this.CreateCalendarCellInfoList_Calendar(pageCaller, this.StringBuilder.CreateString(StrCellInfoList)); string[] retMessage = new string[4]; try { bool IsUseByHoliday = false; AttackDefender.CSRFDefender(this.Page); switch (pageCaller) { case PageCaller.WorkGroups: // this.CalendarBusiness.SaveChanges(calendarCellInfoList, groupID, year); IsUseByHoliday = this.CalendarBusiness.UpdateCalendar(calendarCellInfoList, groupID, year); break; case PageCaller.Holidays: this.YearlyHolidaysBusiness.InsertCalendars(groupID, year, calendarCellInfoList); break; } retMessage[0] = GetLocalResourceObject("RetSuccessType").ToString(); retMessage[1] = GetLocalResourceObject("OperationComplete").ToString(); retMessage[2] = "success"; retMessage[3] = IsUseByHoliday.ToString(); return(retMessage); } catch (UIValidationExceptions ex) { retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIValidationExceptions, ex, retMessage); return(retMessage); } catch (UIBaseException ex) { retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIBaseException, ex, retMessage); return(retMessage); } catch (Exception ex) { retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.Exception, ex, retMessage); return(retMessage); } }
public string[] UpdatePeriodRepeat_CalendarPage(string sender, string Year, string GroupID, string StrCellInfoList, string FromMonth, string FromDay, string ToMonth, string ToDay, string StrHolidaysList) { string[] retMessage = new string[4]; try { AttackDefender.CSRFDefender(this.Page); PageCaller pageCaller = (PageCaller)Enum.Parse(typeof(PageCaller), this.StringBuilder.CreateString(sender)); int year = int.Parse(this.StringBuilder.CreateString(Year), CultureInfo.InvariantCulture); decimal groupID = decimal.Parse(this.StringBuilder.CreateString(GroupID), CultureInfo.InvariantCulture); IList <CalendarCellInfo> calendarCellInfoList = this.CreateCalendarCellInfoList_Calendar(pageCaller, this.StringBuilder.CreateString(StrCellInfoList)); int fromMonth = int.Parse(this.StringBuilder.CreateString(FromMonth), CultureInfo.InvariantCulture); int fromDay = int.Parse(this.StringBuilder.CreateString(FromDay), CultureInfo.InvariantCulture); int toMonth = int.Parse(this.StringBuilder.CreateString(ToMonth), CultureInfo.InvariantCulture); int toDay = int.Parse(this.StringBuilder.CreateString(ToDay), CultureInfo.InvariantCulture); IList <decimal> HolidaysList = this.CreateHolidaysList_Calendar(this.StringBuilder.CreateString(StrHolidaysList)); IList <CalendarCellInfo> PeriodRepeatList = this.CalendarBusiness.RepetitionPeriod(year, fromMonth, fromDay, toMonth, toDay, HolidaysList, calendarCellInfoList); Session.Add("PeriodRepeatList_Calendar", PeriodRepeatList); retMessage[0] = GetLocalResourceObject("RetSuccessType").ToString(); retMessage[1] = GetLocalResourceObject("OperationComplete").ToString(); retMessage[2] = "success"; return(retMessage); } catch (UIValidationExceptions ex) { retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIValidationExceptions, ex, retMessage); return(retMessage); } catch (UIBaseException ex) { retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIBaseException, ex, retMessage); return(retMessage); } catch (Exception ex) { retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.Exception, ex, retMessage); return(retMessage); } }
private void Fill_cmbTypes_Calendar(PageCaller PG) { string[] retMessage = new string[3]; JavaScriptSerializer jsSerializer = new JavaScriptSerializer(); try { switch (PG) { case PageCaller.WorkGroups: List <BaseType> BaseShiftList = new List <BaseType>(); int shiftCounter = 0; string cmbItemNoShiftText = GetLocalResourceObject("cmbItemNoShiftText").ToString(); string cmbItemNoShiftColor = "#FFFFFF"; ComboBoxItem cmbItemNoShift = new ComboBoxItem(cmbItemNoShiftText); cmbItemNoShift.Id = "0"; cmbItemNoShift.Value = cmbItemNoShiftColor; this.cmbTypes_DialogCalendar.Items.Add(cmbItemNoShift); this.CreateBaseList_Calendar(BaseShiftList, cmbItemNoShiftText, cmbItemNoShiftColor); shiftCounter++; IList <Shift> ShiftsList = this.CalendarBusiness.GetAllShifts(); foreach (Shift shiftItem in ShiftsList) { ComboBoxItem cmbItemShift = new ComboBoxItem(shiftItem.Name); cmbItemShift.Id = shiftItem.ID.ToString(); cmbItemShift.Value = shiftItem.Color; this.cmbTypes_DialogCalendar.Items.Add(cmbItemShift); if (shiftCounter < 10) { this.CreateBaseList_Calendar(BaseShiftList, shiftItem.Name, shiftItem.Color); shiftCounter++; } } this.hfBaseLists_Calendar.Value = jsSerializer.Serialize(BaseShiftList); break; case PageCaller.Holidays: List <BaseType> BaseStateList = new List <BaseType>(); string cmbItemNormalStateText = GetLocalResourceObject("cmbItemNormalStateText").ToString(); string cmbItemNormalStateColor = "#FFFFFF"; ComboBoxItem cmbItemNormalState = new ComboBoxItem(cmbItemNormalStateText); cmbItemNormalState.Id = "0"; cmbItemNormalState.Value = cmbItemNormalStateColor; this.cmbTypes_DialogCalendar.Items.Add(cmbItemNormalState); this.CreateBaseList_Calendar(BaseStateList, cmbItemNormalStateText, cmbItemNormalStateColor); string cmbItemHolidayStateText = GetLocalResourceObject("cmbItemHolidayStateText").ToString(); string cmbItemHolidayStateColor = "#FF0000"; ComboBoxItem cmbItemHolidayState = new ComboBoxItem(cmbItemHolidayStateText); cmbItemHolidayState.Id = "1"; cmbItemHolidayState.Value = cmbItemHolidayStateColor; this.cmbTypes_DialogCalendar.Items.Add(cmbItemHolidayState); this.CreateBaseList_Calendar(BaseStateList, cmbItemHolidayStateText, cmbItemHolidayStateColor); this.hfBaseLists_Calendar.Value = jsSerializer.Serialize(BaseStateList); break; } } catch (UIValidationExceptions ex) { retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIValidationExceptions, ex, retMessage); this.ErrorHiddenField_BasePanel_Calendar.Value = this.exceptionHandler.CreateErrorMessage(retMessage); } catch (UIBaseException ex) { retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIBaseException, ex, retMessage); this.ErrorHiddenField_BasePanel_Calendar.Value = this.exceptionHandler.CreateErrorMessage(retMessage); } catch (Exception ex) { retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.Exception, ex, retMessage); this.ErrorHiddenField_BasePanel_Calendar.Value = this.exceptionHandler.CreateErrorMessage(retMessage); } }
private void FillCalData_Calendar(PageCaller PG, CalViewState CVS, decimal groupID, int year) { string[] retMessage = new string[3]; string StrCalDataList = string.Empty; List <CalDataView> CalDataViewList = new List <CalDataView>(); Dictionary <int, int> firstDayOfMonthDic = this.GetFirstDayOfMinth_Calendar(year); try { IList <CalendarCellInfo> CalendarCellInfoList = null; switch (PG) { case PageCaller.WorkGroups: switch (CVS) { case CalViewState.Normal: CalendarCellInfoList = this.CalendarBusiness.GetAll(groupID, year); break; case CalViewState.PeriodRepeat: if (Session["PeriodRepeatList_Calendar"] != null) { CalendarCellInfoList = (IList <CalendarCellInfo>)Session["PeriodRepeatList_Calendar"]; Session["PeriodRepeatList_Calendar"] = null; } break; } break; case PageCaller.Holidays: CalendarCellInfoList = this.YearlyHolidaysBusiness.GetCalendarList(year, groupID); break; } foreach (CalendarCellInfo calendarCellInfoItem in CalendarCellInfoList) { string strCalDataPart = string.Empty; switch (PG) { case PageCaller.WorkGroups: strCalDataPart = "#SID=" + calendarCellInfoItem.ShiftID.ToString(); break; case PageCaller.Holidays: strCalDataPart = "#SID=1"; break; } StrCalDataList += "M=" + calendarCellInfoItem.Month.ToString() + "#D=" + calendarCellInfoItem.Day.ToString() + strCalDataPart + "%"; Dictionary <string, int> PointerDic = this.GetColPointer_Calendar(calendarCellInfoItem.Day, firstDayOfMonthDic[calendarCellInfoItem.Month]); CalDataView calDataView = new CalDataView(); calDataView.M = calendarCellInfoItem.Month.ToString(); calDataView.CPointer = PointerDic["Cp"].ToString(); calDataView.RPointer = PointerDic["Rp"].ToString(); calDataView.Title = calendarCellInfoItem.Title; calDataView.SColor = calendarCellInfoItem.Color; CalDataViewList.Add(calDataView); } this.hfCalData_Calendar.Value = StrCalDataList; JavaScriptSerializer jsSerializer = new JavaScriptSerializer(); this.hfCalDataView_Calendar.Value = jsSerializer.Serialize(CalDataViewList); } catch (UIValidationExceptions ex) { retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIValidationExceptions, ex, retMessage); this.ErrorHiddenField_CalData_Calendar.Value = this.exceptionHandler.CreateErrorMessage(retMessage); } catch (UIBaseException ex) { retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIBaseException, ex, retMessage); this.ErrorHiddenField_CalData_Calendar.Value = this.exceptionHandler.CreateErrorMessage(retMessage); } catch (Exception ex) { retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.Exception, ex, retMessage); this.ErrorHiddenField_CalData_Calendar.Value = this.exceptionHandler.CreateErrorMessage(retMessage); } }
public string[] UpdatePhysician_DefinePhysiciansPage(string state, string requestCaller, string requestLoadState, string PhysiciansID, string FirstName, string LastName, string Proficiency, string MedicalAssociation, string Description, string Caller, string Target, string UserCaller) { this.InitializeCulture(); string[] retMessage = new string[4]; try { AttackDefender.CSRFDefender(this.Page); decimal PhysicianID = 0; decimal selectedPhysicianID = decimal.Parse(this.StringBuilder.CreateString(PhysiciansID), CultureInfo.InvariantCulture); FirstName = this.StringBuilder.CreateString(FirstName); LastName = this.StringBuilder.CreateString(LastName); Proficiency = this.StringBuilder.CreateString(Proficiency); MedicalAssociation = this.StringBuilder.CreateString(MedicalAssociation); Description = this.StringBuilder.CreateString(Description); UIActionType uam = (UIActionType)Enum.Parse(typeof(UIActionType), this.StringBuilder.CreateString(state).ToUpper()); RequestCaller RC = (RequestCaller)Enum.Parse(typeof(RequestCaller), this.StringBuilder.CreateString(requestCaller)); RequestLoadState RLS = (RequestLoadState)Enum.Parse(typeof(RequestLoadState), this.StringBuilder.CreateString(requestLoadState)); RequestTarget target = (RequestTarget)Enum.Parse(typeof(RequestTarget), this.StringBuilder.CreateString(Target)); PageCaller caller = (PageCaller)Enum.Parse(typeof(PageCaller), this.StringBuilder.CreateString(Caller)); UserCallerEnum userCaller = (UserCallerEnum)Enum.Parse(typeof(UserCallerEnum), this.StringBuilder.CreateString(UserCaller)); Doctor physician = new Doctor(); physician.ID = selectedPhysicianID; if (uam != UIActionType.DELETE) { physician.FirstName = FirstName; physician.LastName = LastName; physician.Takhasos = Proficiency; physician.Nezampezaeshki = MedicalAssociation; physician.Description = Description; } switch (uam) { case UIActionType.ADD: switch (target) { case RequestTarget.Hourly: switch (caller) { case PageCaller.RequestRegister: switch (userCaller) { case UserCallerEnum.NormalUser: PhysicianID = this.PhysiciansBusiness.InsertPhysician_onRequestHourly_onRequestRegister(physician, uam); break; case UserCallerEnum.Operator: PhysicianID = this.PhysiciansBusiness.InsertPhysician_onRequestHourly_onRequestRegisterByOperator(physician, uam); break; case UserCallerEnum.OperatorPermit: PhysicianID = this.PhysiciansBusiness.InsertPhysician_onRequestHourly_onRequestRegisterByOperatorPermit(physician, uam); break; } break; case PageCaller.DailyRequestOnAbsence: break; case PageCaller.HourlyRequestOnAbsence: switch (RC) { case RequestCaller.Grid: switch (RLS) { case RequestLoadState.Personnel: PhysicianID = this.PhysiciansBusiness.InsertPhysician_onHourlyRequest_onPersonnel_onGridSchema(physician, uam); break; case RequestLoadState.Manager: PhysicianID = this.PhysiciansBusiness.InsertPhysician_onHourlyRequest_onManager_onGridSchema(physician, uam); break; case RequestLoadState.Operator: PhysicianID = this.PhysiciansBusiness.InsertPhysician_onHourlyRequest_onOperator_onGridSchema(physician, uam); break; case RequestLoadState.Integral: break; default: break; } break; case RequestCaller.GanttChart: switch (RLS) { case RequestLoadState.Personnel: PhysicianID = this.PhysiciansBusiness.InsertPhysician_onHourlyRequest_onPersonnel_onGanttChartSchema(physician, uam); break; case RequestLoadState.Manager: PhysicianID = this.PhysiciansBusiness.InsertPhysician_onHourlyRequest_onManager_onGanttChartSchema(physician, uam); break; case RequestLoadState.Operator: PhysicianID = this.PhysiciansBusiness.InsertPhysician_onHourlyRequest_onOperator_onGanttChartSchema(physician, uam); break; case RequestLoadState.Integral: break; default: break; } break; case RequestCaller.RequestRegister: break; default: break; } break; } break; case RequestTarget.Daily: switch (caller) { case PageCaller.RequestRegister: switch (userCaller) { case UserCallerEnum.NormalUser: PhysicianID = this.PhysiciansBusiness.InsertPhysician_onRequestDaily_onRequestRegister(physician, uam); break; case UserCallerEnum.Operator: PhysicianID = this.PhysiciansBusiness.InsertPhysician_onRequestDaily_onRequestRegisterByOperator(physician, uam); break; case UserCallerEnum.OperatorPermit: PhysicianID = this.PhysiciansBusiness.InsertPhysician_onRequestDaily_onRequestRegisterByOperatorPermit(physician, uam); break; } break; case PageCaller.HourlyRequestOnAbsence: break; case PageCaller.DailyRequestOnAbsence: switch (RC) { case RequestCaller.Grid: switch (RLS) { case RequestLoadState.Personnel: PhysicianID = this.PhysiciansBusiness.InsertPhysician_onDailyRequest_onPersonnel_onGridSchema(physician, uam); break; case RequestLoadState.Manager: PhysicianID = this.PhysiciansBusiness.InsertPhysician_onDailyRequest_onManager_onGridSchema(physician, uam); break; case RequestLoadState.Operator: PhysicianID = this.PhysiciansBusiness.InsertPhysician_onDailyRequest_onOperator_onGridSchema(physician, uam); break; case RequestLoadState.Integral: break; default: break; } break; case RequestCaller.GanttChart: switch (RLS) { case RequestLoadState.Personnel: PhysicianID = this.PhysiciansBusiness.InsertPhysician_onDailyRequest_onPersonnel_onGanttChartSchema(physician, uam); break; case RequestLoadState.Manager: PhysicianID = this.PhysiciansBusiness.InsertPhysician_onDailyRequest_onManager_onGanttChartSchema(physician, uam); break; case RequestLoadState.Operator: PhysicianID = this.PhysiciansBusiness.InsertPhysician_onDailyRequest_onOperator_onGanttChartSchema(physician, uam); break; case RequestLoadState.Integral: break; default: break; } break; case RequestCaller.RequestRegister: break; default: break; } break; } break; case RequestTarget.OverTime: break; case RequestTarget.Imperative: break; } break; case UIActionType.EDIT: break; case UIActionType.DELETE: break; } retMessage[0] = GetLocalResourceObject("RetSuccessType").ToString(); string SuccessMessageBody = string.Empty; switch (uam) { case UIActionType.ADD: SuccessMessageBody = GetLocalResourceObject("AddComplete").ToString(); break; case UIActionType.EDIT: SuccessMessageBody = GetLocalResourceObject("EditComplete").ToString(); break; case UIActionType.DELETE: SuccessMessageBody = GetLocalResourceObject("DeleteComplete").ToString(); break; default: break; } retMessage[1] = SuccessMessageBody; retMessage[2] = "success"; retMessage[3] = PhysicianID.ToString(); return(retMessage); } catch (UIValidationExceptions ex) { retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIValidationExceptions, ex, retMessage); return(retMessage); } catch (UIBaseException ex) { retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIBaseException, ex, retMessage); return(retMessage); } catch (Exception ex) { retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.Exception, ex, retMessage); return(retMessage); } }
public string[] UpdateIllness_DefineIllnessPage(string state, string requestCaller, string requestLoadState, string IllnessID, string NameIllness, string Description, string Caller, string Target, string UserCaller) { this.InitializeCulture(); string[] retMessage = new string[4]; try { AttackDefender.CSRFDefender(this.Page); decimal illnessID = 0; decimal selectedIllnessID = decimal.Parse(this.StringBuilder.CreateString(IllnessID), CultureInfo.InvariantCulture); NameIllness = this.StringBuilder.CreateString(NameIllness); Description = this.StringBuilder.CreateString(Description); UIActionType uam = (UIActionType)Enum.Parse(typeof(UIActionType), this.StringBuilder.CreateString(state).ToUpper()); RequestTarget target = (RequestTarget)Enum.Parse(typeof(RequestTarget), this.StringBuilder.CreateString(Target)); PageCaller caller = (PageCaller)Enum.Parse(typeof(PageCaller), this.StringBuilder.CreateString(Caller)); UserCallerEnum userCaller = (UserCallerEnum)Enum.Parse(typeof(UserCallerEnum), this.StringBuilder.CreateString(UserCaller)); RequestCaller RC = (RequestCaller)Enum.Parse(typeof(RequestCaller), this.StringBuilder.CreateString(requestCaller)); RequestLoadState RLS = (RequestLoadState)Enum.Parse(typeof(RequestLoadState), this.StringBuilder.CreateString(requestLoadState)); Illness illness = new Illness(); illness.ID = selectedIllnessID; if (uam != UIActionType.DELETE) { illness.Name = NameIllness; illness.Description = Description; } switch (uam) { case UIActionType.ADD: switch (target) { case RequestTarget.Hourly: switch (caller) { case PageCaller.RequestRegister: switch (userCaller) { case UserCallerEnum.NormalUser: illnessID = this.IllnessBusiness.InsertIllness_onRequestHourly_onRequestRegister(illness, uam); break; case UserCallerEnum.Operator: illnessID = this.IllnessBusiness.InsertIllness_onRequestHourly_onRequestRegisterByOperator(illness, uam); break; case UserCallerEnum.OperatorPermit: illnessID = this.IllnessBusiness.InsertIllness_onRequestHourly_onRequestRegisterByOperatorPermit(illness, uam); break; } break; case PageCaller.DailyRequestOnAbsence: break; case PageCaller.HourlyRequestOnAbsence: switch (RC) { case RequestCaller.Grid: switch (RLS) { case RequestLoadState.Personnel: this.IllnessBusiness.InsertIllness_onHourlyRequest_onPersonnel_onGridSchema(illness, uam); break; case RequestLoadState.Manager: this.IllnessBusiness.InsertIllness_onHourlyRequest_onManager_onGridSchema(illness, uam); break; case RequestLoadState.Operator: this.IllnessBusiness.InsertIllness_onHourlyRequest_onOperator_onGridSchema(illness, uam); break; case RequestLoadState.Integral: break; default: break; } break; case RequestCaller.GanttChart: switch (RLS) { case RequestLoadState.Personnel: this.IllnessBusiness.InsertIllness_onHourlyRequest_onPersonnel_onGanttChartSchema(illness, uam); break; case RequestLoadState.Manager: this.IllnessBusiness.InsertIllness_onHourlyRequest_onManager_onGanttChartSchema(illness, uam); break; case RequestLoadState.Operator: this.IllnessBusiness.InsertIllness_onHourlyRequest_onOperator_onGanttChartSchema(illness, uam); break; case RequestLoadState.Integral: break; default: break; } break; case RequestCaller.RequestRegister: break; default: break; } break; } break; case RequestTarget.Daily: switch (caller) { case PageCaller.RequestRegister: switch (userCaller) { case UserCallerEnum.NormalUser: illnessID = this.IllnessBusiness.InsertIllness_onRequestDaily_onRequestRegister(illness, uam); break; case UserCallerEnum.Operator: illnessID = this.IllnessBusiness.InsertIllness_onRequestDaily_onRequestRegisterByOperator(illness, uam); break; case UserCallerEnum.OperatorPermit: illnessID = this.IllnessBusiness.InsertIllness_onRequestDaily_onRequestRegisterByOperatorPermit(illness, uam); break; } break; case PageCaller.DailyRequestOnAbsence: switch (RC) { case RequestCaller.Grid: switch (RLS) { case RequestLoadState.Personnel: this.IllnessBusiness.InsertIllness_onDailyRequest_onPersonnel_onGridSchema(illness, uam); break; case RequestLoadState.Manager: this.IllnessBusiness.InsertIllness_onDailyRequest_onManager_onGridSchema(illness, uam); break; case RequestLoadState.Operator: this.IllnessBusiness.InsertIllness_onDailyRequest_onOperator_onGridSchema(illness, uam); break; case RequestLoadState.Integral: break; default: break; } break; case RequestCaller.GanttChart: switch (RLS) { case RequestLoadState.Personnel: this.IllnessBusiness.InsertIllness_onDailyRequest_onPersonnel_onGanttChartSchema(illness, uam); break; case RequestLoadState.Manager: this.IllnessBusiness.InsertIllness_onDailyRequest_onManager_onGanttChartSchema(illness, uam); break; case RequestLoadState.Operator: this.IllnessBusiness.InsertIllness_onDailyRequest_onOperator_onGanttChartSchema(illness, uam); break; case RequestLoadState.Integral: break; default: break; } break; case RequestCaller.RequestRegister: break; default: break; } break; case PageCaller.HourlyRequestOnAbsence: break; } break; case RequestTarget.OverTime: break; case RequestTarget.Imperative: break; } break; case UIActionType.EDIT: //if (selectedPhysicianID == 0) //{ // retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIValidationExceptions, new Exception(GetLocalResourceObject("NoPhysicianSelectedforEdit").ToString()), retMessage); // return retMessage; //} //PhysicianID = this.PhysiciansBusiness.Updatephysician(physician, uam); break; case UIActionType.DELETE: //if (selectedPhysicianID == 0) //{ // retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIValidationExceptions, new Exception(GetLocalResourceObject("NoPhysicianSelectedforDelete").ToString()), retMessage); // return retMessage; //} //PhysicianID = this.PhysiciansBusiness.Deletephysician(physician, uam); break; } retMessage[0] = GetLocalResourceObject("RetSuccessType").ToString(); string SuccessMessageBody = string.Empty; switch (uam) { case UIActionType.ADD: SuccessMessageBody = GetLocalResourceObject("AddComplete").ToString(); break; case UIActionType.EDIT: SuccessMessageBody = GetLocalResourceObject("EditComplete").ToString(); break; case UIActionType.DELETE: SuccessMessageBody = GetLocalResourceObject("DeleteComplete").ToString(); break; default: break; } retMessage[1] = SuccessMessageBody; retMessage[2] = "success"; retMessage[3] = illnessID.ToString(); return(retMessage); } catch (UIValidationExceptions ex) { retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIValidationExceptions, ex, retMessage); return(retMessage); } catch (UIBaseException ex) { retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIBaseException, ex, retMessage); return(retMessage); } catch (Exception ex) { retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.Exception, ex, retMessage); return(retMessage); } }