Esempio n. 1
0
        public bool create()
        {
            bool userSuccess = UserDA.getInstance().addToDatabase(this);

            Security.Secure userSensitive = new Security.Secure();
            userSensitive.Username = this.userName;
            userSensitive.Password = Security.Cryptography.Encrypt("1234");
            bool secureSuccess = Security.SecureDA.getInstance().addToDatabase(userSensitive);

            return(userSuccess && secureSuccess);
        }
Esempio n. 2
0
        public void viewUserData(string userName)
        {
            modelUser = UserDA.getInstance().readFromDatabase(userName);

            if (modelUser != null)
            {
                viewUser.UserName.Text = modelUser.UserName;
                viewUser.RealName.Text = modelUser.Name;
                viewUser.UserPermissions.SelectedIndex = modelUser.Permissions;
                viewUser.UserRating.Text         = modelUser.UserRating;
                viewUser.UserPredecessor.Text    = modelUser.Predecessor;
                viewUser.UserMonthlyRevenue.Text = modelUser.MonthlyRevnue.ToString();
                viewUser.UserNotes.Text          = modelUser.Notes;
            }
            else
            {
                //MessageBox.Show("No User with ID " + this.selectedUserName);
                //this.Close();
            }
        }
Esempio n. 3
0
        //Chamil

        public string[] getSuccesors()
        {
            return(UserDA.getInstance().getSuccesors((Security.Permissions) this.permissions, this.userName));
        }
Esempio n. 4
0
 //Chamil
 public List <String> getPredecessorList()
 {
     return(UserDA.getInstance().getPredecessorList(permissions));
 }
Esempio n. 5
0
 public bool update()
 {
     return(UserDA.getInstance().updateToDatabase(this));
 }
Esempio n. 6
0
 //chamil
 public List <string> getPredecessors()
 {
     return(UserDA.getInstance().getPredecessorList(viewUser.UserPermissions.SelectedIndex));
 }