コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public int AddTransactionByStudentId(int id, string source, double amount)
 {
     return(TransactionsDB.AddTransaction(CreateTransactionByStudentId(id, source, amount)).id);
 }