Ejemplo n.º 1
0
 public ActionResult Edit(int id, [Bind("ProductGroupName,IsActive")] Models.Masters.ProductGroup pvalues)
 {
     try
     {
         // TODO: Add update logic here
         productGroupRepository.UpdateProductGroup(id, pvalues);
         return(RedirectToAction(nameof(Index)));
     }
     catch
     {
         return(View());
     }
 }
Ejemplo n.º 2
0
        public ActionResult Create([Bind("ProductGroupName,IsActive")] Models.Masters.ProductGroup pvalues)
        {
            if (pvalues == null)
            {
                throw new ArgumentNullException(nameof(pvalues));
            }

            try
            {
                // int id = 0;
                // TODO: Add insert logic here
                pvalues.CreatedDate  = DateTime.Today;
                pvalues.ModifiedDate = DateTime.Today;
                productGroupRepository.AddProductGroup(pvalues);


                //return View("Index");
                return(RedirectToAction(nameof(Index)));
            }
            catch (Exception)
            {
                return(View());
            }
        }
Ejemplo n.º 3
0
 // GET: ProductGroup/Edit/5
 public ActionResult Edit(int id)
 {
     Models.Masters.ProductGroup model = productGroupRepository.getProductGroupById(id);
     return(View(model));
 }