Beispiel #1
0
        private void frmProductColor_Load(object sender, EventArgs e)
        {
            try
            {
                this.ActiveControl = txtSearch;
                clsSilex.UpDateProduct();
                UpdateTableProducts();

                DeactivateTexts();
                stPro.DataByGroup(101);
                stPro.RemoveLastItem();
                stPro.RemoveLastItem();
                stPro.RemoveLastItem();
                stFil.DataByGroup(101);

                cboStatus.DisplayMember = "DataDesc_fra";
                cboStatus.ValueMember   = "DataValue";
                cboStatus.DataSource    = stPro.Elements;

                cboFilter.DisplayMember = "DataDesc_fra";
                cboFilter.ValueMember   = "DataValue";
                cboFilter.DataSource    = stFil.Elements;

                lstPro.AllProducts(txtSearch.Text, cboFilter.SelectedValue);
                LinkListProducts();

                cboFilter.SelectedIndex = 5;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Beispiel #2
0
        private void UpdateTableProducts()
        {
            clsListProduct giPro   = new clsListProduct();
            clsListProduct sxPro   = new clsListProduct();
            int            counter = 0;

            giPro.AllProducts();
            sxPro.AllSXProducts();
            foreach (clsProduct ele in sxPro.Elements)
            {
                if (!giPro.Exists(ele))
                {
                    counter++;
                    ele.InsertGIProduct();
                }
            }
            if (counter > 0)
            {
                MessageBox.Show(counter + " products ont été mises à jour");
            }
        }