private void FillAppendixe_To() { // Appendixe1 cboAppendix1_To.Items.Clear(); string[] orderBy = new string[] { "Appendix1Code" }; ProductAppendix1Collection oA1ListTo = ProductAppendix1.LoadCollection(orderBy, true); oA1ListTo.Insert(0, new ProductAppendix1()); cboAppendix1_To.DataSource = oA1ListTo; cboAppendix1_To.DisplayMember = "Appendix1Code"; cboAppendix1_To.ValueMember = "Appendix1Id"; cboAppendix1_To.SelectedIndex = oA1ListTo.Count - 1; // Appendixe2 cboAppendix2_To.Items.Clear(); orderBy = new string[] { "Appendix2Code" }; ProductAppendix2Collection oA2ListTo = ProductAppendix2.LoadCollection(orderBy, true); oA2ListTo.Insert(0, new ProductAppendix2()); cboAppendix2_To.DataSource = oA2ListTo; cboAppendix2_To.DisplayMember = "Appendix2Code"; cboAppendix2_To.ValueMember = "Appendix2Id"; cboAppendix2_To.SelectedIndex = oA2ListTo.Count - 1; // Appendixe3 cboAppendix3_To.Items.Clear(); orderBy = new string[] { "Appendix3Code" }; ProductAppendix3Collection oA3ListTo = ProductAppendix3.LoadCollection(orderBy, true); oA3ListTo.Insert(0, new ProductAppendix3()); cboAppendix3_To.DataSource = oA3ListTo; cboAppendix3_To.DisplayMember = "Appendix3Code"; cboAppendix3_To.ValueMember = "Appendix3Id"; cboAppendix3_To.SelectedIndex = oA3ListTo.Count - 1; }
private void FillAppendixe1() { cboAppendix1.Items.Clear(); string[] orderBy = new string[] { "Appendix1Code" }; ProductAppendix1Collection oA1List = ProductAppendix1.LoadCollection(orderBy, true); oA1List.Add(new ProductAppendix1()); cboAppendix1.DataSource = oA1List; cboAppendix1.DisplayMember = "Appendix1Code"; cboAppendix1.ValueMember = "Appendix1Id"; cboAppendix1.SelectedIndex = cboAppendix1.Items.Count - 1; }
private Guid GetAppendix1Id(string a1Code) { string sql = "Appendix1Initial = '" + a1Code + "'"; ProductAppendix1 oA1 = ProductAppendix1.LoadWhere(sql); if (oA1 != null) { return(oA1.Appendix1Id); } else { return(System.Guid.Empty); } }
private bool VerifyAppendix1(string appendix1) { bool result = false; string sql = "Appendix1Code = '" + appendix1 + "'"; ProductAppendix1 oA1 = ProductAppendix1.LoadWhere(sql); if (oA1 != null) { result = true; } return(result); }
private bool VerifyAppendix1() { if (cboAppendix1.Text.Trim().Length > 0) { string sql = "Appendix1Code = '" + cboAppendix1.Text.Trim() + "'"; ProductAppendix1 a1 = ProductAppendix1.LoadWhere(sql); if (a1 == null) { errorProvider.SetError(cboAppendix1, "The code is invalid! Try to select a value from the list!"); return(false); } else { errorProvider.SetError(cboAppendix1, string.Empty); return(true); } } else { return(true); } }
public ProductAppendix1[] GetAppendix1ListByWhereClause(string whereClause) { return(ProductAppendix1.LoadCollection(whereClause).ToArray <ProductAppendix1>()); }
public ProductAppendix1 GetAppendix1ByCode(string appendix1Code) { string query = "Appendix1Code = '" + appendix1Code + "'"; return(ProductAppendix1.LoadWhere(query)); }
public ProductAppendix1 GetAppendix1ById(string appendix1Id) { string query = "Appendix1Id = '" + appendix1Id + "'"; return(ProductAppendix1.LoadWhere(query)); }
public ProductAppendix1[] GetAllAppendix1() { return(ProductAppendix1.LoadCollection().ToArray <ProductAppendix1>()); }
/// <summary> /// Fills the appendix. /// </summary> private void FillAppendix() { ProductAppendix1.LoadCombo(ref cboAppendix1, "Appendix1Code", false, true, string.Empty, string.Empty); ProductAppendix2.LoadCombo(ref cboAppendix2, "Appendix2Code", false, true, string.Empty, string.Empty); ProductAppendix3.LoadCombo(ref cboAppendix3, "Appendix3Code", false, true, string.Empty, string.Empty); }