コード例 #1
0
        void wc_ws_selectDeviceWorkStatesCompleted(object sender, ws_selectDeviceWorkStatesCompletedEventArgs e)
        {
            if (e.Result != null)
            {
                WSt = e.Result;

                WSt.Description = this.uc_descripton;

                if (WSt.list_SCADAMessages.Count <= 0)
                {
                    dg_Root.Visibility = Visibility.Collapsed;
                    panel_NoInfo.Visibility = Visibility.Visible;
                }
                else
                {
                    dg_Root.Visibility = Visibility.Visible;
                    panel_NoInfo.Visibility = Visibility.Collapsed;
                }

                LayoutRoot.DataContext = WSt;

                if (box_ed.Items.Count >0)
                    box_ed.SelectedIndex = 0;
                
            }
            else
            {
                cwnd_ShitHappens w = new cwnd_ShitHappens(ErrorResources.err_SELECT, e.OpStatus.ToString());
                w.Show();
            }         
        }
コード例 #2
0
        public void uc_configure(int _id,string _description)
        {
            this.uc_PID = _id;
            this.uc_descripton = _description;

            WSt = new wsWorkState();          
            WSt.ID = _id;
            //WSt.setDefaults();
            wc.ws_selectDeviceWorkStatesAsync(uc_PID, WSt.startDate, WSt.finishDate);
        }
コード例 #3
0
ファイル: WService.svc.cs プロジェクト: undejavue/SITbusiness
 public wsWorkState ws_selectDeviceWorkStates(int id, DateTime beginDate,DateTime endDate, out string OpStatus)
 {
     try
     {
         wsWorkState WSt = new wsWorkState();
         WorkDataManager WDM = new WorkDataManager();
         WSt.list_SCADAMessages = WDM.selectDevWorkStates(id,beginDate,endDate);
         WSt.ID = id;
         WSt.startDate = beginDate;
         WSt.finishDate = endDate;
         WSt.list_StatesDurations = WDM.selectDevWorkStatesDuration(id, beginDate, endDate);
         OpStatus = "Выполнено";
         return WSt;
     }
     catch (Exception err)
     {
         OpStatus = err.ToString();
         return null;
     }
 }