コード例 #1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Accounts EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToAccounts(Account account)
 {
     base.AddObject("Accounts", account);
 }
コード例 #2
0
 /// <summary>
 /// Create a new Account object.
 /// </summary>
 /// <param name="userName">Initial value of the UserName property.</param>
 public static Account CreateAccount(global::System.String userName)
 {
     Account account = new Account();
     account.UserName = userName;
     return account;
 }
コード例 #3
0
 public void AddNewAccountMethod()
 {
     if ( this.UserName.Equals( "" ) || this.Password.Equals( "" ) || this.CurrentRole == null )
     {
         MessageBox.Show("Check your data");
         return;
     }
     else
         if ( accountRepos.CheckExist( this.UserName ) == false )
         {
             accountRepos.AddAccount( this.UserName, this.Password, this.CurrentRole.RoleID );
             Enrollment_DSS.Data.Entities.Account newAccount = new Enrollment_DSS.Data.Entities.Account();
             newAccount.UserName = this.UserName;
             newAccount.Password = this.Password;
             newAccount.Role = this.CurrentRole;
             newAccount.RoleID = this.CurrentRole.RoleID;
             MessageBox.Show( newAccount.UserName + " : " + newAccount.Password + " : " + newAccount.RoleID );
             FindAccount();
         }
         else
         {
             MessageBox.Show("This username was exits");
         }
 }