public void CreateImportStaff(string userName, string currentUserName, string appID, string overrideID, ImportStaffDC dc, IRepository <ImportStaff> dataRepository, IUnitOfWork uow) { try { using (uow) { ImportStaff destination = Mapper.Map <ImportStaffDC, ImportStaff>(dc); dataRepository.Add(destination); uow.Commit(); } } catch (Exception e) { //Prevent exception from propogating across the service interface ExceptionManager.ShieldException(e); } }
public void DeleteImportStaff(string userName, string currentUserName, string appID, string overrideID, string code, string lockID, IRepository <ImportStaff> dataRepository, IUnitOfWork uow) { try { using (uow) { Guid codeGuid = Guid.Parse(code); ImportStaff dataEntity = dataRepository.Single(x => x.Code == codeGuid); dataRepository.Delete(dataEntity); uow.Commit(); } } catch (Exception e) { //Prevent exception from propogating across the service interface ExceptionManager.ShieldException(e); } }
public ImportStaffDC GetImportStaff(string userName, string currentUserName, string appID, string overrideID, string code, IRepository <ImportStaff> dataRepository, IUnitOfWork uow) { try { using (uow) { Guid codeGuid = Guid.Parse(code); ImportStaff dataEntity = dataRepository.Single(x => x.Code == codeGuid); ImportStaffDC destination = Mapper.Map <ImportStaff, ImportStaffDC>(dataEntity); return(destination); } } catch (Exception e) { //Prevent exception from propogating across the service interface ExceptionManager.ShieldException(e); return(null); } }
public static ImportStaff WithLocationID(this ImportStaff importStaff, Int32 locationID) { importStaff.LocationID = locationID; return(importStaff); }
public static ImportStaff WithCommandID(this ImportStaff importStaff, Int32 commandID) { importStaff.CommandID = commandID; return(importStaff); }
public static ImportStaff WithTeamID(this ImportStaff importStaff, Int32 teamID) { importStaff.TeamID = teamID; return(importStaff); }
public static ImportStaff WithGradeID(this ImportStaff importStaff, Int32 gradeID) { importStaff.GradeID = gradeID; return(importStaff); }
public static ImportStaff WithNetworkFirstName(this ImportStaff importStaff, String networkFirstName) { importStaff.NetworkFirstName = networkFirstName; return(importStaff); }
public static ImportStaff WithFirstName(this ImportStaff importStaff, String firstName) { importStaff.FirstName = firstName; return(importStaff); }
public static ImportStaff WithLastName(this ImportStaff importStaff, String lastName) { importStaff.LastName = lastName; return(importStaff); }
public static ImportStaff WithStaffNumber(this ImportStaff importStaff, String staffNumber) { importStaff.StaffNumber = staffNumber; return(importStaff); }
public static ImportStaff WithCode(this ImportStaff importStaff, Guid code) { importStaff.Code = code; return(importStaff); }
public static ImportStaff WithLeftIPC(this ImportStaff importStaff, DateTime leftIPC) { importStaff.LeftIPC = leftIPC; return(importStaff); }
public static ImportStaff WithNonIPC(this ImportStaff importStaff, Boolean nonIPC) { importStaff.NonIPC = nonIPC; return(importStaff); }