Ejemplo n.º 1
0
        private void FillClass5()
        {
            ProductClass5Ex.LoadCombo(ref cboClass5, "Class5Code", false, true, "", "");

            /**
             * cboClass5.Items.Clear();
             *
             * string[] orderBy = new string[] { "Class5Code" };
             * ProductClass5Collection oC5List = ProductClass5.LoadCollection(orderBy, true);
             * oC5List.Add(new ProductClass5());
             * cboClass5.DataSource = oC5List;
             * cboClass5.DisplayMember = "Class5Code";
             * cboClass5.ValueMember = "Class5Id";
             */
        }
Ejemplo n.º 2
0
        private void FillFromClass5List()
        {
            ProductClass5Ex.LoadCombo(ref cboClass5_From, "Class5Code", false, true, "", "");

            /**
             * cboClass5_From.Items.Clear();
             *
             * string[] orderBy = new string[] { "Class5Code" };
             * ProductClass5Collection prodCls5List = ProductClass5.LoadCollection(orderBy, true);
             * prodCls5List.Add(new ProductClass5());
             * cboClass5_From.DataSource = prodCls5List;
             * cboClass5_From.DisplayMember = "Class5Code";
             * cboClass5_From.ValueMember = "Class5Id";
             */
            cboClass5_From.SelectedIndex = cboClass5_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
            }
        }