Exemple #1
0
 public string update(int id)
 {
     sjth.Model.newstype models = new sjth.Model.newstype();
     models     = newstypeBLL.GetById(id);
     models.del = 0;
     newstypeBLL.Update(models);
     return("1");
 }
Exemple #2
0
        public ActionResult addtype(int?id = 0)
        {
            sjth.Model.newstype model = new sjth.Model.newstype();
            if (id != 0)
            {
                model = newstypeBLL.GetById((int)id);
            }

            return(View(model));
        }
Exemple #3
0
 public ActionResult addtype(sjth.Model.newstype model)
 {
     if (model.id == 0)
     {
         model.datatimes = DateTime.Now;
         model.del       = 1;
         newstypeBLL.Insert(model);
         return(RedirectToAction("newstype", "Product"));
     }
     else
     {
         sjth.Model.newstype models = new sjth.Model.newstype();
         models          = newstypeBLL.GetById(model.id);
         models.typename = model.typename;
         newstypeBLL.Update(models);
         return(RedirectToAction("newstype", "Product"));
     }
 }