public CTHoaDonBanModel UpdateItem([FromBody] CTHoaDonBanModel model) { if (model.Macthdb != null) { var arrData = model.Macthdb.Split(';'); if (arrData.Length == 3) { var savePath = $@"assets/images/{arrData[0]}"; model.Macthdb = $"{savePath}"; SaveFileFromBase64String(savePath, arrData[2]); } } _itemBusiness.Update(model); return(model); }
public bool Update(CTHoaDonBanModel model) { string msgError = ""; try { var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "sp_CThoadonban_update", "@Macthdb", model.Macthdb, "@Mahdb", model.Mahdb, "@Masp", model.Masp, "@Soluongban", model.Soluongban, "@Giaban", model.Giaban); 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 Model.CTHoaDonBanModel CreateItem([FromBody] CTHoaDonBanModel model) { _order.Create(model); return(model); }
public bool Update(CTHoaDonBanModel model) { return(_res.Update(model)); }
public bool Create(CTHoaDonBanModel model) { return(_res.Create(model)); }