Ejemplo n.º 1
0
        public ABCDConfigPage()
        {
            InitializeComponent();

            ListABCD      = new ObservableCollection <StatisticParamModel>();
            ListABCDItems = new List <StatisticalParamItem>();
            //mListABCD = new ObservableCollection<StatisticParam>();
            mListABCDItems = new ObservableCollection <StatisticalParamItemModel>();
            Statistic      = new StatisticParamModel();

            ListTransParams      = new List <string>();
            ComboxListWeekUnit   = new ObservableCollection <string>();
            ComboxListMonUnit    = new ObservableCollection <string>();
            ComboxListUpdateUnit = new ObservableCollection <string>();
            ComboxListYearUnit   = new ObservableCollection <string>();
            ComboxListCycleUnit  = new ObservableCollection <string>();
            ComboxListCycleTime  = new ObservableCollection <string>();

            Loaded += ABCDConfigPage_Loaded;

            this.ListBoxStatisticItems.ItemsSource = mListABCDItems;
            this.CombABCD.ItemsSource   = ListABCD;
            this.CycleUnit.ItemsSource  = ComboxListCycleUnit;
            this.UpdateUnit.ItemsSource = ComboxListUpdateUnit;
            this.CycleTime.ItemsSource  = ComboxListCycleTime;
            //    this.CBWeek.ItemsSource = ComboxListWeekUnit;
            //    this.CBMon.ItemsSource = ComboxListMonUnit;
        }
Ejemplo n.º 2
0
 void LBStatistical_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (this.LBStatistical.SelectedIndex != 0)
     {
         //选中要删除的大项
         DeleteStatisticParam = this.LBStatistical.SelectedItem as StatisticParamModel;
     }
 }
Ejemplo n.º 3
0
 private void InitListABCD()
 {
     try
     {
         WebRequest webRequest = new WebRequest();
         webRequest.Code    = (int)S3108Codes.GetABCDList;
         webRequest.Session = CurrentApp.Session;
         webRequest.ListData.Add("1");
         Service31081Client client = new Service31081Client(WebHelper.CreateBasicHttpBinding(CurrentApp.Session),
                                                            WebHelper.CreateEndpointAddress(CurrentApp.Session.AppServerInfo, "Service31081"));
         WebHelper.SetServiceClient(client);
         //Service31081Client client = new Service31081Client();
         WebReturn webReturn = client.DoOperation(webRequest);
         client.Close();
         if (!webReturn.Result)
         {
             ShowException(string.Format("InitListABCD Fail.\t{0}\t{1}", webReturn.Code, webReturn.Message));
             return;
         }
         for (int i = 0; i < webReturn.ListData.Count; i++)
         {
             OperationReturn optReturn = XMLHelper.DeserializeObject <StatisticParam>(webReturn.ListData[i]);
             if (!optReturn.Result)
             {
                 ShowException(string.Format("InitListABCD Fail.\t{0}\t{1}", optReturn.Code, optReturn.Message));
                 return;
             }
             StatisticParam StatisticP = optReturn.Data as StatisticParam;
             string         Name       = StatisticP.StatisticalParamID.ToString();
             Name = Name.Substring(Name.Length - 1);
             StatisticP.StatisticalParamName = CurrentApp.GetLanguageInfo(string.Format("FO3108010200{0}", Name), StatisticP.StatisticalParamName);
             StatisticP.Description          = CurrentApp.GetLanguageInfo(string.Format("FO3108010200{0}", Name), StatisticP.StatisticalParamName);
             if (StatisticP != null)
             {
                 Statistic = new StatisticParamModel(StatisticP);
                 //ListABCD.Add(Statistic);
                 Dispatcher.Invoke(new Action(() => { ListABCD.Add(Statistic); }));
             }
         }
     }
     catch (Exception ex)
     {
         ShowException(ex.Message);
     }
 }
Ejemplo n.º 4
0
        public override void ChangeLanguage()
        {
            base.ChangeLanguage();

            for (int i = 0; i < ListStatistical.Count(); i++)
            {
                StatisticParamModel temp = ListStatistical[i];
                if (i == 0)
                {
                    temp.StatisticalParamName = CurrentApp.GetLanguageInfo("310802001", "该机构所拥有的大项列表:");
                }
                else
                {
                    string code = temp.StatisticalParamID.ToString();
                    code = code.Substring(code.Length - 1);
                    temp.StatisticalParamName = CurrentApp.GetLanguageInfo(string.Format("FO3108010200{0}", code), "3108010200");
                }
            }
        }
Ejemplo n.º 5
0
        private void CombABCD_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            try
            {
                Statistic = this.CombABCD.SelectedItem as StatisticParamModel;
                if (Statistic != null)
                {
                    OperationCode = Statistic.StatisticalParamID.ToString();
                    InitListABCDItem();
                    InitmListABCDItems();//获取大项下的所有小项。

                    StatisticConfigDisplay();
                }
            }
            catch (Exception ex)
            {
                ShowException(ex.Message);
            }
        }