示例#1
0
        void client_ImportSetMasterPagingCompleted(object sender, ImportSetMasterPagingCompletedEventArgs e)
        {
            List <T_HR_IMPORTSETMASTER> list = new List <T_HR_IMPORTSETMASTER>();

            if (e.Error != null && e.Error.Message != "")
            {
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                loadbar.Stop();
                ToolBar.btnRefresh.IsEnabled = true;
            }
            else
            {
                if (e.Result != null)
                {
                    list = e.Result.ToList();
                }
                dataMaster.ItemsSource = list;
                pageMaster.PageCount   = e.pageCount;
            }
            if (list.Count() > 0)
            {
                dataMaster.SelectedItems.Add(list[0]);
            }
            else
            {
                loadbar.Stop();
                ToolBar.btnRefresh.IsEnabled = true;
            }
        }
示例#2
0
 void client_ImportSetMasterPagingCompleted(object sender, ImportSetMasterPagingCompletedEventArgs e)
 {
     List<T_HR_IMPORTSETMASTER> list = new List<T_HR_IMPORTSETMASTER>();
     if (e.Error != null && e.Error.Message != "")
     {
         //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
         ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
        Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); 
         loadbar.Stop();
         ToolBar.btnRefresh.IsEnabled = true;
     }
     else
     {
         if (e.Result != null)
         {
             list = e.Result.ToList();
         }
         dataMaster.ItemsSource = list;
         pageMaster.PageCount = e.pageCount;
     }
     if (list.Count() > 0)
     {
         dataMaster.SelectedItems.Add(list[0]);
     }
     else
     {
         loadbar.Stop();
         ToolBar.btnRefresh.IsEnabled = true;
     }
 }