示例#1
0
 public LogControl(string UserName, string Password)
 {
     LogDBDataAccess = new DBControl(UserName, Password);
     LogStatus = false;
 }
示例#2
0
 public LogControl(string UserName, int UserID)
 {
     LogDBDataAccess = new DBControl(UserName, UserID);
     LogStatus = false;
 }
示例#3
0
        public CustomErrors Register(string FirstName, string LastName, string Email, string UserName, string PassWord)
        {
            CustomErrors retValue = new CustomErrors(false,"success");
            UserAccountDBAccess = new DBControl(UserName, PassWord);
            Tuple<int, CustomErrors> registrationStatus = UserAccountDBAccess.RegisterUser(FirstName, LastName, Email, UserName, PassWord);

            UserLog = new LogControl(UserName,PassWord);
            UserLog.Initialize();
            if (!registrationStatus.Item2.Status)
            {
                Username = UserName;
                Password = PassWord;
                retValue =UserLog.genereateNewLogFile(registrationStatus.Item1);

                if (retValue.Status && retValue.Code >= 20000000)//error 20000000 denotes log creation issue
                {
                    UserAccountDBAccess.deleteUser();
                }
            }

            return retValue;
        }