public int Update(long AboutId, About_Info data, IEnumerable <string> columns) { using (var db = new DBExecutor().GetDatabase()) { return(db.Update(data, AboutId, columns)); } }
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)); }
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); } }
public long Insert(About_Info data) { long newID = 0; try { newID = new About_Repo().Insert(data); } catch (Exception ex) { log.Exception(ex); } return(newID); }
public bool Update(About_Info data) { return(new About_Repo().Update(data) > 0); }
public bool Update(long AboutId, About_Info data, IEnumerable <string> columns) { return(new About_Repo().Update(AboutId, data, columns) > 0); }