示例#1
0
        /// <summary>
        /// 更新レコード メソッド
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public ActionResult Update(BackupServerGroup model)
        {
            int result = -1;

            if (Session["LoginId"] == null)
            {
                result = -99;
            }
            else
            {
                try
                {
                    model.updateDate = CommonUtil.DateTimeNowToString();
                    model.updater    = Session["LoginId"].ToString();
                    if (model.memo == null)
                    {
                        model.memo = string.Empty;
                    }
                    result = groupSerivce.UpdateBackupServerGroup(model);
                }
                catch (Exception ex)
                {
                    result = -10;
                    logger.Error(ex.Message);
                }
            }
            Response.Write(result);
            Response.End();
            return(null);
        }
示例#2
0
 private void updateOperation()
 {
     try
     {
         innerFlag = backupService.UpdateBackupServerGroup(innerBackupServerGroup);
     }
     catch (Exception ex)
     {
         logger.Error(ex.Message);
     }
 }
示例#3
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);
        }