public static LabGroup FromUpdateBudget(LabGroup original, double increaseAmount) { return(new LabGroup( original.Id, original.GroupNumber, original.Members, original.BudgetBalance + increaseAmount, original.Budget + increaseAmount, original.LabBenchId, original.LabCourseId, original.CheckedOut, original.Transactions, original.Status )); }
public static LabGroup FromUpdate(LabGroup original, LabGroupUpdate update) { return(new LabGroup( original.Id, update.GroupNumber, update.Members, update.BudgetBalance, update.Budget, update.LabBenchId, update.LabCourseId, original.CheckedOut, update.Transactions, update.Status )); }
public static LabGroup FromAddRemoveBench(LabGroup original, string benchId) { return(new LabGroup( original.Id, original.GroupNumber, original.Members, original.BudgetBalance, original.Budget, benchId, original.LabCourseId, original.CheckedOut, original.Transactions, original.Status )); }
public static LabGroupView FromGroup(LabGroup group) { return(new LabGroupView( group.Id, group.GroupNumber, group.Members, new List <string>(), group.BudgetBalance, group.Budget, group.LabBenchId, null, group.LabCourseId, null, group.CheckedOut, group.Transactions, group.Status )); }
public static LabGroup FromCheckOut(LabGroup original, string stockId) { List <string> checkedOut = original.CheckedOut; checkedOut.Add(stockId); return(new LabGroup( original.Id, original.GroupNumber, original.Members, original.BudgetBalance, original.Budget, original.LabBenchId, original.LabCourseId, checkedOut, original.Transactions, original.Status )); }