Beispiel #1
0
        public override void Initialize()
        {
            txtRuleName.Focus();
            using (new WaitCursorHelper(this))
            {
                try
                {
                    userBindingSource.DataSource = FwkMembership.GetAllUsers(frmAdmin.Provider.Name);
                    rolBindingSource.DataSource  = FwkMembership.GetAllRoles(frmAdmin.Provider.Name);

                    if (userBindingSource.Count == 0)
                    {
                        throw new Exception(string.Concat("La aplicaión ", frmAdmin.Provider.ApplicationName, " no contiene usuarios.-"));
                    }
                    if (rolBindingSource.Count == 0)
                    {
                        throw new Exception(string.Concat("La aplicaión ", frmAdmin.Provider.ApplicationName, " no contiene roles.-"));
                    }
                }
                catch (Exception es)
                {
                    throw es;
                }
            }

            if (this.State == Bases.EntityUpdateEnum.UPDATED)
            {
                label3.Text = "Update bussiness rule";
                //txtRuleName.Enabled = false;
            }
        }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public UserList GetAllUser()
        {
            // Se obtienen los usuarios de las memberships
            UserList pUserList = new UserList();

            pUserList.AddRange(FwkMembership.GetAllUsers(_ProviderName));

            return(pUserList);
        }
Beispiel #3
0
 public override void Initialize()
 {
     try
     {
         userList = FwkMembership.GetAllUsers(frmAdmin.Provider.Name);
     }
     catch (Exception ex)
     {
         base.MessageViewInfo.Show(Fwk.Exceptions.ExceptionHelper.GetAllMessageException(ex));
         return;
     }
     //userList = SecurityController.GetAllUsers(true).ToList<User>();
     userByAppBindingSource.DataSource = userList;
     gridView1.RefreshData();
 }
Beispiel #4
0
 private void btnCreateUser_Click(object sender, EventArgs e)
 {
     using (new WaitCursorHelper(this))
     {
         try
         {
             FwkMembership.CreateUser(_CurrentUser.LoginName, txtPassword.Text, String.Empty);
         }
         catch (Exception ex)
         {
             FwkMessageView.Show(ex, Properties.Resources.MessageBoxTitle, System.Windows.Forms.MessageBoxButtons.OK,
                                 Fwk.Bases.FrontEnd.Controls.MessageBoxIcon.Error);
         }
     }
     userByAppBindingSource.DataSource = FwkMembership.GetAllUsers(System.Web.Security.Membership.Provider.Name);
 }
Beispiel #5
0
 public frmTest()
 {
     InitializeComponent();
     //System.Web.Security.SqlMembershipProvider wSqlMembershipProvider = new System.Web.Security.SqlMembershipProvider();
     //wSqlMembershipProvider.ApplicationName =
     using (new WaitCursorHelper(this))
     {
         try
         {
             userByAppBindingSource.DataSource = FwkMembership.GetAllUsers(System.Web.Security.Membership.Provider.Name);
             rolListBindingSource.DataSource   = FwkMembership.GetAllRoles(System.Web.Security.Membership.Provider.Name);
         }
         catch (Exception ex)
         {
             FwkMessageView.Show(ex, Properties.Resources.MessageBoxTitle, MessageBoxButtons.OK, Fwk.Bases.FrontEnd.Controls.MessageBoxIcon.Error);
         }
     }
 }
Beispiel #6
0
 public List <User> GetAllUsers()
 {
     return(FwkMembership.GetAllUsers(ProviderName));
 }