Пример #1
0
        private void PopulateStaticControls()
        {
            cboJobState.DataSource = Enum.GetNames(typeof(eJobState));
            cboJobState.DataBind();
            cboJobState.SelectedValue = eJobState.ReadyToInvoice.ToString();

            // Invoice Sort Type
            rdoSortType.DataSource = Enum.GetNames(typeof(eInvoiceSortType));
            rdoSortType.DataBind();
            rdoSortType.Items[0].Selected = true;

            // Invoice Type
            rdoInvoiceType.Items.Add(new ListItem("Normal Invoice/Self Bill"));
            rdoInvoiceType.Items.Add(new ListItem("Sub Contractor"));
            //rdoInvoiceType.Items[0].Selected = true;

            if (m_IdentityId != 0)
            {
                //Get the Client name for id.
                Facade.IOrganisation facOrg = new Facade.Organisation();
                string name = facOrg.GetNameForIdentityId(m_IdentityId);

                cboClient.SelectedValue = m_IdentityId.ToString();
                cboClient.Text          = name;

                // Add client specific references to sort collection
                Facade.IOrganisationReference            facOrgRef = new Facade.Organisation();
                Entities.OrganisationReferenceCollection eOrf      = facOrgRef.GetReferencesForOrganisationIdentityId(m_IdentityId, true);

                foreach (Entities.OrganisationReference ocr in eOrf)
                {
                    rdoSortType.Items.Add(new ListItem(ocr.Description));
                }
            }
        }
Пример #2
0
        private void ConfigureClientReferences()
        {
            if (m_isUpdate)
            {
                // Populate the repeater control with the current reference fields
                Entities.OrganisationReferenceCollection clientReferences = new Entities.OrganisationReferenceCollection();
                foreach (Entities.JobReference reference in m_job.References)
                {
                    clientReferences.Add(reference.OrganisationReference);
                }

                repReferences.DataSource = clientReferences;
                repReferences.DataBind();
            }
            else
            {
                Facade.IOrganisationReference facOrganisationReference = new Facade.Organisation();
                m_clientReferences = facOrganisationReference.GetReferencesForOrganisationIdentityId(m_job.IdentityId, true);

                if (m_clientReferences != null)
                {
                    // Populate the repeater control with the required reference fields
                    repReferences.DataSource = m_clientReferences;
                    repReferences.DataBind();
                }
            }
        }
Пример #3
0
 private void GetReferences(int identityId)
 {
     Facade.IOrganisationReference facOrganisationReference = new Facade.Organisation();
     repReferences.DataSource = facOrganisationReference.GetReferencesForOrganisationIdentityId(identityId, true);
     repReferences.DataBind();
 }