public bool Create(ChitietDHModel model) { string msgError = ""; try { var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "themchitietdonhang", "@MADH", model.MADH, "@MASP", model.MASP, "@DONGIA", model.GIA, "@SOLUONG", model.SOLUONG ); 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(ChitietDHModel ctdh) { return(_res.Create(ctdh)); }
public ChitietDHModel Post([FromBody] ChitietDHModel model) { abc.Create(model); return(model); }