public JsonResult insertItem(string itemID, string quoteID, int quantity) { _itemservice.UserVM = UserVM; bool itemidstatus = true; bool itemExist = false; ItemContainerService _itemContainerSrv = new ItemContainerService(); if (_iItemListViewService.CheckItemInMas(itemID)) { itemExist = true; List <string> lstPreviewableItemIds = _itemContainerSrv.GetPreviewableItemIDs(); QuoteViewService _QuoteViewService = new QuoteViewService(); int quotetypeID = _QuoteViewService.getQuoteTypeId(Convert.ToInt32(quoteID)); if (quotetypeID == (int)QuoteTypeEnum.Preview) { itemidstatus = lstPreviewableItemIds.Contains(itemID); } if (itemidstatus) { _itemservice.selectedOptions(itemID, quoteID, WebSecurity.CurrentUserId, "", quantity); this.AssignUserVM(_itemservice.UserVM); } } ActiveQuoteService aqs = new ActiveQuoteService(); RapidEntryModel rem = aqs.getRapidEntry(Convert.ToInt32(quoteID)); rem.ItemStatus = itemidstatus; rem.ItemExist = itemExist; return(Json(rem)); }
public JsonResult rapidEntryItemByISBN(string ISBN, string QuoteID, int quantity) { string lstItemIds = _itemservice.GetItemIDsListByIsbn(ISBN, QuoteID); bool itemidstatus = false; _itemservice.UserVM = UserVM; if (lstItemIds != null && lstItemIds != string.Empty) { itemidstatus = true; _itemservice.selectedOptions(lstItemIds, QuoteID, WebSecurity.CurrentUserId, "", quantity); } ActiveQuoteService aqs = new ActiveQuoteService(); RapidEntryModel rem = aqs.getRapidEntry(Convert.ToInt32(QuoteID)); rem.ItemStatus = itemidstatus; return(Json(rem)); }