public int Modify(int accountId, [FromBody] Account o) { #if DEBUG DataConnection.TurnTraceSwitchOn(); DataConnection.WriteTraceLine = (msg, context) => Debug.WriteLine(msg, context); #endif using (var db = new peppaDB()) { var count = db.Update <Account>(o); return(count); } }
public int Modify(int userType, string genericUserNo, int seq, [FromBody] Contact o) { #if DEBUG DataConnection.TurnTraceSwitchOn(); DataConnection.WriteTraceLine = (msg, context) => Debug.WriteLine(msg, context); #endif using (var db = new peppaDB()) { var count = db.Update <Contact>(o); return(count); } }
public int Modify(string roleId, string permissionId, [FromBody] RolePermission o) { #if DEBUG DataConnection.TurnTraceSwitchOn(); DataConnection.WriteTraceLine = (msg, context) => Debug.WriteLine(msg, context); #endif using (var db = new peppaDB()) { var count = db.Update <RolePermission>(o); return(count); } }
public IActionResult Modify(int uid, [FromBody] Test o) { #if DEBUG DataConnection.TurnTraceSwitchOn(); DataConnection.WriteTraceLine = (msg, context) => Debug.WriteLine(msg, context); #endif if (ModelState.IsValid) { using (var db = new peppaDB()) { var count = db.Update <Test>(o); return(Ok(count)); } } return(BadRequest()); }
public IActionResult Modify(int accountId, string roleId, [FromBody] AccountRole o) { #if DEBUG DataConnection.TurnTraceSwitchOn(); DataConnection.WriteTraceLine = (msg, context) => Debug.WriteLine(msg, context); #endif if (ModelState.IsValid) { using (var db = new peppaDB()) { o.modified_by = CurrentAccountId; var count = db.Update <AccountRole>(o); return(Ok(count)); } } return(BadRequest()); }
public IActionResult Modify(int userType, string genericUserNo, int seq, [FromBody] PersonName o) { #if DEBUG DataConnection.TurnTraceSwitchOn(); DataConnection.WriteTraceLine = (msg, context) => Debug.WriteLine(msg, context); #endif if (ModelState.IsValid) { using (var db = new peppaDB()) { o.modified_by = CurrentAccountId; var count = db.Update <PersonName>(o); return(Ok(count)); } } return(BadRequest()); }