Beispiel #1
0
 public static RequestInfoHeadingViewModel GenerateRequestInfoHeadingViewModel()
 {
     return(new RequestInfoHeadingViewModel
     {
         //SnOrIdNumberList = DictionaryHelper.ToSelectListItems(ScenarioNewResource.SnOrIdNumber1, ScenarioNewResource.SnOrIdNumber2, ScenarioNewResource.SnOrIdNumber3),
         //CompanyList = DictionaryHelper.ToSelectListItems(ScenarioNewResource.Company1, ScenarioNewResource.Company2),
         IssuedByList = DictionaryHelper.ToSelectListItems(SharedResource.SalesAdmin, SharedResource.Warehouse, SharedResource.Workshop, SharedResource.Helpdesk)
     });
 }
Beispiel #2
0
 public static DropDownListViewModel GenerateDropDownListViewModel(string selected, bool isSelected,
                                                                   params string[] items)
 {
     return(new DropDownListViewModel
     {
         PostData = selected,
         Sources = DictionaryHelper.ToSelectListItems(selected, isSelected, items)
     });
 }
Beispiel #3
0
 public static SoftwareTypeViewModel GeneraSoftwareTypeViewModel()
 {
     return(new SoftwareTypeViewModel
     {
         SoftwareListItems = DictionaryHelper.ToSelectListItems(ScenarioNewContractResource.DbsId,
                                                                ScenarioNewContractResource.EmailExchange,
                                                                ScenarioNewContractResource.AksesAd,
                                                                ScenarioNewContractResource.EmailMaintenance)
     });
 }
 public static ScenarioAttributeReturnDeviceViewModel GenerateScenarioAttributeReturnDeviceViewModel()
 {
     return(new ScenarioAttributeReturnDeviceViewModel
     {
         UserHolderNameList = DictionaryHelper.ToSelectListItems(ScenarioReturnDeviceResource.UserHolderName1, ScenarioReturnDeviceResource.UserHolderName2, ScenarioReturnDeviceResource.UserHolderName3),
         UserSalaryNumberList = DictionaryHelper.ToSelectListItems(ScenarioReturnDeviceResource.UserSalaryNumber1, ScenarioReturnDeviceResource.UserSalaryNumber2, ScenarioReturnDeviceResource.UserSalaryNumber3)
                                //ReturnDeliveryNumberList = DictionaryHelper.ToSelectListItems(ScenarioReturnDeviceResource.ReturnDeliveryNumber1, ScenarioReturnDeviceResource.ReturnDeliveryNumber2, ScenarioReturnDeviceResource.ReturnDeliveryNumber3),
                                //NewLocationList = DictionaryHelper.ToSelectListItems(ScenarioReturnDeviceResource.NewLocation1, ScenarioReturnDeviceResource.NewLocation2, ScenarioReturnDeviceResource.NewLocation3)
     });
 }
