private async Task <List <JobSelectListItem> > GetExportIntegrationMapTypes(List <JobSelectListItem> integrationMapTypes, int admSiteId) { for (int i = integrationMapTypes.Count - 1; i >= 0; i--) { JobSelectListItem item = integrationMapTypes[i]; int value = Convert.ToInt32(item.Value); if (value == Convert.ToInt32(IntegrationMapType.Direct_Cert_Free) || value == Convert.ToInt32(IntegrationMapType.Direct_Cert_Reduced) || value == Convert.ToInt32(IntegrationMapType.Inventory) || value == Convert.ToInt32(IntegrationMapType.Nutritionals) || value == Convert.ToInt32(IntegrationMapType.Orders) //|| value == Convert.ToInt32(IntegrationMapType.US_Foods_Order_Export) || value == Convert.ToInt32(IntegrationMapType.Nutriscan) || value == Convert.ToInt32(IntegrationMapType.Online) || value == Convert.ToInt32(IntegrationMapType.Schools) || value == Convert.ToInt32(IntegrationMapType.Direct_Cert_All) || value == Convert.ToInt32(IntegrationMapType.Gordon_Foods_Order_Export)) { integrationMapTypes.RemoveAt(i); } else if (value == Convert.ToInt32(IntegrationMapType.CNIPs) && await GetSchoolsState(admSiteId) != "CA") { integrationMapTypes.RemoveAt(i); } } return(integrationMapTypes); }
private List <JobSelectListItem> GetImportIntegrationMapTypes(List <JobSelectListItem> integrationMapTypes) { // this is hardcoded logic; for (int i = integrationMapTypes.Count - 1; i >= 0; i--) { JobSelectListItem item = integrationMapTypes[i]; int value = Convert.ToInt32(item.Value); if (value == Convert.ToInt32(IntegrationMapType.Orders) || value == Convert.ToInt32(IntegrationMapType.CNIPs) || value == Convert.ToInt32(IntegrationMapType.Gordon_Foods_Order_Export)) { integrationMapTypes.RemoveAt(i); } //if (value == Convert.ToInt32(IntegrationMapType.US_Foods_Order_Export) // || value == Convert.ToInt32(IntegrationMapType.Orders)) //{ // integrationMapTypes.RemoveAt(i); //} } return(integrationMapTypes); }