Exemplo n.º 1
0
        private void BindData()
        {
            VendorItem objItem;

            objItem = new FlowManager.VendorItemFlow().GetItem(Convert.ToInt32(Request.QueryString["VendorID"]));

            //notes:    check collection status and bind to repeater
            if (objItem.StatusResult.ResponseStatusResult == Base.ResponseStatusResult.Success)
            {
                if (objItem != null)
                {
                    txtVendorID.Text = objItem.VendorID.ToString();
                    txtVendorName.Text = objItem.VendorName;
                    txtAddress.Text = objItem.Address;
                    txtCity.Text = objItem.City;
                    txtState.Text = objItem.State;
                    txtZip.Text = objItem.Zip.ToString();
                    txtPhone.Text = objItem.Phone;
                    txtEmail.Text = objItem.Email;
                    txtEliteVendorID.Text = objItem.EliteVendorID.ToString();
                    txtBilled.Text = objItem.Billed;
                    txtDelivered.Text = objItem.Delivered;
                    txtType.Text = objItem.Type;
                }
                else
                    this.DisplayPageMessage("No vendor data is available at this time.");
            }
            else
                this.DisplayPageMessage(objItem.StatusResult.Message);
        }
        private void BindResults()
        {
            VendorItemCollection objCollection;

            objCollection = new FlowManager.VendorItemFlow().GetCollection();

            //notes:    check collection status and bind to repeater
            if (objCollection.StatusResult.ResponseStatusResult == Base.ResponseStatusResult.Success)
            {
                if (objCollection.Count > 0)
                {
                    rptVendors.Visible = true;
                    rptVendors.DataSource = objCollection;
                    rptVendors.DataBind();
                }
                else
                    this.DisplayPageMessage("No vendors are available at this time.");
            }
            else
                this.DisplayPageMessage(objCollection.StatusResult.Message);
        }
        private void BindData(string subscriptionID)
        {
            if (subscriptionID != "" && subscriptionID != null)
            {
                SubscriptionItem objItem;
                objItem = new FlowManager.SubscriptionItemFlow().GetItem(Convert.ToInt32(subscriptionID));

                VendorItemCollection vendorList = new FlowManager.VendorItemFlow().GetCollection();
                ddlVendor.DataSource = vendorList;
                ddlVendor.DataValueField = "VendorID";
                ddlVendor.DataTextField = "VendorName";
                ddlVendor.DataBind();

                //notes:    check collection status and bind to repeater
                if (objItem.StatusResult.ResponseStatusResult == Base.ResponseStatusResult.Success)
                {
                    if (objItem != null)
                    {
                        txtSubscriptionID.Text = objItem.SubscriptionID.ToString();
                        txtPerson.Text = objItem.EmployeeName;
                        ddlVendor.SelectedValue = objItem.VendorID.ToString();
                        rbHome.Checked = objItem.HomeAddress ? true : false;
                        txtAddress.Text = objItem.Address;
                        txtCity.Text = objItem.City;
                        txtState.Text = objItem.State;
                        txtZip.Text = objItem.Zip.ToString();
                        txtAccountNumber.Text = objItem.AccountNumber.ToString();
                        txtBillingNumber.Text = objItem.BillingNumber.ToString();
                        txtStartDate.Text = objItem.StartDate.ToShortDateString();
                        txtEndDate.Text = objItem.EndDate.ToShortDateString();
                        txtPaid.Text = objItem.Paid;
                        txtNotes.Text = objItem.Notes;
                    }
                    else
                        this.DisplayPageMessage("No subscription data is available at this time.");
                }
                else
                    this.DisplayPageMessage(objItem.StatusResult.Message);
            }
        }