Exemplo n.º 1
0
        private void InitStorageList()
        {
            //InventoryFacade facade = new InventoryFacade(base.DataProvider);
            //object[] objStorage = facade.GetAllStorage();
            //drpStorageQuery.Items.Clear();
            //drpStorageQuery.Items.Add(new ListItem("", ""));
            //if (objStorage != null && objStorage.Length > 0)
            //{
            //    foreach (Storage storage in objStorage)
            //    {

            //        this.drpStorageQuery.Items.Add(new ListItem(
            //             storage.StorageCode + "-" + storage.StorageName, storage.StorageCode)
            //            );
            //    }
            //}
            //this.drpStorageQuery.SelectedIndex = 0;

            SystemSettingFacade systemSettingFacade = new SystemSettingFacade(this.DataProvider);
            UserFacade          userFacade          = new UserFacade(this.DataProvider);

            string[] usergroupList = userFacade.GetUserGroupCodeofUser(GetUserCode());//+TOSTORAGE
            this.drpStorageQuery.Items.Add(new ListItem("", ""));
            object[] parameters = systemSettingFacade.GetDistinctParaInParameterGroup(usergroupList);
            if (parameters != null)
            {
                foreach (Domain.BaseSetting.Parameter parameter in parameters)
                {
                    drpStorageQuery.Items.Add(new ListItem(parameter.ParameterCode + "-" + parameter.ParameterDescription, parameter.ParameterCode));
                }
            }
            this.drpStorageQuery.SelectedIndex = 0;
        }
Exemplo n.º 2
0
        private void InitStorageList()
        {
            SystemSettingFacade systemSettingFacade = new SystemSettingFacade(this.DataProvider);
            UserFacade          userFacade          = new UserFacade(this.DataProvider);

            string[] usergroupList = userFacade.GetUserGroupCodeofUser(GetUserCode());//+TOSTORAGE
            this.drpStorageQuery.Items.Add(new ListItem("", ""));

            object[] parameters = systemSettingFacade.GetDistinctParaInParameterGroup(usergroupList);
            if (parameters != null)
            {
                foreach (Domain.BaseSetting.Parameter parameter in parameters)
                {
                    drpStorageQuery.Items.Add(new ListItem(parameter.ParameterDescription, parameter.ParameterCode));
                }
            }
            this.drpStorageQuery.SelectedIndex = 0;
        }