Exemplo n.º 1
0
 //reload data from database
 private void Reload()
 {
     try
     {
         this.currentData    = new ObservableCollection <SYS_PARAMETER>();
         this.argumentClient = new ARGUMENTClient();
         this.argumentClient.GetByTopArgumentCompleted += new EventHandler <GetByTopArgumentCompletedEventArgs>(searchCompleted);
         this.argumentClient.DeleteArgumentCompleted   += new EventHandler <DeleteArgumentCompletedEventArgs>(deleteCompleted);
     }
     catch (Exception)
     {
         this.messagePop.SetSingleError(CommonResource.errorCannotConnectServer);
     }
 }
Exemplo n.º 2
0
 private void Load()
 {
     try
     {
         this.argumentClient  = new ARGUMENTClient();
         this.cmAllCodeClient = new CM_ALLCODEClient();
         this.cmAllCodeClient.CM_ALLCODE_ByIdAsync("DATA_TYPE", "PARA");
         this.cmAllCodeClient.CM_ALLCODE_ByIdCompleted += (s, e) =>
         {
             if (e.Result != null)
             {
                 this.DataType = e.Result;
                 this.OnPropertyChanged("DataType");
             }
         };
         this.argumentClient.UpdateArgumentCompleted  += new EventHandler <UpdateArgumentCompletedEventArgs>(updateCompleted);
         this.argumentClient.InsertArgumentCompleted  += new EventHandler <InsertArgumentCompletedEventArgs>(insetCompleted);
         this.argumentClient.ApproveArgumentCompleted += new EventHandler <ApproveArgumentCompletedEventArgs>(approveCompleted);
     }
     catch (Exception)
     {
         this.messagePop.SetSingleError(CommonResource.errorCannotConnectServer);
     }
 }
Exemplo n.º 3
0
 private void Load()
 {
     try
     {
         this.argumentClient = new ARGUMENTClient();
         this.cmAllCodeClient = new CM_ALLCODEClient();
         this.cmAllCodeClient.CM_ALLCODE_ByIdAsync("DATA_TYPE", "PARA");
         this.cmAllCodeClient.CM_ALLCODE_ByIdCompleted += (s, e) =>
         {
             if (e.Result != null)
             {
                 this.DataType = e.Result;
                 this.OnPropertyChanged("DataType");
             }
            
         };
         this.argumentClient.UpdateArgumentCompleted += new EventHandler<UpdateArgumentCompletedEventArgs>(updateCompleted);
         this.argumentClient.InsertArgumentCompleted += new EventHandler<InsertArgumentCompletedEventArgs>(insetCompleted);
         this.argumentClient.ApproveArgumentCompleted += new EventHandler<ApproveArgumentCompletedEventArgs>(approveCompleted);
     }
     catch (Exception)
     {
         this.messagePop.SetSingleError(CommonResource.errorCannotConnectServer);
     }
 }
Exemplo n.º 4
0
        //reload data from database
        private void Reload()
        {
            try
            {
                this.currentData = new ObservableCollection<SYS_PARAMETER>();
                this.argumentClient = new ARGUMENTClient();       
                this.argumentClient.GetByTopArgumentCompleted += new EventHandler<GetByTopArgumentCompletedEventArgs>(searchCompleted);
                this.argumentClient.DeleteArgumentCompleted += new EventHandler<DeleteArgumentCompletedEventArgs>(deleteCompleted);

            }
            catch (Exception)
            {
                this.messagePop.SetSingleError(CommonResource.errorCannotConnectServer);
            }
        }