public ActionResult AssociateItemProduct(Int32 id) { DesignerModel model = new DesignerModel(); try { SessionData.item = _itemService.GetItem(id); model.Categories = _categoryService.GetCategories(SessionData.customer.id, Common.CategoryType.Product); model.ItemProducts = SessionData.item.ItemProducts; return PartialView("_ItemProductAssociatePartial", model); } catch (Exception ex) { base.Log(ex); } finally { } return null; }
private DesignerModel GetModel(Common.CategoryType type, String search) { DesignerModel model = new DesignerModel(); try { search = String.IsNullOrEmpty(search) ? search : search.ToUpper(); model.CategoryType = type; model.Categories = _categoryService.GetCategories(SessionData.customer.id, type, search); model.ItemProducts = null; if (SessionData.item != null) { model.ItemProducts = SessionData.item.ItemProducts; } return model; } catch (Exception ex) { base.Log(ex); } finally { } return null; }