Beispiel #5
0
        public static PredefinedScenarioViewModel GeneratePredefinedScenarioViewModel(ScenarioType scenarioTypeChosen)
        {
            string chosenSubScenario;

            switch (scenarioTypeChosen)
            {
            case ScenarioType.NewContractLDP:
            {
                chosenSubScenario = ScenarioNewContractResource.Ldp;
                break;
            }

            case ScenarioType.NewContractIPPhone:
            {
                chosenSubScenario = ScenarioNewContractResource.IpPhone;
                break;
            }

            case ScenarioType.NewContractExtLine:
            {
                chosenSubScenario = ScenarioNewContractResource.ExtLine;
                break;
            }

            case ScenarioType.NewContractIpPhoneExtLine:
            {
                chosenSubScenario = ScenarioNewContractResource.IpPhoneExtLine;
                break;
            }

            default:
            {
                chosenSubScenario = ScenarioNewContractResource.Software;
                break;
            }
            }
            return(new PredefinedScenarioViewModel
            {
                PredefinedScenario = DictionaryHelper.ToSelectListItems(ScenarioNewContractResource.NewContract,
                                                                        ScenarioNewContractResource.TransferAsset,
                                                                        ScenarioNewContractResource.Termination,
                                                                        ScenarioNewContractResource.ReturnDevice,
                                                                        ScenarioNewContractResource.Broken,
                                                                        ScenarioNewContractResource.CustomScenario),
                SubPredefinedScenarioList = DictionaryHelper.ToSelectListItems(chosenSubScenario, true,
                                                                               ScenarioNewContractResource.Ldp,
                                                                               ScenarioNewContractResource.IpPhone,
                                                                               ScenarioNewContractResource.ExtLine,
                                                                               ScenarioNewContractResource.IpPhoneExtLine,
                                                                               ScenarioNewContractResource.Software)
            });
        }
 public static ScenarioAttributeLocationViewModel GenearateScenarioAttributeLocationViewModel()
 {
     return(new ScenarioAttributeLocationViewModel
     {
         OldLocationList = DictionaryHelper.ToSelectListItems(ScenarioTransferAssetsResource.OldLocation1, ScenarioTransferAssetsResource.OldLocation2, ScenarioTransferAssetsResource.OldLocation3),
         UserHolderNameList = DictionaryHelper.ToSelectListItems(ScenarioTransferAssetsResource.UserHolderName1, ScenarioTransferAssetsResource.UserHolderName2, ScenarioTransferAssetsResource.UserHolderName3),
         UserSalaryNumberList = DictionaryHelper.ToSelectListItems(ScenarioTransferAssetsResource.UserSalaryNumber1, ScenarioTransferAssetsResource.UserSalaryNumber2, ScenarioTransferAssetsResource.UserSalaryNumber3),
         NewLocationList = new DropDownListViewModel
         {
             Sources = DictionaryHelper.ToSelectListItems(ScenarioTransferAssetsResource.NewLocation1, ScenarioTransferAssetsResource.NewLocation2, ScenarioTransferAssetsResource.NewLocation3)
         }
     });
 }
Beispiel #7
0
 private static DropDownListViewModel GenerateDivisionViewModel(string chosenPerson)
 {
     return(new DropDownListViewModel
     {
         Sources = DictionaryHelper.ToSelectListItems(chosenPerson, true,
                                                      SharedResource.Helpdesk, SharedResource.Warehouse,
                                                      SharedResource.WarehouseAdmin, SharedResource.Sales,
                                                      SharedResource.SalesAdmin, SharedResource.DeliveryAdmin,
                                                      SharedResource.AssetAdmin, SharedResource.WorkshopAdmin,
                                                      SharedResource.SystemSupport, SharedResource.Asset,
                                                      SharedResource.Workshop, SharedResource.ScmWarehouseAdmin)
     });
 }
Beispiel #8
0
        public static RoutingInfoHeadingViewModel GenerateRoutingInfoHeadingViewModel()
        {
            return(new RoutingInfoHeadingViewModel
            {
                TerminationRoutingInfoLineViewModels = new List <TerminationRoutingInfoLineViewModel>(),
                DetailScenarioListItems = DictionaryHelper.ToSelectListItems(ScenarioTerminationResource.DbsService,
                                                                             ScenarioTerminationResource.EmailService,
                                                                             ScenarioTerminationResource.AdAccess,
                                                                             ScenarioTerminationResource.Extention,
                                                                             ScenarioTerminationResource.Others),

                Scenario = DictionaryHelper.ToSelectListItems(ScenarioTerminationResource.Termination)
            });
        }
 public static RoutingInfoHeadingViewModel GenerateRoutingInfoHeadingViewModel()
 {
     return(new RoutingInfoHeadingViewModel
     {
         PredefinedScenarioList = DictionaryHelper.ToSelectListItems(SharedResource.ReturnDevice, SharedResource.TransferAssets, SharedResource.Termination, SharedResource.Broken, SharedResource.ReturnDevice, SharedResource.ErrorCharges, SharedResource.ScenarioNew, SharedResource.NewContract),
         DeviceViewModel = new DeviceViewModel
         {
             DeviceList = new DropDownListViewModel
             {
                 Sources = DictionaryHelper.ToSelectListItems(SharedResource.Desktop, SharedResource.Laptop, SharedResource.Printer, SharedResource.IpPhone, SharedResource.ThinClient, SharedResource.Others)
             }
         }
     });
 }
