Beispiel #1
0
 private void lstChannelList_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (this.lstChannelList.SelectedValue != null)
     {
         ComputerConfigFacade service = new ComputerConfigFacade(this);
         service.GetEditUsers(CPApplication.Current.CompanyCode, this.lstChannelList.SelectedValue.ToString(), (s, args) =>
         {
             if (args.FaultsHandle())
             {
                 return;
             }
             BindEditUsers(args.Result);
         });
     }
     else
     {
         BindEditUsers(null);
     }
 }
Beispiel #2
0
        public override void OnPageLoad(object sender, EventArgs e)
        {
            base.OnPageLoad(sender, e);
            //绑定查询区域中的渠道列表
            var channelList = CPApplication.Current.CurrentWebChannelList.ToList <UIWebChannel>();

            channelList.Insert(0, new UIWebChannel {
                ChannelName = ResCommonEnum.Enum_All
            });
            this.lstChannelList.ItemsSource = channelList;

            _queryVM = new ComputerConfigMasterQueryVM();
            this.GridFilter.DataContext = _queryVM;

            this.lstOwner.ItemsSource   = EnumConverter.GetKeyValuePairs <ComputerConfigOwner>(EnumConverter.EnumAppendItemType.All);
            this.lstStatus.ItemsSource  = EnumConverter.GetKeyValuePairs <ComputerConfigStatus>(EnumConverter.EnumAppendItemType.All);
            this.lstOwner.SelectedIndex = 1;

            ComputerConfigFacade service = new ComputerConfigFacade(this);

            service.GetAllConfigTypes((s, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                BindConfigTypes(args.Result);
            });

            service.GetEditUsers(CPApplication.Current.CompanyCode, "1", (s, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                BindEditUsers(args.Result);
            });
        }