public bool Create(ChitiethopdongModel model)
        {
            string msgError = "";

            try
            {
                var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "ct_item_create",
                                                                              "@machitiethopdong", model.machitiethopdong,
                                                                              "@mahopdong", model.mahopdong,
                                                                              "@masanpham", model.masanpham,
                                                                              "@soluong", model.soluong,
                                                                              "@dongia", model.dongia);
                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 ChitiethopdongModel Update([FromBody] ChitiethopdongModel model)
 {
     _itemBusiness.Update(model);
     return(model);
 }
Exemplo n.º 3
0
 public bool Create(ChitiethopdongModel model)
 {
     return(_res.Create(model));
 }
 public ChitiethopdongModel CreateItem([FromBody] ChitiethopdongModel model)
 {
     _itemBusiness.Create(model);
     return(model);
 }
Exemplo n.º 5
0
 public bool Update(ChitiethopdongModel model)
 {
     return(_res.Update(model));
 }