public ActionResult AjaxOrders() { var id = Request["id"]; var obj = new OrderItem(); var listint = ArrId; if (!string.IsNullOrEmpty(id) && id != "0") { obj = _ordersApi.GetItemById(Convert.ToInt32(id)); if (obj != null) { listint = obj.DN_Bed_Desk1.Select(m => m.ID).ToList(); } } var model = new ModelBedDeskItem { ListItem = _deskApi.GetListNow(UserItem.AgencyID), OrderItem = obj, Listid = listint, CategoryItems = _productApi.GetList(UserItem.AgencyID) }; return(View(model)); }