public ActionResult ProductModal(int?id)
 {
     try
     {
         if (id != null)
         {
             _ProductModel = _ProductBusiness.GetProductbyId(Convert.ToInt32(id));
         }
         _ProductModel = _ProductModel ?? new ProductModel();
         _ProductModel.CategoryList = _ProductBusiness.CategoryList();
         return(PartialView("_AddProduct", _ProductModel));
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Example #2
0
 public ActionResult Create()
 {
     _ProductModel.CategoryList = _ProductBusiness.CategoryList().ToList();
     return(View(_ProductModel));
 }