Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with combo box in Windows form
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Problem with combo box in Windows form
Versions des environnements
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01175922
Message ID:
01175922
Vues:
48
I create a business object for invoices with 2 tables: Invoice (default) and InvoiceList. I also have a business object for stores. My form has a combo box for stores, which populates correctly. The combo box for invoices uses the table invoicelist as its binding source. It should have the invoices for all the stores at start up but it is not loading at all.

What I want to happen is that when the user selects a store, only the invoices related to that store will appear on the pull down. Currently, when I select a store, the hourglass comes up and the program locks up. I have indexes set on the VFP tables. I set a break point in the SelectedIndexChanged method but the debugger never reaches that.

The properties for the invoice drop down list are set as follows:
BindingSource Invoice
BindingSourceDisplayMember InvoiceList.InvoiceNo
BindingSourceValueMember InvoiceList.InvoiceNo

I have done something similar in ASP.Net that worked correctly. Any ideas what the problem might be or where to look next?


Here is the code.
using OakLeaf.MM.Main;
using OakLeaf.MM.Main.Windows.Forms;
using ESK.DataUploadSystem.Business;


namespace ESK.InvoiceUploadSystem.Windows
{
    /// <summary>
    /// Summary description for ViewInvoices
    /// </summary>
    public partial class ViewInvoices : mmBusinessForm
    {
        private Stores oStores;
        private Invoice oInvoice;
        private DataSet dsInvoices;
        
        /// <summary>
        /// Constructor
        /// </summary>
        public ViewInvoices()
        {
            //Get data for drop down lists
            this.oStores = (Stores)this.RegisterBizObj(new Stores());
            this.oInvoice = (Invoice)this.RegisterPrimaryBizObj(new Invoice());
            oStores.GetAllStores();
            oInvoice.GetUniqueInvoices("*");

            InitializeComponent();
        }

        private void ddlStoreNo_SelectedIndexChanged(object sender, EventArgs e)
        {
            oInvoice.GetUniqueInvoices(this.ddlStoreNo.Text.ToString());
            this.ddlInvoiceNo.Refresh();
        }

        private void ddlInvoiceNo_SelectedIndexChanged(object sender, EventArgs e)
        {
            oInvoice.GetInvoiceByInvoiceNo(this.ddlInvoiceNo.Text.ToString());
            this.grdInvoice.Refresh();
        }


    }
}
Thanks.
Linda Harmes
HiBit Technologies, Inc.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform