Esempio n. 1
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (Utility.NoSpaceNotEmpty(txtUserPwd.Text))
        {
            WDSUser user = new WDSUser();
            user.ID = Request.QueryString["userid"] as string;
            user    = user.Read(user);

            if (txtUserPwd.Text == txtUserPwdConfirm.Text)
            {
                user.Password = txtUserPwd.Text;
                user.Salt     = user.CreateSalt(16);
                user.Update(user, user.ID);
                Master.Msgbox(Utility.Message);
            }
            else
            {
                Master.Msgbox("Passwords Did Not Match");
            }
        }
        else
        {
            Master.Msgbox("Password Cannot Be Empty Or Contain Spaces");
        }
    }
Esempio n. 2
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (Utility.NoSpaceNotEmpty(txtUserName.Text))
        {
            if (Utility.NoSpaceNotEmpty(txtUserPwd.Text))
            {
                WDSUser user = new WDSUser();
                if (txtUserPwd.Text == txtUserPwdConfirm.Text)
                {
                    Group group = new Group();
                    List<string> listGroupManagement = new List<string>();
                    foreach (GridViewRow row in gvGroups.Rows)
                    {
                        CheckBox cb = (CheckBox)row.FindControl("chkSelector");
                        if (cb != null && cb.Checked)
                            listGroupManagement.Add(gvGroups.DataKeys[row.RowIndex].Value.ToString());
                    }

                    user.GroupManagement = String.Join(" ", listGroupManagement);
                    user.Name = txtUserName.Text;
                    user.Password = txtUserPwd.Text;
                    user.Membership = ddluserMembership.Text;
                    user.Salt = user.CreateSalt(16);

                    if (permissions.Visible == true)
                    {
                        if (chkOnd.Checked)
                            user.OndAccess = "1";
                        else
                            user.OndAccess = "0";
                        if (chkDebug.Checked)
                            user.DebugAccess = "1";
                        else
                            user.DebugAccess = "0";
                        if (chkDiag.Checked)
                            user.DiagAccess = "1";
                        else
                            user.DiagAccess = "0";
                    }
                    else
                    {
                        user.OndAccess = "1";
                        user.DiagAccess = "1";
                        user.DebugAccess = "1";
                    }
                    user.Create(user);
                    Master.Msgbox(Utility.Message);
                }
                else
                    Master.Msgbox("Passwords Did Not Match");
            }
            else
                Master.Msgbox("Password Cannot Be Empty Or Contain Spaces");
        }
        else
            Master.Msgbox("Name Cannot Be Empty Or Contain Spaces");
    }
Esempio n. 3
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (Utility.NoSpaceNotEmpty(txtUserPwd.Text))
        {
            WDSUser user = new WDSUser();
            user.ID = Request.QueryString["userid"] as string;
            user = user.Read(user);

            if (txtUserPwd.Text == txtUserPwdConfirm.Text)
            {
                    user.Password = txtUserPwd.Text;
                    user.Salt = user.CreateSalt(16);
                    user.Update(user, user.ID);
                    Master.Msgbox(Utility.Message);
            }
            else
                Master.Msgbox("Passwords Did Not Match");
        }
        else
            Master.Msgbox("Password Cannot Be Empty Or Contain Spaces");
    }
Esempio n. 4
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (Utility.NoSpaceNotEmpty(txtUserName.Text))
        {
            if (Utility.NoSpaceNotEmpty(txtUserPwd.Text))
            {
                WDSUser user = new WDSUser();
                if (txtUserPwd.Text == txtUserPwdConfirm.Text)
                {
                    Group         group = new Group();
                    List <string> listGroupManagement = new List <string>();
                    foreach (GridViewRow row in gvGroups.Rows)
                    {
                        CheckBox cb = (CheckBox)row.FindControl("chkSelector");
                        if (cb != null && cb.Checked)
                        {
                            listGroupManagement.Add(gvGroups.DataKeys[row.RowIndex].Value.ToString());
                        }
                    }

                    user.GroupManagement = String.Join(" ", listGroupManagement);
                    user.Name            = txtUserName.Text;
                    user.Password        = txtUserPwd.Text;
                    user.Membership      = ddluserMembership.Text;
                    user.Salt            = user.CreateSalt(16);

                    if (permissions.Visible == true)
                    {
                        if (chkOnd.Checked)
                        {
                            user.OndAccess = "1";
                        }
                        else
                        {
                            user.OndAccess = "0";
                        }
                        if (chkDebug.Checked)
                        {
                            user.DebugAccess = "1";
                        }
                        else
                        {
                            user.DebugAccess = "0";
                        }
                        if (chkDiag.Checked)
                        {
                            user.DiagAccess = "1";
                        }
                        else
                        {
                            user.DiagAccess = "0";
                        }
                    }
                    else
                    {
                        user.OndAccess   = "1";
                        user.DiagAccess  = "1";
                        user.DebugAccess = "1";
                    }
                    user.Create(user);
                    Master.Msgbox(Utility.Message);
                }
                else
                {
                    Master.Msgbox("Passwords Did Not Match");
                }
            }
            else
            {
                Master.Msgbox("Password Cannot Be Empty Or Contain Spaces");
            }
        }
        else
        {
            Master.Msgbox("Name Cannot Be Empty Or Contain Spaces");
        }
    }