Esempio n. 1
0
 //reload data from database
 private void Load()
 {
     try
     {
         this.currentData     = new ObservableCollection <CM_ALLCODE_SearchResult>();
         this.CurrentItem     = new CM_ALLCODE_SearchResult();
         this.cmAllCodeClient = new CM_ALLCODEClient();
         this.ItemsData       = new List <ItemYesNo>()
         {
             new ItemYesNo()
             {
                 Id = "A", Name = CommonResource.lblApproved
             },
             new ItemYesNo()
             {
                 Id = "U", Name = CommonResource.lblDisApprove
             },
             new ItemYesNo()
             {
                 Id = "", Name = CommonResource.lblAll
             }
         };
         this.cmAllCodeClient.CM_ALLCODE_DelCompleted    += new EventHandler <CM_ALLCODE_DelCompletedEventArgs>(deleteCompleted);
         this.cmAllCodeClient.CM_ALLCODE_SearchCompleted += new EventHandler <CM_ALLCODE_SearchCompletedEventArgs>(searchComplete);
     }
     catch (Exception)
     {
         this.messagePop.SetSingleError(CommonResource.errorCannotConnectServer);
     }
 }
 private void Load()
 {
     try
     {
         this.cmAllCodeClient = new CM_ALLCODEClient();
         this.cmAllCodeClient.CM_ALLCODE_UpdCompleted += new EventHandler <CM_ALLCODE_UpdCompletedEventArgs>(updateCompleted);
         this.cmAllCodeClient.CM_ALLCODE_InsCompleted += new EventHandler <CM_ALLCODE_InsCompletedEventArgs>(insertCompleted);
     }
     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);
     }
 }
 private void Load()
 {
     try
     {               
         this.cmAllCodeClient = new CM_ALLCODEClient();                
         this.cmAllCodeClient.CM_ALLCODE_UpdCompleted += new EventHandler<CM_ALLCODE_UpdCompletedEventArgs>(updateCompleted);
         this.cmAllCodeClient.CM_ALLCODE_InsCompleted += new EventHandler<CM_ALLCODE_InsCompletedEventArgs>(insertCompleted);
     }
     catch (Exception)
     {
         this.messagePop.SetSingleError(CommonResource.errorCannotConnectServer);
     }
 }