public int AddQuotaByUsername(string username, string source, int quota) { int studentId; try { studentId = StudentsManager.GetStudentByUsername(username); } catch (ApplicationException ex) { return(-1); } return(TransactionsDB.AddTransaction(CreateTransactionByStudentId(studentId, source, quota * PRICE_PER_PAGE_BW)).id); }
public int AddTransactionByStudentCardId(int cardid, string source, double amount) { int studentId; try { studentId = StudentsManager.GetStudentIdByCardId(cardid); } catch (ApplicationException ex) { return(-1); } return(TransactionsDB.AddTransaction(CreateTransactionByStudentId(studentId, source, amount)).id); }
public int AddTransactionByUsername(string username, string source, double amount) { int studentId; try { studentId = StudentsManager.GetStudentByUsername(username); } catch (ApplicationException ex) { return(-1); } return(TransactionsDB.AddTransaction(CreateTransactionByStudentId(studentId, source, amount)).id); }
public int AddTransactionByStudentId(int id, string source, double amount) { return(TransactionsDB.AddTransaction(CreateTransactionByStudentId(id, source, amount)).id); }