Ejemplo n.º 1
0
        public bool CheckWarningSaveSetting(int dayOfWeek)
        {
            var dalSetting = new DAL_Setting();
            CheckWarningSaveSetting checkWarningSaveSetting = dalSetting.CheckWarningSaveSetting(dayOfWeek);

            return(checkWarningSaveSetting.arrayDetail.Count > 0);
        }
Ejemplo n.º 2
0
        public void UpdateOperationSetting(string json)
        {
            var     model   = JsonConvert.DeserializeObject <Trinity.BE.SettingDetails>(json);
            Session session = Session.Instance;

            Trinity.BE.User dutyOfficer = (Trinity.BE.User)session[CommonConstants.USER_LOGIN];
            model.Last_Updated_By   = dutyOfficer.UserId;
            model.Last_Updated_Date = DateTime.Now;

            var dalSetting = new DAL_Setting();
            CheckWarningSaveSetting checkWarningSaveSetting = dalSetting.CheckWarningSaveSetting(model.DayOfWeek);

            if (checkWarningSaveSetting != null && checkWarningSaveSetting.arrayDetail.Count > 0)
            {
                session[CommonConstants.SETTING_DETAIL] = model;
                // Show popup confirm with list Supervisee have appointment
                this._web.LoadPopupHtml("PopupConfirmDeleteAppointment.html", checkWarningSaveSetting);
                this._web.InvokeScript("showModal");
            }
            else
            {
                SettingUpdate settingUpdate = new SettingUpdate()
                {
                    CheckWarningSaveSetting = checkWarningSaveSetting,
                    SettingDetails          = model
                };
                dalSetting.UpdateSettingAndTimeSlot(settingUpdate);
            }
        }