Beispiel #10
0
 public static RoutingInfoHeadingViewModel GenerateRoutingInfoHeadingViewModel()
 {
     return(new RoutingInfoHeadingViewModel
     {
         PredefinedScenarioViewModel = new PredefinedScenarioViewModel()
         {
             PredefinedScenarioList = new DropDownListViewModel
             {
                 Sources = DictionaryHelper.ToSelectListItems(SharedResource.TransferAssets, SharedResource.Termination, SharedResource.Broken, SharedResource.ReturnDevice, SharedResource.ErrorCharges, SharedResource.NewScenario, SharedResource.NewContract)
             }
         },
         DeviceList = DictionaryHelper.ToSelectListItems(SharedResource.Laptop, SharedResource.Phone)
     });
 }
Beispiel #11
0
        public static RequestInfoHeadingViewModel GenerateRequestInfoMainViewModel()
        {
            return(new RequestInfoHeadingViewModel
            {
                //CompanyListItems = DictionaryHelper.ToSelectListItems(ScenarioNewContractResource.Trakindo,
                // ScenarioNewContractResource.Mahadasha),

                IssuedByListItems = DictionaryHelper.ToSelectListItems(ScenarioTerminationResource.SalesAdmin,
                                                                       ScenarioTerminationResource.Helpdesk,
                                                                       ScenarioTerminationResource.Warehouse,
                                                                       ScenarioTerminationResource.Workshop
                                                                       ),

                // RequestedViaListItems = DictionaryHelper.ToSelectListItems(ScenarioNewContractResource.IdrWeb,
                // ScenarioNewContractResource.PoManual)//
            });
        }
        public static RoutingInfoHeadingViewModel GenerateRoutingInfoHeadingViewModel(ScenarioType scenarioType)
        {
            return(new RoutingInfoHeadingViewModel
            {
                DeviceList = new DropDownListViewModel
                {
                    Sources = DictionaryHelper.ToSelectListItems(SharedResource.Desktop, SharedResource.Laptop, SharedResource.Printer, SharedResource.IpPhone, SharedResource.ThinClient, SharedResource.Others)
                },


                //ContractNumberViewModel = new ContractNumberViewModel()
                //{
                //    ContractNumberList =  DictionaryHelper.ToSelectListItems(ScenarioTransferAssetsResource.CustomerNumber1, ScenarioTransferAssetsResource.CustomerNumber2)
                //},
                PredefinedScenarioViewModel = GeneratePredefinedScenarioViewModel(scenarioTypeChosen: scenarioType)
            });
        }
 public static ScenarioAttributeBrokenViewModel GeneraScenarioAttributeBrokenViewModel()
 {
     return(new ScenarioAttributeBrokenViewModel
     {
         UserHolderNameList = new DropDownListViewModel
         {
             Sources = DictionaryHelper.ToSelectListItems(ScenarioBrokenResource.UserHolderName1, ScenarioBrokenResource.UserHolderName2, ScenarioBrokenResource.UserHolderName3)
         },
         UserSalaryNumberList = new DropDownListViewModel
         {
             Sources = DictionaryHelper.ToSelectListItems(ScenarioBrokenResource.UserSalaryNumber1, ScenarioBrokenResource.UserSalaryNumber2, ScenarioBrokenResource.UserSalaryNumber3)
         },
         BackupEquipmentNumberList = new DropDownListViewModel
         {
             Sources = DictionaryHelper.ToSelectListItems(ScenarioBrokenResource.BackupEquipmentNumber1, ScenarioBrokenResource.BackupEquipmentNumber2, ScenarioBrokenResource.BackupEquipmentNumber3)
         }
     });
 }
