//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);
     }
 }
 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);
     }
 }
 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);
     }
 }
        //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);
            }
        }