Exemple #1
0
        void dgJobs_ItemContentCreated(object sender, ComponentArt.Web.UI.GridItemContentCreatedEventArgs e)
        {
            int jobId = 0;

            jobId = Convert.ToInt32(e.Item["JobId"]);

            CheckBox chkIncludeJob1    = (CheckBox)e.Content.FindControl("chkIncludeJob");
            Repeater repDeliveryPoints = (Repeater)e.Content.FindControl("repDeliveryPoints");
            Repeater repReferences     = (Repeater)e.Content.FindControl("repReferences");

            if (repReferences != null)
            {
                // References
                Facade.IJobReference facJobReference = new Facade.Job();
                repReferences.DataSource = facJobReference.GetJobReferences(jobId);
                repReferences.DataBind();
            }

            if (repDeliveryPoints != null)
            {
                // Customers
                Facade.IJob facJobCustomer = new Facade.Job();
                DataSet     ds             = facJobCustomer.GetJobCustomers(jobId);
                repDeliveryPoints.DataSource = ds;
                repDeliveryPoints.DataBind();
            }
        }
Exemple #2
0
        private void dlJobSub_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                // References
                Facade.IJobReference facJobReference = new Facade.Job();

                LinkButton jobId = (LinkButton)e.Item.FindControl("lnkJobIdSub");

                Repeater repReferences = (Repeater)e.Item.FindControl("repReferencesSub");

                JobReferenceCollection jrc = facJobReference.GetJobReferences(Convert.ToInt32(jobId.Text));

                repReferences.DataSource = jrc;
                repReferences.DataBind();

                // Customers
                Facade.IJob facJobCustomer = new Facade.Job();

                Repeater repCustomers = (Repeater)e.Item.FindControl("repCustomersSub");

                DataSet ds = facJobCustomer.GetJobCustomers(Convert.ToInt32(jobId.Text));

                repCustomers.DataSource = ds;
                repCustomers.DataBind();
            }
        }
        private void dlJob_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                // These attributes are required by the "remember where I am" yellow highlight functionality.
                e.Item.Attributes.Add("onClick", "javascript:HighlightRow('" + e.Item.ClientID + "');");
                e.Item.Attributes.Add("id", e.Item.ClientID);

                // References
                Facade.IJobReference facJobReference = new Facade.Job();

                LinkButton jobId = (LinkButton)e.Item.FindControl("lnkJobId");
                jobId.Attributes.Add("OnClick", "javascript:openDialogWithScrollbars('../traffic/JobManagement.aspx?wiz=true&jobId=" + jobId.Text + "'+ getCSID());");

                Repeater repReferences = (Repeater)e.Item.FindControl("repReferences");

                JobReferenceCollection jrc = facJobReference.GetJobReferences(Convert.ToInt32(jobId.Text));

                repReferences.DataSource = jrc;
                repReferences.DataBind();

                // Customers
                Facade.IJob facJobCustomer = new Facade.Job();

                Repeater repCustomers = (Repeater)e.Item.FindControl("repCustomers");

                DataSet ds = facJobCustomer.GetJobCustomers(Convert.ToInt32(jobId.Text));

                repCustomers.DataSource = ds;
                repCustomers.DataBind();

                // Account On Hold Handling
                HtmlInputHidden hidOnHold = (HtmlInputHidden)e.Item.FindControl("hidOnHold");
                TextBox         txtBatch  = (TextBox)e.Item.FindControl("txtBatchNo");

                if (hidOnHold.Value != "False")
                {
                    txtBatch.Visible = false;
                }
                else
                {
                    txtBatch.Visible = true;
                }
            }
        }
        void dgJobs_ItemContentCreated(object sender, ComponentArt.Web.UI.GridItemContentCreatedEventArgs e)
        {
            int jobId = 0;

            jobId = Convert.ToInt32(e.Item["JobId"]);

            TextBox  txtBatchNo        = (TextBox)e.Content.FindControl("txtBatchNo");
            Repeater repDeliveryPoints = (Repeater)e.Content.FindControl("repDeliveryPoints");
            Repeater repReferences     = (Repeater)e.Content.FindControl("repReferences");

            if (txtBatchNo != null)
            {
                if (cboClient.SelectedValue != string.Empty)
                {
                    txtBatchNo.Enabled = true;
                }
                else
                {
                    txtBatchNo.Enabled = false;
                }
            }

            if (repReferences != null)
            {
                // References
                Facade.IJobReference facJobReference = new Facade.Job();
                repReferences.DataSource = facJobReference.GetJobReferences(jobId);
                repReferences.DataBind();
            }

            if (repDeliveryPoints != null)
            {
                // Customers
                Facade.IJob facJobCustomer = new Facade.Job();
                DataSet     ds             = facJobCustomer.GetJobCustomers(jobId);
                repDeliveryPoints.DataSource = ds;
                repDeliveryPoints.DataBind();
            }
        }