Beispiel #14
0
 /// <summary>
 /// In order not to get Circular Dependency exception when performing
 /// property projection for large data
 /// </summary>
 /// <param name="serviceModel"></param>
 /// <returns></returns>
 public static DataSourceResult GenerateBillingItemsViewModelJSON([DataSourceRequest] DataSourceRequest request,
                                                                  IEnumerable <InvoiceProformaItemDTO> serviceModel)
 {
     return(serviceModel.ToDataSourceResult(request, e => new
     {
         BillingItemId = e.NO ?? string.Empty,
         BillingBlock = e.VBAK_FAKSK_T ?? string.Empty,
         BillingNo = Convert.ToInt32(DictionaryHelper.ConvertToIntegerSafeString(e.VBELN)),
         BillingItem = Convert.ToInt32(DictionaryHelper.ConvertToIntegerSafeString(e.POSNR)),
         Charge = Convert.ToDouble(e.TOTAL5),
         ContractItem = Convert.ToInt32(DictionaryHelper.ConvertToIntegerSafeString(e.VBAK_POSNR)),
         ContractNumber = Convert.ToInt32(DictionaryHelper.ConvertToIntegerSafeString(e.VBAK_VBELN)),
         CostCenter = e.VBAK_KOSTL ?? string.Empty,
         Currency = e.VBAK_WAERK ?? string.Empty,
         Deduction = Convert.ToDecimal(e.TOTAL4).ToString("#,##0"),
         Description = e.ARKTX ?? string.Empty,
         Equipment = e.VBAK_BSTKD_E,
         HolderName = e.VBAK_EMPNAME ?? string.Empty,
         IdrDate = e.VBAK_BSTDK ?? string.Empty,
         IdrNo = e.VBAK_BSTKD ?? string.Empty,
         Location = e.VBAK_LOCATION ?? string.Empty,
         MaterialNo = e.MATNR ?? string.Empty,
         MaterialType = e.WGBEZ ?? string.Empty,
         OrgUnit = e.VBAK_ORGUNIT_T ?? string.Empty,
         OriginMatCode = SharedResource.NA ?? string.Empty,
         OtherInformation = e.VBAK_NAME ?? string.Empty,
         OuCode = e.VBAK_OUCODE ?? string.Empty,
         PersArea = e.VBAK_PERSAREA_T ?? string.Empty,
         Remarks = e.Remarks ?? string.Empty,
         LogMessage = e.LogMessage ?? string.Empty,
         SalaryNumber = Convert.ToInt32(DictionaryHelper.ConvertToIntegerSafeString(e.VBAK_PERNR2)),
         SerialNumber = e.VBAK_SERGE,
         SubArea = e.VBAK_SUBAREA_T ?? string.Empty,
         Type = e.ITEM_TYPE ?? string.Empty,
         ValidFrom = e.VBAK_BEDAT ?? string.Empty,
         ValidTo = e.VBAK_ENDAT ?? string.Empty,
         Year = Convert.ToInt32(DictionaryHelper.ConvertToIntegerSafeString(e.VBAK_EQ_YEAR)),
         ReasonForRejectionVM = !string.IsNullOrEmpty(e.VBAK_ABGRU_T)
             ? GenerateReasonForRejectionListViewModel().FirstOrDefault(f => f.CategoryName == e.VBAK_ABGRU_T)
                                ?? GenerateReasonForRejectionListViewModel().FirstOrDefault(f => f.CategoryName == SharedResource.SpaceChar)
                 : GenerateReasonForRejectionListViewModel().FirstOrDefault(f => f.CategoryName == SharedResource.SpaceChar)
     }));
 }
Beispiel #15
0
 public static RequestInfoHeadingViewModel GenerateRequestInfoMainViewModel()
 {
     return(new RequestInfoHeadingViewModel
     {
         CompanyListItems = new DropDownListViewModel
         {
             Sources = DictionaryHelper.ToSelectListItems(ScenarioNewContractResource.Trakindo,
                                                          ScenarioNewContractResource.Mahadasha)
         },
         RequestedviaListItems = new DropDownListViewModel
         {
             Sources = DictionaryHelper.ToSelectListItems(ScenarioNewContractResource.IdrWeb,
                                                          ScenarioNewContractResource.PoManual)
         },
         IssuedByListItems = DictionaryHelper.ToSelectListItems(ScenarioTerminationResource.SalesAdmin,
                                                                ScenarioTerminationResource.Warehouse,
                                                                ScenarioTerminationResource.Workshop,
                                                                ScenarioTerminationResource.Helpdesk)
     });
 }
