Esempio n. 1
0
        public static SelectList GetStickerCodeList()
        {
            IMaterialBLL materialBll = MvcApplication.GetInstance <MaterialBLL>();
            var          data        = materialBll.GetByFlagDeletion(false);

            return(new SelectList(data, "STICKER_CODE", "STICKER_CODE"));
        }
Esempio n. 2
0
        public static SelectList GetCutFillerCodeList(string plant = "")
        {
            IMaterialBLL materialBll = MvcApplication.GetInstance <MaterialBLL>();
            var          data        = materialBll.GetByFlagDeletion(false, plant);

            return(new SelectList(data, "STICKER_CODE", "STICKER_CODE"));
        }
Esempio n. 3
0
        public static SelectList GetCurrencyList()
        {
            IMasterDataBLL masterBll = MvcApplication.GetInstance <MasterDataBLL>();
            var            data      = masterBll.GetAllDataCurrency();

            return(new SelectList(data, "CURRENCY_ID", "CURRENCY_ID"));
        }
Esempio n. 4
0
        public static SelectList GetCountryList()
        {
            IMasterDataBLL masterBll = MvcApplication.GetInstance <MasterDataBLL>();
            var            data      = masterBll.GetAllDataCountry();

            return(new SelectList(data, "COUNTRY_CODE", "COUNTRY_CODE"));
        }
Esempio n. 5
0
        public static SelectList GetNppbkcByFlagDeletionList(bool isDeleted)
        {
            IZaidmExNPPBKCBLL nppbkcbll = MvcApplication.GetInstance <ZaidmExNPPBKCBLL>();
            var nppbkcList = nppbkcbll.GetByFlagDeletion(isDeleted);

            return(new SelectList(nppbkcList, "NPPBKC_ID", "NPPBKC_ID"));
        }
Esempio n. 6
0
        public static SelectList GetPlantByNppbkcImport(bool isNppbkcImport)
        {
            IPlantBLL    plantBll = MvcApplication.GetInstance <PlantBLL>();
            List <T001W> plantIdList;

            plantIdList = plantBll.GetAllPlant();
            plantIdList =
                plantIdList.Where(
                    x => x.IS_DELETED != true && x.ZAIDM_EX_NPPBKC != null && x.ZAIDM_EX_NPPBKC.IS_DELETED != true)
                .OrderBy(x => x.WERKS)
                .ToList();

            if (isNppbkcImport)
            {
                plantIdList =
                    plantIdList.Where(
                        x => x.IS_DELETED != true && x.ZAIDM_EX_NPPBKC != null && x.ZAIDM_EX_NPPBKC.IS_DELETED != true && x.NPPBKC_IMPORT_ID != null)
                    .OrderBy(x => x.WERKS)
                    .ToList();
            }

            var selectItemSource = Mapper.Map <List <SelectItemModel> >(plantIdList);

            return(new SelectList(selectItemSource, "ValueField", "TextField"));
        }
Esempio n. 7
0
        public static SelectList GetActiveSupplierPlantList()
        {
            IPlantBLL plantBll = MvcApplication.GetInstance <PlantBLL>();
            var       data     = plantBll.GetActivePlant();

            return(new SelectList(data, "WERKS", "DROPDOWNTEXTFIELD"));
        }
Esempio n. 8
0
        public static MultiSelectList GetVirtualPlantListMultiSelect()
        {
            IPlantBLL plantBll         = MvcApplication.GetInstance <PlantBLL>();
            var       data             = plantBll.GetAllPlant().Where(x => x.IS_DELETED != true);
            var       selectItemSource = Mapper.Map <List <SelectItemModelVirtualPlant> >(data);

            return(new MultiSelectList(selectItemSource, "ValueField", "TextField"));
        }
Esempio n. 9
0
        public static SelectList GetPbck1CompletedListByPlant(string plantId)
        {
            IPBCK1BLL pbck1 = MvcApplication.GetInstance <PBCK1BLL>();

            var data = pbck1.GetPbck1CompletedDocumentByPlant(plantId);

            return(new SelectList(data, "Pbck1Id", "Pbck1Number"));
        }
