Example #1
0
        public bool Create(HoadonbanModel model)
        {
            string msgError = "";

            try
            {
                var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "themhoadonban",
                                                                              "@MAHDB", model.MAHDB,
                                                                              "@MADH", model.MADH,
                                                                              "@NGAYLAP", model.NGAYLAP
                                                                              );
                if ((result != null && !string.IsNullOrEmpty(result.ToString())) || !string.IsNullOrEmpty(msgError))
                {
                    throw new Exception(Convert.ToString(result) + msgError);
                }
                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #2
0
 public HoadonbanModel CreateHDB([FromBody] HoadonbanModel model)
 {
     abc.Create(model);
     return(model);
 }
Example #3
0
 public bool Create(HoadonbanModel model)
 {
     return(_res.Create(model));
 }