Ejemplo n.º 1
0
        private void FillClass1()
        {
            ProductClass1Ex.LoadCombo(ref cboClass1, "Class1Code", false, true, "", "Retired <> 1");

            /**
             * cboClass1.Items.Clear();
             *
             * string[] orderBy = new string[] { "Class1Code" };
             * ProductClass1Collection oC1List = ProductClass1.LoadCollection(orderBy, true);
             * oC1List.Add(new ProductClass1());
             * cboClass1.DataSource = oC1List;
             * cboClass1.DisplayMember = "Class1Code";
             * cboClass1.ValueMember = "Class1Id";
             */
        }
Ejemplo n.º 2
0
        private void FillFromClass1List()
        {
            ProductClass1Ex.LoadCombo(ref cboClass1_From, "Class1Code", false, true, "", "");

            /**
             * cboClass1_From.Items.Clear();
             *
             * string[] orderBy = new string[] { "Class1Code" };
             * ProductClass1Collection prodCls1List = ProductClass1.LoadCollection(orderBy, true);
             * prodCls1List.Add(new ProductClass1());
             * cboClass1_From.DataSource = prodCls1List;
             * cboClass1_From.DisplayMember = "Class1Code";
             * cboClass1_From.ValueMember = "Class1Id";
             */
            cboClass1_From.SelectedIndex = cboClass1_From.Items.Count - 1;
        }
Ejemplo n.º 3
0
 private void FillClasses()
 {
     /**
      * FillClass1();
      * FillClass2();
      * FillClass3();
      * FillClass4();
      * FillClass5();
      * FillClass6();
      */
     ProductClass1Ex.LoadCombo(ref cboClass1, "Class1Code", false, true, "", "");
     ProductClass2Ex.LoadCombo(ref cboClass2, "Class2Code", false, true, "", "");
     ProductClass3Ex.LoadCombo(ref cboClass3, "Class3Code", false, true, "", "");
     ProductClass4Ex.LoadCombo(ref cboClass4, "Class4Code", false, true, "", "");
     ProductClass5Ex.LoadCombo(ref cboClass5, "Class5Code", false, true, "", "");
     ProductClass6Ex.LoadCombo(ref cboClass6, "Class6Code", false, true, "", "");
 }
Ejemplo n.º 4
0
        private void FillComboBox()
        {
            string fieldText = this.ClassType.Trim() + "Code";

            switch (this.ClassType.Trim().ToUpper())
            {
            case "CLASS1":
                ProductClass1Ex.LoadCombo(ref cmbFrom, fieldText, false);
                ProductClass1Ex.LoadCombo(ref cmbTo, fieldText, false);
                break;

            case "CLASS2":
                ProductClass2Ex.LoadCombo(ref cmbFrom, fieldText, false);
                ProductClass2Ex.LoadCombo(ref cmbTo, fieldText, false);
                break;

            case "CLASS3":
                ProductClass3Ex.LoadCombo(ref cmbFrom, fieldText, false);
                ProductClass3Ex.LoadCombo(ref cmbTo, fieldText, false);
                break;

            case "CLASS4":
                ProductClass4Ex.LoadCombo(ref cmbFrom, fieldText, false);
                ProductClass4Ex.LoadCombo(ref cmbTo, fieldText, false);
                break;

            case "CLASS5":
                ProductClass5Ex.LoadCombo(ref cmbFrom, fieldText, false);
                ProductClass5Ex.LoadCombo(ref cmbTo, fieldText, false);
                break;

            case "CLASS6":
                ProductClass6Ex.LoadCombo(ref cmbFrom, fieldText, false);
                ProductClass6Ex.LoadCombo(ref cmbTo, fieldText, false);
                break;
            }

            cmbTo.SelectedIndex = cmbTo.Items.Count - 1;
        }
Ejemplo n.º 5
0
        private void FillParentClassList()
        {
            string sql;

            string[] orderBy;

            switch (_ClassMode)
            {
            case ProductHelper.Classes.Class1:
                #region fill Class1 combo
                sql     = "Class1Id NOT IN ('" + _ClassId.ToString() + "')";
                orderBy = new string[] { "Class1Code" };

                ProductClass1Ex.LoadCombo(ref cboParentClass, "Class1Code", false, true, "", sql, orderBy);
                ProductClass1Ex.LoadCombo(ref cboAltClass, "Class1Code", false, true, "", sql, orderBy);
                break;

                #endregion
            case ProductHelper.Classes.Class2:
                #region fill Class2 combo
                sql     = "Class2Id NOT IN ('" + _ClassId.ToString() + "')";
                orderBy = new string[] { "Class2Code" };

                ProductClass2Ex.LoadCombo(ref cboParentClass, "Class2Code", false, true, "", sql, orderBy);
                ProductClass2Ex.LoadCombo(ref cboAltClass, "Class2Code", false, true, "", sql, orderBy);
                break;

                #endregion
            case ProductHelper.Classes.Class3:
                #region fill Class3 combo
                sql     = "Class3Id NOT IN ('" + _ClassId.ToString() + "')";
                orderBy = new string[] { "Class3Code" };

                ProductClass3Ex.LoadCombo(ref cboParentClass, "Class3Code", false, true, "", sql, orderBy);
                ProductClass3Ex.LoadCombo(ref cboAltClass, "Class3Code", false, true, "", sql, orderBy);
                break;

                #endregion
            case ProductHelper.Classes.Class4:
                #region fill Class4 combo
                sql     = "Class4Id NOT IN ('" + _ClassId.ToString() + "')";
                orderBy = new string[] { "Class4Code" };

                ProductClass4Ex.LoadCombo(ref cboParentClass, "Class4Code", false, true, "", sql, orderBy);
                ProductClass4Ex.LoadCombo(ref cboAltClass, "Class4Code", false, true, "", sql, orderBy);
                break;

                #endregion
            case ProductHelper.Classes.Class5:
                #region fill Class5 combo
                sql     = "Class5Id NOT IN ('" + _ClassId.ToString() + "')";
                orderBy = new string[] { "Class5Code" };

                ProductClass5Ex.LoadCombo(ref cboParentClass, "Class5Code", false, true, "", sql, orderBy);
                ProductClass5Ex.LoadCombo(ref cboAltClass, "Class5Code", false, true, "", sql, orderBy);
                break;

                #endregion
            case ProductHelper.Classes.Class6:
                #region fill Class6 combo
                sql     = "Class6Id NOT IN ('" + _ClassId.ToString() + "')";
                orderBy = new string[] { "Class6Code" };

                ProductClass6Ex.LoadCombo(ref cboParentClass, "Class6Code", false, true, "", sql, orderBy);
                ProductClass6Ex.LoadCombo(ref cboAltClass, "Class6Code", false, true, "", sql, orderBy);
                break;
                #endregion
            }
        }