public bool Update(NccModel model) { string msgError = ""; try { var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "suancc", "@MANCC", model.MANCC, "@TENNCC", model.TENNCC, "@GIOITHIEU", model.GIOITHIEU, "@HINH", model.HINH, "@KEYWORD", model.KEYWORD, "@URL", model.URL ); if ((result != null && !string.IsNullOrEmpty(result.ToString())) || !string.IsNullOrEmpty(msgError)) { throw new Exception(Convert.ToString(result) + msgError); } return(true); } catch (Exception ex) { throw ex; } }
public bool Create(NccModel model) { return(_res.Create(model)); }
public bool Update(NccModel model) { return(_res.Update(model)); }
public NccModel UpdateNCC([FromBody] NccModel model) { abc.Create(model); return(model); }