Exemple #1
0
        public bool Update(NccModel model)
        {
            string msgError = "";

            try
            {
                var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "suancc",
                                                                              "@MANCC", model.MANCC,
                                                                              "@TENNCC", model.TENNCC,
                                                                              "@GIOITHIEU", model.GIOITHIEU,
                                                                              "@HINH", model.HINH,
                                                                              "@KEYWORD", model.KEYWORD,
                                                                              "@URL", model.URL
                                                                              );
                if ((result != null && !string.IsNullOrEmpty(result.ToString())) || !string.IsNullOrEmpty(msgError))
                {
                    throw new Exception(Convert.ToString(result) + msgError);
                }
                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #2
0
 public bool Create(NccModel model)
 {
     return(_res.Create(model));
 }
Exemple #3
0
 public bool Update(NccModel model)
 {
     return(_res.Update(model));
 }
Exemple #4
0
 public NccModel UpdateNCC([FromBody] NccModel model)
 {
     abc.Create(model);
     return(model);
 }