Пример #1
0
 private void updateOperation()
 {
     try
     {
         innerFlag = groupSerivce.UpdateBackupServerGroup(this.innerBackupServerGroup);
         innerFlag = backupService.UpdateBackupServer(innerBackupServer);
     }
     catch (Exception ex)
     {
         logger.Error(ex.Message);
     }
 }
Пример #2
0
        /// <summary>
        /// データ更新
        /// </summary>
        /// <param name="bkModel"></param>
        /// <returns></returns>
        public ActionResult Update(BackupServerGroup model, BackupServer bkModel)
        {
            int result = -1;

            //session获取值
            if (Session["LoginId"] == null)
            {
                result = -99;
            }
            else
            {
                try
                {
                    model.id         = Request.Form["group_id"];
                    model.updater    = bkModel.updater = Session["LoginId"].ToString();
                    model.updateDate = bkModel.updateDate = CommonUtil.DateTimeNowToString();
                    if (model.memo == null)
                    {
                        model.memo = string.Empty;
                    }
                    if (bkModel.memo == null)
                    {
                        bkModel.memo = string.Empty;
                    }
                    if (bkModel.ssbpath == null)
                    {
                        bkModel.ssbpath = string.Empty;
                    }
                    result = groupSerivce.UpdateBackupServerGroup(model);
                    result = bkService.UpdateBackupServer(bkModel);
                }
                catch (Exception ex)
                {
                    result = -10;
                    logger.Error(ex.Message);
                }
            }
            Response.Write(result);
            Response.End();
            return(null);
        }