private void FillClass6() { ProductClass6Ex.LoadCombo(ref cboClass6, "Class6Code", false, true, "", ""); /** * cboClass6.Items.Clear(); * * string[] orderBy = new string[] { "Class6Code" }; * ProductClass6Collection oC6List = ProductClass6.LoadCollection(orderBy, true); * oC6List.Add(new ProductClass6()); * cboClass6.DataSource = oC6List; * cboClass6.DisplayMember = "Class6Code"; * cboClass6.ValueMember = "Class6Id"; */ }
private void FillFromClass6List() { ProductClass6Ex.LoadCombo(ref cboClass6_From, "Class6Code", false, true, "", ""); /** * cboClass6_From.Items.Clear(); * * string[] orderBy = new string[] { "Class6Code" }; * ProductClass6Collection prodCls6List = ProductClass6.LoadCollection(orderBy, true); * prodCls6List.Add(new ProductClass6()); * cboClass6_From.DataSource = prodCls6List; * cboClass6_From.DisplayMember = "Class6Code"; * cboClass6_From.ValueMember = "Class6Id"; */ cboClass6_From.SelectedIndex = cboClass6_From.Items.Count - 1; }
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, "", ""); }
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; }
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 } }