Exemplo n.º 1
0
 /// <summary>
 /// 获取所有模块定义后事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void fClient_GetModelFlowRelationInfosListBySearchCompleted(object sender, GetModelFlowRelationInfosListBySearchCompletedEventArgs e)
 {
     try
     {
         if (e.Error != null && e.Error.Message != "")
         {
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
                                            Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
         }
         else
         {
             if (e.Result != null)
             {
                 List <FLOW_MODELFLOWRELATION_T> dicts = Application.Current.Resources["SYS_FlowInfo"] as List <FLOW_MODELFLOWRELATION_T>;
                 if (dicts == null || dicts.Count == 0)
                 {
                     Application.Current.Resources.Add("SYS_FlowInfo", e.Result.ToList());
                 }
                 ModelFlowRelations = e.Result;
             }
             dtgProject.ItemsSource = ModelFlowRelations;
             dataPager.PageCount    = e.pageCount;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
     finally
     {
         loadbar.Stop();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 获取所有模块定义后事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void fClient_GetModelFlowRelationInfosListBySearchCompleted(object sender, GetModelFlowRelationInfosListBySearchCompletedEventArgs e)
 {
     try
     {
         if (e.Error != null && e.Error.Message != "")
         {
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
            Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
         }
         else                {
             if (e.Result != null)
             {
                 List<FLOW_MODELFLOWRELATION_T> dicts = Application.Current.Resources["SYS_FlowInfo"] as List<FLOW_MODELFLOWRELATION_T>;
                 if (dicts == null || dicts.Count == 0)
                 {
                     Application.Current.Resources.Add("SYS_FlowInfo", e.Result.ToList());
                 }
                 ModelFlowRelations = e.Result;
             }
             dtgProject.ItemsSource = ModelFlowRelations;
             dataPager.PageCount = e.pageCount;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
     finally
     {
         loadbar.Stop();
     }
 }