internal void addEquipmentListHours(Processing processing, DataTransfer dataTransfer) { //calculates the number of hours float hours = dataTransfer.hoursCalc(processing); //tests whether commercial and adds the existing number of hours if (dataTransfer.commercial) { float hoursSum = hours + Convert.ToSingle(processing.equipmentList[dataTransfer.posEquipment].EquipmentS[3]); processing.equipmentList[dataTransfer.posEquipment].EquipmentS[3] = Convert.ToString(hoursSum); } else { float hoursSum = hours + Convert.ToSingle(processing.equipmentList[dataTransfer.posEquipment].EquipmentS[1]); processing.equipmentList[dataTransfer.posEquipment].EquipmentS[1] = Convert.ToString(hoursSum); } }
/// <summary> /// Adds the hours at the specified position by posUser and posEquipment /// </summary> /// <param name="processing"></param> internal void addHours(Processing processing, DataTransfer dataTransfer, TestExist testExist) { //calculates hours float hours = dataTransfer.hoursCalc(processing); //test if there is already an entry at posUser,posEquipment testExist.testHourPosExists(processing, dataTransfer); //adds the hours variable to that given point hours = dataTransfer.sumHours(processing, hours); //sets the given coordinate to the hours output if (dataTransfer.commercial) { processing.projectListC[dataTransfer.posProjectC].UseageList[dataTransfer.posEquipment][dataTransfer.posUser] = Convert.ToString(hours); processing.commercialHour = processing.commercialHour + hours; } else { processing.projectList[dataTransfer.posProject].UseageList[dataTransfer.posEquipment][dataTransfer.posUser] = Convert.ToString(hours); processing.academicHours = processing.academicHours + hours; } }