/// <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; }
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); }