예제 #1
0
        // GET: ProductMaster/Edit/5
        public ActionResult Edit(int id)
        {
            mProductMaster           mProduct = new mProductMaster();
            IEnumerable <mCatergory> Category = DataAccess.GetCategory();

            ViewBag.Category = Category;
            return(View(DataAccess.SelectByPrimary(id)));
        }
예제 #2
0
        // GET: ProductMaster/Create
        public ActionResult Create()
        {
            mProductMaster           mProduct = new mProductMaster();
            IEnumerable <mCatergory> Category = DataAccess.GetCategory();

            ViewBag.Category = Category;
            return(View());
        }
예제 #3
0
 public ActionResult Edit(int id, mProductMaster model)
 {
     try
     {
         if (ModelState.IsValid)
         {
             Message _message = DataAccess.AddUpdate(id, model.CategoryID, model.ProductName, model.IsActive);
             return(RedirectToAction("Index"));
         }
         return(View(model));
         // TODO: Add insert logic here
     }
     catch
     {
         return(View());
     }
 }