public LoaiQuangCao CreateTintuc([FromBody] LoaiQuangCao model) { /* if (model.hinhanh != null) * { * var arrData = model.hinhanh.Split(';'); * if (arrData.Length == 3) * { * var savePath = $@"assets/images/{arrData[0]}"; * model.hinhanh = $"{savePath}"; * SaveFileFromBase64String(savePath, arrData[2]); * } * }*/ //model.id = Guid.NewGuid().ToString(); _itemGroupBusiness.Create(model); return(model); }
public bool Create(LoaiQuangCao model) { string msgError = ""; try { var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "sp_loaiquangcao_all", "@id", model.id, "@tenchude", model.tenquangcao); 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(LoaiQuangCao model) { return(_res.Create(model)); }
public bool Update(LoaiQuangCao model) { return(_res.Update(model)); }
public LoaiQuangCao UpdateUser([FromBody] LoaiQuangCao model) { _itemGroupBusiness.Update(model); return(model); }