Esempio n. 1
0
        public bool Create(ChitietDHModel model)
        {
            string msgError = "";

            try
            {
                var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "themchitietdonhang",
                                                                              "@MADH", model.MADH,
                                                                              "@MASP", model.MASP,
                                                                              "@DONGIA", model.GIA,
                                                                              "@SOLUONG", model.SOLUONG
                                                                              );
                if ((result != null && !string.IsNullOrEmpty(result.ToString())) || !string.IsNullOrEmpty(msgError))
                {
                    throw new Exception(Convert.ToString(result) + msgError);
                }
                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 2
0
 public bool Create(ChitietDHModel ctdh)
 {
     return(_res.Create(ctdh));
 }
Esempio n. 3
0
 public ChitietDHModel Post([FromBody] ChitietDHModel model)
 {
     abc.Create(model);
     return(model);
 }