Пример #1
0
        public bool Create(HoiThaoKhoaHocModel model)
        {
            string msgError = "";

            try
            {
                var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "HoiThaoKhoaHoc_create",
                                                                              "@ID_HoiThao", model.ID_HoiThao,
                                                                              "@Loai_HoiThao", model.Loai_HoiThao,
                                                                              "@Ten_HoiThao", model.Ten_HoiThao,
                                                                              "@ThoiGian", model.ThoiGian,
                                                                              "@DiaDiem", model.DiaDiem,
                                                                              "@Trang_BD", model.Trang_BD,
                                                                              "@Trang_KT", model.Trang_KT,
                                                                              "@HinhThuc_BaiDang", model.HinhThuc_BaiDang,
                                                                              "@QuocGia", model.QuocGia
                                                                              );
                if ((result != null && !string.IsNullOrEmpty(result.ToString())) || !string.IsNullOrEmpty(msgError))
                {
                    throw new Exception(Convert.ToString(result) + msgError);
                }
                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #2
0
 public HoiThaoKhoaHocModel UpdateUser([FromBody] HoiThaoKhoaHocModel model)
 {
     _HoiThaoKhoaHocBLL.Update(model);
     return(model);
 }
Пример #3
0
 public HoiThaoKhoaHocModel CreateItem([FromBody] HoiThaoKhoaHocModel model)
 {
     model.ID_HoiThao = Guid.NewGuid().ToString();
     _HoiThaoKhoaHocBLL.Create(model);
     return(model);
 }
Пример #4
0
 public bool Update(HoiThaoKhoaHocModel model)
 {
     return(_res.Update(model));
 }
Пример #5
0
 public bool Create(HoiThaoKhoaHocModel model)
 {
     return(_res.Create(model));
 }