Beispiel #1
0
 public int Update(long AboutId, About_Info data, IEnumerable <string> columns)
 {
     using (var db = new DBExecutor().GetDatabase())
     {
         return(db.Update(data, AboutId, columns));
     }
 }
Beispiel #2
0
 public int Update(About_Info data)
 {
     using (var db = new DBExecutor().GetDatabase())
     {
         return(db.Update(data));
     }
 }
        public JsonResult SaveAbout(About_Info data)
        {
            //check is there are any data under the categoary.
            ResultBase result = new ResultBase();

            result.setMessage("Done");
            if (data.Category.Trim().Length == 0)
            {
                result.setErrorMessage("名稱不得為空白");
            }
            if (result.JsonReturnCode > -1)
            {
                data.LastUpdate  = DateTime.Now;
                data.LastUpdator = sessionData.trading.LoginId;
                data.Category    = data.Category.Trim();
                if (data.AboutId > 0)
                {
                    AboutMan.Update(data);
                }
                else
                {
                    AboutMan.Insert(data);
                }
            }
            return(Json(result, JsonRequestBehavior.DenyGet));
        }
Beispiel #4
0
 public long Insert(About_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);
     }
 }
Beispiel #5
0
        public long Insert(About_Info data)
        {
            long newID = 0;

            try
            {
                newID = new About_Repo().Insert(data);
            }
            catch (Exception ex)
            {
                log.Exception(ex);
            }
            return(newID);
        }
Beispiel #6
0
 public bool Update(About_Info data)
 {
     return(new About_Repo().Update(data) > 0);
 }
Beispiel #7
0
 public bool Update(long AboutId, About_Info data, IEnumerable <string> columns)
 {
     return(new About_Repo().Update(AboutId, data, columns) > 0);
 }