Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.RequirePermission(Affinity.RolePermission.AdminSystem);
        this.RequirePermission(Affinity.RolePermission.AffinityManager);
        this.RequirePermission(Affinity.RolePermission.AffinityStaff);
        this.Master.SetLayout("Administration Dashboard", MasterPage.LayoutStyle.ContentOnly);


        Affinity.AttachmentPurposes        aps  = new Affinity.AttachmentPurposes(this.phreezer);
        Affinity.AttachmentPurposeCriteria crit = new Affinity.AttachmentPurposeCriteria();
        crit.AppendToOrderBy("Description");
        aps.Query(crit);

        aGrid.DataSource = aps;
        aGrid.DataBind();
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.RequirePermission(Affinity.RolePermission.SubmitOrders);
        this.Master.SetLayout("Upload File", MasterPage.LayoutStyle.ContentOnly);

        if (!Page.IsPostBack)
        {
            // populate the form
            Affinity.AttachmentPurposes        aps = new Affinity.AttachmentPurposes(this.phreezer);
            Affinity.AttachmentPurposeCriteria apc = new Affinity.AttachmentPurposeCriteria();
            aps.Query(apc);

            ddFilePurpose.DataSource     = aps;
            ddFilePurpose.DataTextField  = "Description";
            ddFilePurpose.DataValueField = "Code";
            //ddStatus.SelectedValue = null; //
            ddFilePurpose.SelectedValue = "Committment";
            ddFilePurpose.DataBind();
        }
    }
Ejemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.RequirePermission(Affinity.RolePermission.AdminSystem);
        this.Master.SetLayout("Administration", MasterPage.LayoutStyle.ContentOnly);

        if (!Page.IsPostBack)
        {
            // populate the form
            Affinity.RequestStatuss        codes = new Affinity.RequestStatuss(this.phreezer);
            Affinity.RequestStatusCriteria sc    = new Affinity.RequestStatusCriteria();
            codes.Query(sc);

            ddStatus.DataSource     = codes;
            ddStatus.DataTextField  = "Description";
            ddStatus.DataValueField = "Code";
            ddStatus.SelectedValue  = this.request.StatusCode;
            ddStatus.DataBind();

            Affinity.AttachmentPurposes        aps = new Affinity.AttachmentPurposes(this.phreezer);
            Affinity.AttachmentPurposeCriteria apc = new Affinity.AttachmentPurposeCriteria();
            aps.Query(apc);

            ddFilePurpose.DataSource     = aps;
            ddFilePurpose.DataTextField  = "Description";
            ddFilePurpose.DataValueField = "Code";
            //ddStatus.SelectedValue = null; //
            ddFilePurpose.SelectedValue = "Committment";
            ddFilePurpose.DataBind();

            txtId.Text              = request.Order.WorkingId;
            txtRequestId.Text       = this.request.Id.ToString();
            txtRequestTypeCode.Text = this.request.RequestTypeCode.ToString();
            txtOriginatorId.Text    = this.request.Account.FullName;
            txtCreated.Text         = this.request.Created.ToShortDateString();

            pnlIsCurrent.Visible = !this.request.IsCurrent;

            txtNote.Text = this.request.Note.ToString();


            lblWorkingId.Text        = request.Order.WorkingId;
            txtCustomerId.Text       = request.Order.CustomerId;
            txtClientName.Text       = request.Order.ClientName;
            txtPIN.Text              = request.Order.Pin;
            txtAdditionalPins.Text   = request.Order.AdditionalPins;
            txtPropertyAddress.Text  = request.Order.PropertyAddress;
            txtPropertyAddress2.Text = request.Order.PropertyAddress2;
            txtPropertyCity.Text     = request.Order.PropertyCity;
            txtPropertyState.Text    = request.Order.PropertyState;
            txtPropertyZip.Text      = request.Order.PropertyZip;
            txtCustomerId.Text       = request.Order.CustomerId;
            txtPropertyCounty.Text   = request.Order.PropertyCounty;
            txtClosingDate.Text      = request.Order.ClosingDate.ToShortDateString();
            txtPropertyUse.Text      = request.Order.PropertyUse;

            // changes
            Hashtable dif = request.GetDifference();
            if (dif.Count > 0)
            {
                foreach (string key in dif.Keys)
                {
                    pnlChanges.Controls.Add(new LiteralControl("<div class=\"line\"><div class=\"field horizontal\"><div class=\"label horizontal\">" + key + "</div><div class=\"input horizontal readonly\">" + dif[key].ToString() + "</div></div></div>"));
                }
            }
            else
            {
                pnlChanges.Controls.Add(new LiteralControl("<div class=\"line\"><em>No Changes</em></div>"));
            }
        }
    }