예제 #1
0
        private void LoadData()
        {
            var query = from r in SystemHelper.TMSContext.SystemRoles
                        orderby r.Code
                        select r;

            lbRoles.DataSource = query;
            lbRoles.DisplayMember = "Name";
            lbRoles.ValueMember = "Code";

            if (CurrentSystemUser == null)
                CurrentSystemUser = new SystemUser();

            txtCode.Text = CurrentSystemUser.Code;
            txtName.Text = CurrentSystemUser.Name;
            txtPassword.Text = CurrentSystemUser.Password;
            SetSelectdRoles(CurrentSystemUser.Roles);
        }
예제 #2
0
 /// <summary>
 /// Create a new SystemUser object.
 /// </summary>
 /// <param name="systemUserID">Initial value of the SystemUserID property.</param>
 /// <param name="code">Initial value of the Code property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="password">Initial value of the Password property.</param>
 /// <param name="roles">Initial value of the Roles property.</param>
 /// <param name="deleted">Initial value of the Deleted property.</param>
 public static SystemUser CreateSystemUser(global::System.Int32 systemUserID, global::System.String code, global::System.String name, global::System.String password, global::System.String roles, global::System.Boolean deleted)
 {
     SystemUser systemUser = new SystemUser();
     systemUser.SystemUserID = systemUserID;
     systemUser.Code = code;
     systemUser.Name = name;
     systemUser.Password = password;
     systemUser.Roles = roles;
     systemUser.Deleted = deleted;
     return systemUser;
 }
예제 #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the SystemUsers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSystemUsers(SystemUser systemUser)
 {
     base.AddObject("SystemUsers", systemUser);
 }