Beispiel #1
0
 /// <summary>
 /// 获取地区
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void client_GetAreaWithPagingCompleted(object sender, GetAreaWithPagingCompletedEventArgs e)
 {
     if (e.Error != null)
     {
         Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
         //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
         return;
     }
     else
     {
         if (e.Result != null)
         {
             DtGridArea.ItemsSource  = e.Result;
             areaDifference          = e.Result.ToList();
             dataPagerArea.PageCount = e.pageCount;
             if (this.selectedAreaDifference != null)
             {
                 DtGridArea.SelectedItem = selectedAreaDifference;
                 AreaID = selectedAreaDifference.AREADIFFERENCEID;
             }
             else
             {
                 AreaID = areaDifference.FirstOrDefault().AREADIFFERENCEID;
             }
             client.GetAreaAllowanceByAreaIDAsync(AreaID);
         }
     }
 }
Beispiel #2
0
 /// <summary>
 /// 获取地区
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void client_GetAreaWithPagingCompleted(object sender, GetAreaWithPagingCompletedEventArgs e)
 {
     try
     {
         if (e.Error != null)
         {
             Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
             return;
         }
         else
         {
             if (e.Result != null)
             {
                 DtGridArea.ItemsSource = e.Result;
                 areaDifference         = e.Result.ToList();
                 if (areaDifference != null && areaDifference.Count() > 0)
                 {
                     AreaID = areaDifference.FirstOrDefault().AREADIFFERENCEID;
                     this.RefreshUI(RefreshedTypes.ShowProgressBar);
                     client.GetAreaAllowanceByAreaIDAsync(AreaID, solutionsObj.TRAVELSOLUTIONSID);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
     finally
     {
         this.RefreshUI(RefreshedTypes.HideProgressBar);
     }
 }
Beispiel #3
0
 /// <summary>
 /// 获取地区
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void client_GetAreaWithPagingCompleted(object sender, GetAreaWithPagingCompletedEventArgs e)
 {
     if (e.Error != null)
     {
         ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
         return;
     }
     else
     {
         if (e.Result != null)
         {
             DtGridArea.ItemsSource  = e.Result;
             areaDifference          = e.Result.ToList();
             dataPagerArea.PageCount = e.pageCount;
             currentArea             = e.Result[0];
             LoadCity();
         }
     }
 }
Beispiel #4
0
 /// <summary>
 /// 获取地区
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void client_GetAreaWithPagingCompleted(object sender, GetAreaWithPagingCompletedEventArgs e)
 {
     if (e.Error != null)
     {
         Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
         return;
     }
     else
     {
         if (e.Result != null)
         {
             DtGridArea.ItemsSource = e.Result;
             areaDifference         = e.Result.ToList();
             //dataPagerArea.PageCount = e.pageCount;
             if (e.Result.Count() > 0)
             {
                 currentArea = e.Result[0];
             }
             LoadCity();
         }
     }
 }
Beispiel #5
0
 /// <summary>
 /// 获取地区
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void client_GetAreaWithPagingCompleted(object sender, GetAreaWithPagingCompletedEventArgs e)
 {
     try
     {
         if (e.Error != null)
         {
             Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
             return;
         }
         else
         {
             if (e.Result != null)
             {
                 DtGridArea.ItemsSource = e.Result;
                 areaDifference = e.Result.ToList();
                 if (areaDifference != null && areaDifference.Count() > 0)
                 {
                     AreaID = areaDifference.FirstOrDefault().AREADIFFERENCEID;
                     this.RefreshUI(RefreshedTypes.ShowProgressBar);
                     client.GetAreaAllowanceByAreaIDAsync(AreaID, solutionsObj.TRAVELSOLUTIONSID);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
     finally
     {
         this.RefreshUI(RefreshedTypes.HideProgressBar);
     }
 }
Beispiel #6
0
 /// <summary>
 /// 获取地区
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void client_GetAreaWithPagingCompleted(object sender, GetAreaWithPagingCompletedEventArgs e)
 {
     if (e.Error != null)
     {
         Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
         //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
         return;
     }
     else
     {
         if (e.Result != null)
         {
             DtGridArea.ItemsSource = e.Result;
             areaDifference = e.Result.ToList();
             dataPagerArea.PageCount = e.pageCount;
             if (this.selectedAreaDifference != null)
             {
                 DtGridArea.SelectedItem = selectedAreaDifference;
                 AreaID = selectedAreaDifference.AREADIFFERENCEID;
             }
             else
             {
                 AreaID = areaDifference.FirstOrDefault().AREADIFFERENCEID;
             }
             client.GetAreaAllowanceByAreaIDAsync(AreaID);
         }
     }
 }
Beispiel #7
0
 /// <summary>
 /// 获取地区
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void client_GetAreaWithPagingCompleted(object sender, GetAreaWithPagingCompletedEventArgs e)
 {
     if (e.Error != null)
     {
         ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"),Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
         return;
     }
     else
     {
         if (e.Result != null)
         {
             DtGridArea.ItemsSource = e.Result;
             areaDifference = e.Result.ToList();
             dataPagerArea.PageCount = e.pageCount;
             currentArea = e.Result[0];
             LoadCity();
         }
     }
 }
Beispiel #8
0
 /// <summary>
 /// 获取地区
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void client_GetAreaWithPagingCompleted(object sender, GetAreaWithPagingCompletedEventArgs e)
 {
     if (e.Error != null)
     {
         Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
         return;
     }
     else
     {
         if (e.Result != null)
         {
             DtGridArea.ItemsSource = e.Result;
             areaDifference = e.Result.ToList();
             //dataPagerArea.PageCount = e.pageCount;
             if (e.Result.Count() > 0)
             {
                 currentArea = e.Result[0];
             }
             LoadCity();
         }
     }
 }