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

            try
            {
                var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "TinHoc_update",
                                                                              "@ID_TH", model.ID_TH,
                                                                              "@ID_GV", model.ID_GV,
                                                                              "@Ten_TinHoc", model.Ten_TinHoc,
                                                                              "@TrinhDo", model.TrinhDo,
                                                                              "@ChungChi", model.ChungChi);
                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 TinHocModel UpdateUser([FromBody] TinHocModel model)
 {
     _TinHocBLL.Update(model);
     return(model);
 }
Esempio n. 3
0
 public bool Update(TinHocModel model)
 {
     return _res.Update(model);
 }
Esempio n. 4
0
 public TinHocModel CreateItem([FromBody] TinHocModel model)
 {
     model.ID_TH = Guid.NewGuid().ToString();
     _TinHocBLL.Create(model);
     return(model);
 }
Esempio n. 5
0
 public bool Create(TinHocModel model)
 {
     return _res.Create(model);
 }