示例#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;
            }
        }
示例#2
0
 public bool Create(NccModel model)
 {
     return(_res.Create(model));
 }
示例#3
0
 public bool Update(NccModel model)
 {
     return(_res.Update(model));
 }
示例#4
0
 public NccModel UpdateNCC([FromBody] NccModel model)
 {
     abc.Create(model);
     return(model);
 }