示例#1
0
        public bool Create(DeTaiNCKHModel model)
        {
            string msgError = "";

            try
            {
                var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "DeTaiNCKH_create",
                                                                              "@ID_DeTai", model.ID_DeTai,
                                                                              "@Ten_DeTai", model.Ten_DeTai,
                                                                              "@Cap_QuanLy", model.Cap_QuanLy,
                                                                              "@TG_BD", model.TG_BD,
                                                                              "@TG_KT", model.TG_KT,
                                                                              "@TinhTrang", model.TinhTrang,
                                                                              "@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;
            }
        }
示例#2
0
 public bool Update(DeTaiNCKHModel model)
 {
     return(_res.Update(model));
 }
示例#3
0
 public DeTaiNCKHModel UpdateUser([FromBody] DeTaiNCKHModel model)
 {
     _DeTaiNCKHBLL.Update(model);
     return(model);
 }
示例#4
0
 public bool Create(DeTaiNCKHModel model)
 {
     return(_res.Create(model));
 }
示例#5
0
 public DeTaiNCKHModel CreateItem([FromBody] DeTaiNCKHModel model)
 {
     model.ID_DeTai = Guid.NewGuid().ToString();
     _DeTaiNCKHBLL.Create(model);
     return(model);
 }