public static AD CreateUser(AD User)
        {
            AD inserted = ADDB.CreateUser(User);

            PaymentDB.CreatePayment(inserted.UserId);
            SAPHRDB.CreateSAPHR(inserted.UserId, inserted.Username);
            return(inserted);
        }
示例#2
0
        public bool TransferMoneyWithUID(int UID, decimal quota)
        {
            ISAPHRDB      sAPHRDB      = new SAPHRDB();
            ISAPHRManager sAPHRManager = new SAPHRManager(sAPHRDB);

            string username = sAPHRManager.GetUsernameByUID(UID);

            return(TransferMoneyWithUsername(username, quota));
        }
示例#3
0
        public Account GetAccountByUID(int UID)
        {
            ISAPHRDB      sAPHRDB      = new SAPHRDB();
            ISAPHRManager sAPHRManager = new SAPHRManager(sAPHRDB);

            string username = sAPHRManager.GetUsernameByUID(UID);

            if (username == null)
            {
                return(null);
            }

            return(GetAccountByUsername(username));
        }
示例#4
0
 public static int GetIdByUsername(string username)
 {
     return(SAPHRDB.GetIdByUsername(username));
 }