Ejemplo n.º 1
0
 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;
            }
        }
Ejemplo n.º 3
0
 public bool Create(LoaiQuangCao model)
 {
     return(_res.Create(model));
 }
Ejemplo n.º 4
0
 public bool Update(LoaiQuangCao model)
 {
     return(_res.Update(model));
 }
Ejemplo n.º 5
0
 public LoaiQuangCao UpdateUser([FromBody] LoaiQuangCao model)
 {
     _itemGroupBusiness.Update(model);
     return(model);
 }