Esempio n. 1
0
 internal static VM_ListStaff VM_ListStaff_Add_Paging(VM_ListStaff vM_ListStaff, int thisPage, int totalPages)
 {
     logger.EnterMethod();
     try
     {
         vM_ListStaff.ThisPage   = thisPage;
         vM_ListStaff.TotalPages = totalPages;
         return(vM_ListStaff);
     }
     catch (Exception e)
     {
         logger.Error("Error: [" + e.Message + "]");
         return(vM_ListStaff);
     }
     finally
     {
         logger.LeaveMethod();
     }
 }
Esempio n. 2
0
 internal static VM_ListStaff ListStaff_To_VM_ListStaff(IEnumerable <Staff> listStaff)
 {
     logger.EnterMethod();
     try
     {
         VM_ListStaff vM_ListStaff = new VM_ListStaff();
         foreach (var item in listStaff)
         {
             var staff = Staff_To_VMStaff(item);
             vM_ListStaff.AllStaff.Add(staff);
         }
         return(vM_ListStaff);
     }
     catch (Exception e)
     {
         logger.Error("Error: [" + e.Message + "]");
         return(new VM_ListStaff());
     }
     finally
     {
         logger.LeaveMethod();
     }
 }
 internal static VM_ListStaff VM_ListStaffAddContactInformation(IEnumerable <VM_ContactInformation> listContactInformation, VM_ListStaff listStaff)
 {
     if (!listStaff.AllStaff.Count().Equals(listContactInformation.Count()))
     {
         return(listStaff);
     }
     for (int i = 0; i < listStaff.AllStaff.Count(); i++)
     {
         listStaff.AllStaff[i].ContactInformation = listContactInformation.ToList()[i];
     }
     return(listStaff);
 }