Exemplo n.º 1
0
        public ActionResult UpdateBasic([Bind(Include = "daysBeforeAlertStaffGoFull ,goFullAlertMails ,unCertifacteAlertMails,attendanceExceptionAlertMails,repeatAttendanceRecordTime,validAttendanceRecordTime,lateExceptionTime,earlyLeaveExceptionTime,systemHost,emaiSMTPHost,emailUser,emailPwd,emailAddress")] SystemSetting setting)
        {
            ResultMessage msg = new ResultMessage();

            try
            {
                ISystemSettingService cs = new SystemSettingService(Settings.Default.db);
                bool isSucceed           = cs.Update(setting);

                msg.Success = isSucceed;
                msg.Content = isSucceed ? "" : "保存成功";

                return(Json(msg, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                return(Json(new ResultMessage()
                {
                    Success = false, Content = ex.Message
                }, JsonRequestBehavior.AllowGet));
            }
        }
Exemplo n.º 2
0
 protected override void UpdateData(SystemSetting obj)
 {
     systemSettingServiceInstance.Update(obj);
 }
Exemplo n.º 3
0
 public static void Update(SystemSettingBase setting)
 {
     Service.Update(setting);
 }