private Transaction AddEmp(string line, WordReader wordReader) { var empId = wordReader.NextAsInt(); var name = wordReader.NextQuoted(); var address = wordReader.NextQuoted(); switch (wordReader.Next()) { case "H": return(AddHourlyEmployee(empId, name, address, wordReader)); case "S": return(AddSalariedEmployee(empId, name, address, wordReader)); case "C": return(AddCommissionedEmployee(empId, name, address, wordReader)); } throw new InvalidOperationException(string.Format("Cannot parse {0}", line)); }
private Transaction ChangeEmployeeName(int empId, WordReader wordReader) { return(_transactionFactory.MakeChangeNameTransaction(empId, wordReader.NextQuoted())); }
private Transaction ChangeMail(int empId, WordReader wordReader) { return(_transactionFactory.MakeChangeMailTransaction(empId, wordReader.NextQuoted())); }