Esempio n. 10
0
        public static SelectList GetReversalInventoryMovementData(string plant, string facode)
        {
            IInventoryMovementService inventoryMovementBll = MvcApplication.GetInstance <InventoryMovementService>();
            var inventoryMovementList = inventoryMovementBll.GetReversalData(plant, facode);
            var selectItemSource      = Mapper.Map <List <SelectItemModel> >(inventoryMovementList);

            return(new SelectList(selectItemSource, "ValueField", "TextField"));
        }
Esempio n. 11
0
        public static MultiSelectList GetNppbkcMultiSelectList()
        {
            IZaidmExNPPBKCBLL nppbkcbll = MvcApplication.GetInstance <ZaidmExNPPBKCBLL>();
            var nppbkcList       = nppbkcbll.GetAll().Where(x => x.IS_DELETED != true);
            var selectItemSource = Mapper.Map <List <SelectItemModel> >(nppbkcList);

            return(new MultiSelectList(selectItemSource, "ValueField", "TextField"));
        }
Esempio n. 12
0
        public static SelectList GetPoaByNppbkcId(string nppbkcId)
        {
            IZaidmExPOAMapBLL poaMapBll = MvcApplication.GetInstance <ZaidmExPOAMapBLL>();
            var poaList          = poaMapBll.GetPOAByNPPBKCID(nppbkcId);
            var selectItemSource = Mapper.Map <List <SelectItemModel> >(poaList);

            return(new SelectList(selectItemSource, "ValueField", "TextField"));
        }
Esempio n. 13
0
        public static SelectList GetBrandList()
        {
            IBrandRegistrationBLL brandBLL = MvcApplication.GetInstance <BrandRegistrationBLL>();
            var data             = brandBLL.GetAll();
            var selectItemSource = Mapper.Map <List <SelectItemModel> >(data);

            return(new SelectList(selectItemSource, "ValueField", "TextField"));
        }
Esempio n. 14
0
        public static SelectList GetReversalData(string plant, string facode)
        {
            IZaapShiftRptService zaapBll = MvcApplication.GetInstance <ZaapShiftRptService>();
            var zaapList         = zaapBll.GetReversalData(plant, facode);
            var selectItemSource = Mapper.Map <List <SelectItemModel> >(zaapList);

            return(new SelectList(selectItemSource, "ValueField", "TextField"));
        }
Esempio n. 15
0
        public static SelectList GetUsers()
        {
            IUserBLL userBll          = MvcApplication.GetInstance <UserBLL>();
            var      users            = userBll.GetUsers();
            var      selectItemSource = Mapper.Map <List <SelectItemModel> >(users);

            return(new SelectList(selectItemSource, "ValueField", "TextField"));
        }
Esempio n. 16
0
        public static List <PageDto> GetModuleList()
        {
            IPageBLL pageBll = MvcApplication.GetInstance <PageBLL>();
            var      data    = pageBll.GetParentPages();
            var      result  = Mapper.Map <List <PageDto> >(data);

            return(result);
        }
Esempio n. 17
0
        public static SelectList GetBroleList()
        {
            IUserAuthorizationBLL userAuthorizationBll = MvcApplication.GetInstance <UserAuthorizationBLL>();
            var data             = userAuthorizationBll.GetAllBRole();
            var selectItemSource = Mapper.Map <List <SelectItemModel> >(data);

            return(new SelectList(selectItemSource, "ValueField", "TextField"));
        }
Esempio n. 18
0
        public static SelectList GetFaCodeByPlant(string plantId)
        {
            IBrandRegistrationBLL brandBll = MvcApplication.GetInstance <BrandRegistrationBLL>();
            var brandCe          = brandBll.GetBrandCeBylant(plantId);
            var selectItemSource = Mapper.Map <List <SelectItemModel> >(brandCe);

            return(new SelectList(selectItemSource, "ValueField", "TextField"));
        }
Esempio n. 19
0
        public static SelectList GetPlantByCompany(string companyId, bool isReverse = false)
        {
            IT001KBLL t001Kbll         = MvcApplication.GetInstance <T001KBLL>();
            var       plantList        = t001Kbll.GetPlantByCompany(companyId, isReverse);
            var       selectItemSource = Mapper.Map <List <SelectItemModel> >(plantList);

            return(new SelectList(selectItemSource, "ValueField", "TextField"));
        }
