예제 #1
0
파일: JSCallCS.cs 프로젝트: tuga1975/SSK
        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);
            }
        }
예제 #2
0
파일: JSCallCS.cs 프로젝트: tuga1975/SSK
        public void UpdateSettingAndTimeslot(string jsonCheckWarningSaveSetting, string jsonModel)
        {
            //var settingDetail = JsonConvert.DeserializeObject<Trinity.BE.SettingDetails>(jsonModel);
            Session       session                 = Session.Instance;
            var           settingDetail           = (SettingDetails)session[CommonConstants.SETTING_DETAIL];
            var           checkWarningSaveSetting = JsonConvert.DeserializeObject <Trinity.BE.CheckWarningSaveSetting>(jsonCheckWarningSaveSetting);
            var           dalSetting              = new DAL_Setting();
            SettingUpdate settingUpdate           = new SettingUpdate()
            {
                CheckWarningSaveSetting = checkWarningSaveSetting,
                SettingDetails          = settingDetail
            };

            dalSetting.UpdateSettingAndTimeSlot(settingUpdate);
        }