Example #1
0
        public bool Creatett(LichSuttModel model)
        {
            string msgError = "";

            try
            {
                var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "sp_lichsutt_create",
                                                                              "@id", model.id,
                                                                              "@idUser", model.idUser,
                                                                              "@tentheloai", model.tentheloai,
                                                                              "@password", model.password,
                                                                              "@account", model.account,
                                                                              "@tennv", model.tennv,
                                                                              "@giaban", model.giaban,
                                                                              "@trangthai", model.trangthai);
                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 bool Creatett(LichSuttModel model)
 {
     return(_res.Creatett(model));
 }
Example #3
0
 public LichSuttModel Creatett([FromBody] LichSuttModel model)
 {
     model.id = Guid.NewGuid().ToString();
     lichsutt.Creatett(model);
     return model;
 }