Example #1
0
        void client_GetSalaryItemSetPagingCompleted(object sender, GetSalaryItemSetPagingCompletedEventArgs e)
        {
            List <T_HR_SALARYITEM> list = new List <T_HR_SALARYITEM>();

            if (e.Error != null)
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
            }
            else
            {
                if (e.Result != null)
                {
                    list = e.Result.ToList();
                }
                DtGrid.ItemsSource  = list;
                dataPager.PageCount = e.pageCount;
            }
            loadbar.Stop();
        }
        void client_GetSalaryItemSetPagingCompleted(object sender, GetSalaryItemSetPagingCompletedEventArgs e)
        {
            List <V_SALARYSOLUTIONITEM> VsolutionItems = new List <V_SALARYSOLUTIONITEM>();
            V_SALARYSOLUTIONITEM        vsolutionItem;

            salarySolutionItemsList = new ObservableCollection <T_HR_SALARYSOLUTIONITEM>();
            T_HR_SALARYSOLUTIONITEM salaryItem;

            if (e.Error == null)
            {
                if (e.Result != null)
                {
                    foreach (var item in e.Result.OrderBy(c => c.SALARYITEMCODE))
                    {
                        vsolutionItem = new V_SALARYSOLUTIONITEM();
                        vsolutionItem.SOLUTIONITEMID   = Guid.NewGuid().ToString();
                        vsolutionItem.SALARYITEMNAME   = item.SALARYITEMNAME;
                        vsolutionItem.SALARYSOLUTIONID = savesid;
                        vsolutionItem.ORDERNUMBER      = string.IsNullOrEmpty(item.SALARYITEMCODE)?0:decimal.Parse(item.SALARYITEMCODE);
                        VsolutionItems.Add(vsolutionItem);
                        salaryItem = new T_HR_SALARYSOLUTIONITEM();
                        salaryItem.SOLUTIONITEMID  = vsolutionItem.SOLUTIONITEMID;
                        salaryItem.T_HR_SALARYITEM = new T_HR_SALARYITEM();
                        salaryItem.T_HR_SALARYITEM.SALARYITEMID         = item.SALARYITEMID;
                        salaryItem.T_HR_SALARYSOLUTION                  = new T_HR_SALARYSOLUTION();
                        salaryItem.T_HR_SALARYSOLUTION.SALARYSOLUTIONID = savesid;
                        salarySolutionItemsList.Add(salaryItem);
                    }
                    DtGrid.ItemsSource  = VsolutionItems;
                    dataPager.PageCount = e.pageCount;
                }
                else
                {
                    DtGrid.ItemsSource = null;
                }
            }
            else
            {
                DtGrid.ItemsSource = null;
            }
            RefreshUI(RefreshedTypes.ProgressBar);
        }
Example #3
0
 void client_GetSalaryItemSetPagingCompleted(object sender, GetSalaryItemSetPagingCompletedEventArgs e)
 {
     List<T_HR_SALARYITEM> list = new List<T_HR_SALARYITEM>();
     if (e.Error != null)
     {
         ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
     }
     else
     {
         if (e.Result != null)
         {
             list = e.Result.ToList();
         }
         DtGrid.ItemsSource = list;
         dataPager.PageCount = e.pageCount;
     }
     loadbar.Stop();
 }
 void client_GetSalaryItemSetPagingCompleted(object sender, GetSalaryItemSetPagingCompletedEventArgs e)
 {
     List<V_SALARYSOLUTIONITEM> VsolutionItems = new List<V_SALARYSOLUTIONITEM>();
     V_SALARYSOLUTIONITEM vsolutionItem;
     salarySolutionItemsList = new ObservableCollection<T_HR_SALARYSOLUTIONITEM>();
     T_HR_SALARYSOLUTIONITEM salaryItem;
     if (e.Error == null)
     {
         if (e.Result != null)
         {
             foreach (var item in e.Result.OrderBy(c=>c.SALARYITEMCODE))
             {
                 vsolutionItem = new V_SALARYSOLUTIONITEM();
                 vsolutionItem.SOLUTIONITEMID = Guid.NewGuid().ToString();
                 vsolutionItem.SALARYITEMNAME = item.SALARYITEMNAME;
                 vsolutionItem.SALARYSOLUTIONID = savesid;
                 vsolutionItem.ORDERNUMBER = string.IsNullOrEmpty(item.SALARYITEMCODE)?0:decimal.Parse(item.SALARYITEMCODE);
                 VsolutionItems.Add(vsolutionItem);
                 salaryItem = new T_HR_SALARYSOLUTIONITEM();
                 salaryItem.SOLUTIONITEMID = vsolutionItem.SOLUTIONITEMID;
                 salaryItem.T_HR_SALARYITEM = new T_HR_SALARYITEM();
                 salaryItem.T_HR_SALARYITEM.SALARYITEMID = item.SALARYITEMID;
                 salaryItem.T_HR_SALARYSOLUTION = new T_HR_SALARYSOLUTION();
                 salaryItem.T_HR_SALARYSOLUTION.SALARYSOLUTIONID = savesid;
                 salarySolutionItemsList.Add(salaryItem);
             }
             DtGrid.ItemsSource = VsolutionItems;
             dataPager.PageCount = e.pageCount;
         }
         else
         {
             DtGrid.ItemsSource = null;
         }
     }
     else
     {
         DtGrid.ItemsSource = null;
     }
     RefreshUI(RefreshedTypes.ProgressBar);
 }