Esempio n. 20
0
        public static SelectList GetGoodTypeGroupListByDescValue()
        {
            IZaidmExGoodTypeBLL goodTypeBll = MvcApplication.GetInstance <ZaidmExGoodTypeBLL>();
            var goodTypes        = goodTypeBll.GetAll();
            var selectItemSource = Mapper.Map <List <SelectItemModel> >(goodTypes);

            // return new SelectList(selectItemSource, "ValueField", "TextField");
            return(new SelectList(goodTypes, "EXT_TYP_DESC", "EXT_TYP_DESC"));
        }
Esempio n. 21
0
        //public static SelectList GetKppBcCityList()
        //{
        //    IZaidmExNPPBKCBLL nppbkcBll = MvcApplication.GetInstance<ZaidmExNPPBKCBLL>();
        //    var data = nppbkcBll.GetAll().Where(x => x.IS_DELETED != true);
        //    return new SelectList(data, "KPPBC_ID", "CITY");
        //}

        public static SelectList GetGoodTypeGroupList()
        {
            ExGroupTypeBLL goodTypeBll      = MvcApplication.GetInstance <ExGroupTypeBLL>();
            var            goodTypes        = goodTypeBll.GetAll().Where(x => x.Inactive = false).ToList();
            var            selectItemSource = Mapper.Map <List <SelectItemModel> >(goodTypes);

            return(new SelectList(selectItemSource, "ValueField", "TextField"));
            //return new SelectList(goodTypes, "EXT_TYP_DESC", "EXT_TYP_DESC");
        }
Esempio n. 22
0
        //public static SelectList GetSourcePlantList()
        //{
        //    IPlantBLL plantBll = MvcApplication.GetInstance<PlantBLL>();
        //    var plant = plantBll.GetAll();
        //    var selectItemSource = Mapper.Map<List<SelectItemModel>>(plant);
        //    return new SelectList(selectItemSource, "ValueField", "TextField");

        //    //return new SelectList(sourcePlant, "NPPBCK_ID", "NAME1");
        //}

        public static SelectList GetPbck1CompletedList()
        {
            IPBCK1BLL pbck1 = MvcApplication.GetInstance <PBCK1BLL>();
            var       input = new Pbck1GetCompletedDocumentByParamInput();
            //var data = pbck1.GetAllByParam(input);
            var data = pbck1.GetCompletedDocumentByParam(input);

            return(new SelectList(data, "Pbck1Id", "Pbck1Number"));
        }
Esempio n. 23
0
        public static SelectList GetExternalSupplierList(Enums.CK5Type ck5Type)
        {
            ICK5BLL ck5Bll = MvcApplication.GetInstance <CK5BLL>();

            var data             = ck5Bll.GetExternalSupplierList(ck5Type);
            var selectItemSource = Mapper.Map <List <SelectItemModel> >(data);

            return(new SelectList(selectItemSource, "ValueField", "TextField"));
        }
Esempio n. 24
0
        public static SelectList GetCountryListCodeAndName()
        {
            IMasterDataBLL masterBll        = MvcApplication.GetInstance <MasterDataBLL>();
            var            data             = masterBll.GetAllDataCountry();
            var            selectItemSource = Mapper.Map <List <SelectItemModel> >(data);

            return(new SelectList(selectItemSource, "ValueField", "TextField"));
            //return new SelectList(data, "COUNTRY_CODE", "COUNTRY_CODE");
        }
Esempio n. 25
0
        public static SelectList GetCreatorList(object selectedValue = null)
        {
            //IPOABLL poaBll = MvcApplication.GetInstance<POABLL>();
            IUserBLL userBll = MvcApplication.GetInstance <UserBLL>();
            var      users   = userBll.GetUsers();
            //    new UserInput
            //{
            //    ListPoas = poaBll.GetAll()
            //});
            var selectItemSource = Mapper.Map <List <SelectItemModel> >(users);

            return(new SelectList(selectItemSource, "ValueField", "TextField", selectedValue));
        }
Esempio n. 26
0
        public static SelectList GetPersonalizationCodeList()
        {
            IMasterDataBLL masterBll  = MvcApplication.GetInstance <MasterDataBLL>();
            var            data       = masterBll.GetDataPersonalization().Where(x => x.IS_DELETED != true);
            var            selectList = from s in data
                                        select new SelectListItem
            {
                Value = s.PER_CODE,
                Text  = s.PER_CODE + "-" + s.PER_DESC
            };

            return(new SelectList(selectList, "Value", "Text"));
        }
