public GiaBanModel Addprice(GiaBanModel gb) { string msgError = ""; try { var dt = _dbHelper.ExecuteSProcedureReturnDataTable(out msgError, "themgiaban", "@MaSanPham", gb.MaSanPham, "@Gia", gb.Gia); if (!string.IsNullOrEmpty(msgError)) { throw new Exception(msgError); } return(dt.ConvertTo <GiaBanModel>().FirstOrDefault()); } catch (Exception ex) { throw ex; } }
public GiaBanModel Themgia([FromBody] GiaBanModel giaBan) { var kq = isp.ThemGiaBan(giaBan); return(kq); }
public GiaBanModel ThemGiaBan(GiaBanModel gb) { return(isp.Addprice(gb)); }