コード例 #1
0
ファイル: Footer.cs プロジェクト: myrest/WanFang
 public int Update(Footer_Info data)
 {
     using (var db = new DBExecutor().GetDatabase())
     {
         return(db.Update(data));
     }
 }
コード例 #2
0
        public JsonResult SaveFooter(Footer_Info data)
        {
            ResultBase result = new ResultBase();

            result.setMessage("Done");
            if (string.IsNullOrEmpty(data.FooterText))
            {
                result.setErrorMessage("表尾資料不得為空白");
            }
            if (result.JsonReturnCode > -1)
            {
                data.LastUpdate  = DateTime.Now;
                data.LastUpdator = sessionData.trading.LoginId;
                var olddata = HomeMan.GetAll().FirstOrDefault();
                if (olddata == null)
                {
                    HomeMan.Insert(data);
                }
                else
                {
                    data.FooterId = data.FooterId;
                    HomeMan.Update(data);
                }
            }
            return(Json(result, JsonRequestBehavior.DenyGet));
        }
コード例 #3
0
ファイル: Footer.cs プロジェクト: myrest/WanFang
 public int Update(long FooterId, Footer_Info data, IEnumerable <string> columns)
 {
     using (var db = new DBExecutor().GetDatabase())
     {
         return(db.Update(data, FooterId, columns));
     }
 }
コード例 #4
0
ファイル: Footer.cs プロジェクト: myrest/WanFang
 public long Insert(Footer_Info data)
 {
     using (var db = new DBExecutor().GetDatabase())
     {
         long NewID  = 0;
         var  result = db.Insert(data);
         if (result != null)
         {
             long.TryParse(result.ToString(), out NewID);
         }
         return(NewID);
     }
 }
コード例 #5
0
        public long Insert(Footer_Info data)
        {
            long newID = 0;

            try
            {
                newID = new Footer_Repo().Insert(data);
            }
            catch (Exception ex)
            {
                log.Exception(ex);
            }
            return(newID);
        }
コード例 #6
0
        public ActionResult EditFooter()
        {
            var PermissionCheck = CheckPermission("表尾資料管理");

            if (PermissionCheck != null)
            {
                return(PermissionCheck);
            }

            var model = FooterMan.GetAll().FirstOrDefault();

            if (model == null)
            {
                model = new Footer_Info()
                {
                };
            }
            ViewData["Model"] = model;
            return(View());
        }
コード例 #7
0
 public bool Update(Footer_Info data)
 {
     return(new Footer_Repo().Update(data) > 0);
 }
コード例 #8
0
 public bool Update(long FooterId, Footer_Info data, IEnumerable <string> columns)
 {
     return(new Footer_Repo().Update(FooterId, data, columns) > 0);
 }