Beispiel #16
0
        public static RequestInfoHeadingViewModel GenerateRequestInfoHeadingViewModel()
        {
            return(new RequestInfoHeadingViewModel
            {
                TerminationRequestInfoLineViewModels = new List <TerminationRequestInfoLineViewModel>(),

                DetailScenariosListItems = DictionaryHelper.ToSelectListItems(ScenarioTerminationResource.DbsService,
                                                                              ScenarioTerminationResource.EmailService,
                                                                              ScenarioTerminationResource.AdAccess,
                                                                              ScenarioTerminationResource.Extention,
                                                                              ScenarioTerminationResource.Others),

                IssuedByListItems = DictionaryHelper.ToSelectListItems(ScenarioTerminationResource.Helpdesk,
                                                                       ScenarioTerminationResource.Warehouse,
                                                                       ScenarioTerminationResource.Workshop,
                                                                       ScenarioTerminationResource.SalesAdmin),

                RequestedViaListItems = DictionaryHelper.ToSelectListItems(ScenarioTerminationResource.email,
                                                                           ScenarioTerminationResource.Telephone, ScenarioTerminationResource.Others),
            });
        }
Beispiel #17
0
        public static MaintainServiceRequestViewModel GenerateMaintainServiceRequestViewModel()
        {
            return(new MaintainServiceRequestViewModel()
            {
                SaStatusList = DictionaryHelper.ToSelectListItems(ServiceRequestResource.Checked, ServiceRequestResource.Unchecked),

                ReasonForRejection = DictionaryHelper.ToSelectListItems(ServiceRequestResource.BillingBlocked,
                                                                        ServiceRequestResource.TechnicalReason, ServiceRequestResource.CompletionOfContract, ServiceRequestResource.EquipmentRejection),

                RoutingStatusList = DictionaryHelper.ToSelectListItems(SharedResource.Completed,
                                                                       SharedResource.InProgress, SharedResource.NotStarted, SharedResource.Cancelled, SharedResource.RejectedBySa,
                                                                       SharedResource.RejectedByDivision),

                Scenarios = DictionaryHelper.ToSelectListItems(SharedResource.TransferAsset,
                                                               SharedResource.Termination, SharedResource.ReturnDevice, SharedResource.Broken, SharedResource.ErrorCharges,
                                                               SharedResource.NewContract, SharedResource.NewScenario),

                IssuedByListItems = DictionaryHelper.ToSelectListItems(SharedResource.Helpdesk,
                                                                       SharedResource.Warehouse, SharedResource.Workshop, SharedResource.SalesAdmin),
            });
        }
Beispiel #18
0
 public static CreateServiceRequestViewModel GenerateCreateServiceRequestViewModel()
 {
     return(new CreateServiceRequestViewModel()
     {
         IssuedByListItems = new ViewModels.Shared.DropDownListViewModel
         {
             Sources = DictionaryHelper.ToSelectListItems(SharedResource.Helpdesk,
                                                          SharedResource.Warehouse,
                                                          SharedResource.Workshop,
                                                          SharedResource.SalesAdmin)
         },
         Scenarios = new ViewModels.Shared.DropDownListViewModel
         {
             Sources = DictionaryHelper.ToSelectListItems(SharedResource.Termination,
                                                          SharedResource.ReturnDevice,
                                                          SharedResource.NewScenario,
                                                          SharedResource.NewContract,
                                                          SharedResource.ErrorCharges,
                                                          SharedResource.Broken,
                                                          SharedResource.TransferAsset)
         }
     });
 }
        public static PredefinedScenarioViewModel GeneratePredefinedScenarioViewModel(ScenarioType scenarioTypeChosen)
        {
            string chosenSubScenario;

            switch (scenarioTypeChosen)
            {
            case ScenarioType.TransferAssetsHolder:
            {
                chosenSubScenario = ScenarioTransferAssetsResource.Holder;
                break;
            }

            case ScenarioType.TransferAssetsLocation:
            {
                chosenSubScenario = ScenarioTransferAssetsResource.Location;
                break;
            }

            default:
            {
                chosenSubScenario = ScenarioTransferAssetsResource.Holder;
                break;
            }
            }
            return(new PredefinedScenarioViewModel
            {
                PredefinedScenario = DictionaryHelper.ToSelectListItems(SharedResource.TransferAsset,
                                                                        SharedResource.NewContract,
                                                                        SharedResource.Termination,
                                                                        SharedResource.ReturnDevice,
                                                                        SharedResource.Broken,
                                                                        SharedResource.NewScenario),
                SubPredefinedScenarioList = DictionaryHelper.ToSelectListItems(chosenSubScenario, true,
                                                                               ScenarioTransferAssetsResource.Holder,
                                                                               ScenarioTransferAssetsResource.Location)
            });
        }