Esempio n. 27
0
        public static SelectList GetConversionUomList()
        {
            IUnitOfMeasurementBLL uomBll = MvcApplication.GetInstance <UnitOfMeasurementBLL>();
            var data       = uomBll.GetAll().Where(x => x.IS_DELETED != true);
            var selectList = from s in data
                             select new SelectListItem
            {
                Value = s.UOM_ID,
                Text  = s.UOM_ID + "-" + s.UOM_DESC
            };

            return(new SelectList(selectList, "Value", "Text"));
        }
Esempio n. 28
0
        public static SelectList GetPlantByCompanyId(string companyId)
        {
            IPlantBLL    plantBll = MvcApplication.GetInstance <PlantBLL>();
            List <T001W> plantIdList;

            plantIdList = plantBll.GetAllPlant();
            plantIdList =
                plantIdList.Where(
                    x => x.IS_DELETED != true && x.ZAIDM_EX_NPPBKC != null && x.ZAIDM_EX_NPPBKC.IS_DELETED != true &&
                    x.T001K != null).Where(x => x.T001K.BUKRS == companyId)
                .OrderBy(x => x.WERKS)
                .ToList();
            var selectItemSource = Mapper.Map <List <SelectItemModel> >(plantIdList);

            return(new SelectList(selectItemSource, "ValueField", "TextField"));
        }
Esempio n. 29
0
        public static SelectList GetPlantByListUserPlant(List <string> listPlant)
        {
            IPlantBLL    plantBll = MvcApplication.GetInstance <PlantBLL>();
            List <T001W> plantIdList;

            plantIdList = plantBll.GetAllPlant();
            plantIdList =
                plantIdList.Where(
                    x => listPlant.Contains(x.WERKS) &&
                    x.IS_DELETED != true && x.ZAIDM_EX_NPPBKC != null &&
                    x.ZAIDM_EX_NPPBKC.IS_DELETED != true)
                .OrderBy(x => x.WERKS)
                .ToList();
            var selectItemSource = Mapper.Map <List <SelectItemModel> >(plantIdList);

            return(new SelectList(selectItemSource, "ValueField", "TextField"));
        }
Esempio n. 30
0
        public void SetLoginSession()
        {
            if (Session[Core.Constans.SessionKey.CurrentUser] == null)
            {
                var      userId  = User.Identity.Name.Split('\\')[User.Identity.Name.Split('\\').Length - 1]; //User.Identity.Name.Remove(0, 4);
                IUserBLL userBll = MvcApplication.GetInstance <UserBLL>();
                IPOABLL  poabll  = MvcApplication.GetInstance <POABLL>();
                IUserAuthorizationBLL userAuthorizationBll = MvcApplication.GetInstance <UserAuthorizationBLL>();
                var loginResult = userBll.GetLogin(userId);

                if (loginResult != null)
                {
                    //CurrentUser = loginResult;
                    loginResult.UserRole       = poabll.GetUserRole(loginResult.USER_ID);
                    loginResult.AuthorizePages = userAuthorizationBll.GetAuthPages(loginResult.USER_ID);
                    loginResult.NppbckPlants   = userAuthorizationBll.GetNppbckPlants(loginResult.USER_ID);
                    loginResult.ListUserPlants = new List <string>();
                    loginResult.ListUserNppbkc = new List <string>();
                    switch (loginResult.UserRole)
                    {
                    case Enums.UserRole.User:
                    case Enums.UserRole.Viewer:
                    case Enums.UserRole.Controller:
                        loginResult.ListUserPlants =
                            userAuthorizationBll.GetListPlantByUserId(loginResult.USER_ID);
                        loginResult.ListUserNppbkc =
                            userAuthorizationBll.GetListNppbkcByUserId(loginResult.USER_ID);
                        break;

                    case Enums.UserRole.POA:
                        loginResult.ListUserPlants = new List <string>();
                        foreach (var nppbkcPlantDto in loginResult.NppbckPlants)
                        {
                            foreach (var plantDto in nppbkcPlantDto.Plants)
                            {
                                loginResult.ListUserPlants.Add(plantDto.WERKS);
                            }
                        }
                        loginResult.ListUserNppbkc = loginResult.NppbckPlants.Select(c => c.NppbckId).ToList();
                        break;
                    }
                }
                Session[Core.Constans.SessionKey.CurrentUser] = loginResult;
            }
        }