Exemplo n.º 1
0
        public bool CreateNap(LichSuNapModel model)
        {
            string msgError = "";

            try
            {
                var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "sp_lichsunap_create",
                                                                              "@id", model.id,
                                                                              "@idUser", model.idUser,
                                                                              "@nhamang", model.nhamang,
                                                                              "@mathe", model.mathe,
                                                                              "@soseri", model.soseri,
                                                                              "@menhgia", model.menhgia,
                                                                              "@ketqua", model.ketqua);
                if ((result != null && !string.IsNullOrEmpty(result.ToString())) || !string.IsNullOrEmpty(msgError))
                {
                    throw new Exception(Convert.ToString(result) + msgError);
                }
                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
 public LichSuNapModel CreateNap([FromBody] LichSuNapModel model)
 {
     model.id = Guid.NewGuid().ToString();
     lichsunap.CreateNap(model);
     return(model);
 }
Exemplo n.º 3
0
 public bool CreateNap(LichSuNapModel model)
 {
     return(_res.CreateNap(model));
 }