Ejemplo n.º 1
0
    protected void btnReset_Click(object sender, EventArgs e)
    {
        if (txtEmail.Text != "")
        {
            Affinity.Accounts        accs = new Affinity.Accounts(this.phreezer);
            Affinity.AccountCriteria c    = new Affinity.AccountCriteria();
            c.Email = txtEmail.Text;

            accs.Query(c);

            if (accs.Count > 0)
            {
                foreach (Affinity.Account ac in accs)
                {
                    string newPass = Com.Obviex.RandomPassword.Generate(6, 8);
                    ac.Password = newPass;
                    ac.SetPassword();
                    SendEmail(ac, newPass);
                }

                pnlReset.Visible   = false;
                pnlResults.Visible = true;
            }
            else
            {
                lblError.Visible = true;
                lblError.Text    = "The email specified was not found";
            }
        }
    }
Ejemplo n.º 2
0
    /// <summary>
    // This is called when the Re-Assign button is clicked and just shows the dropdown of possible user choices
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnReAssign_Click(object sender, EventArgs e)
    {
        this.RequirePermission(Affinity.RolePermission.AffinityManager);
        Affinity.Accounts        accts = new Affinity.Accounts(this.phreezer);
        Affinity.AccountCriteria ac    = new Affinity.AccountCriteria();
        ac.AppendToOrderBy("LastName");
        ac.AppendToOrderBy("FirstName");
        accts.Query(ac);

        ddNewOriginator.DataSource     = accts;
        ddNewOriginator.DataTextField  = "FullName";
        ddNewOriginator.DataValueField = "Id";
        try
        {
            ddNewOriginator.SelectedValue = this.order.OriginatorId.ToString();
        }
        catch (Exception ex)
        {
        }
        ddNewOriginator.DataBind();

        txtOriginator.Visible   = false;
        btnReAssign.Visible     = false;
        ddNewOriginator.Visible = true;
        btnDoReAssign.Visible   = true;
    }
Ejemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.RequirePermission(Affinity.RolePermission.AdminSystem);
        this.RequirePermission(Affinity.RolePermission.AffinityManager);
        this.Master.SetLayout("Manage Accounts", MasterPage.LayoutStyle.ContentOnly);

        Affinity.Accounts accs = new Affinity.Accounts(this.phreezer);
        Affinity.SearchAccountCriteria crit = new Affinity.SearchAccountCriteria();
        crit.AppendToOrderBy("Username");

        if (Request["srch"] != null && !Request["srch"].Equals(""))
        {
            string searchcriteria = Request["srch"];
            crit.FirstName = searchcriteria;
            crit.LastName  = searchcriteria;
            //crit. = searchcriteria;
            crit.Username = searchcriteria;
            crit.Email    = searchcriteria;
            crit.Company  = searchcriteria;
            crit.RoleCode = searchcriteria;
        }

        accs.Query(crit);

        aGrid.DataSource = accs;
        aGrid.DataBind();
    }
Ejemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.RequirePermission(Affinity.RolePermission.SubmitOrders);

        if (!Page.IsPostBack)
        {
            Affinity.Accounts        accts = new Affinity.Accounts(this.phreezer);
            Affinity.AccountCriteria ac    = new Affinity.AccountCriteria();
            ac.AppendToOrderBy("LastName");
            ac.AppendToOrderBy("FirstName");
            accts.Query(ac);

            ddNewOriginator.DataSource     = accts;
            ddNewOriginator.DataTextField  = "FullName";
            ddNewOriginator.DataValueField = "Id";

            ddNewOriginator.DataBind();
        }

        this.Master.SetLayout(this.header.InnerText, MasterPage.LayoutStyle.ContentOnly);
    }