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 FillAppendixe2()
        {
            cboAppendix2.Items.Clear();

            string[] orderBy = new string[] { "Appendix2Code" };
            ProductAppendix2Collection oA2List = ProductAppendix2.LoadCollection(orderBy, true);

            oA2List.Add(new ProductAppendix2());
            cboAppendix2.DataSource    = oA2List;
            cboAppendix2.DisplayMember = "Appendix2Code";
            cboAppendix2.ValueMember   = "Appendix2Id";
            cboAppendix2.SelectedIndex = cboAppendix2.Items.Count - 1;
        }
Exemple #3
0
        private Guid GetAppendix2Id(string a2Code)
        {
            string           sql = "Appendix2Initial = '" + a2Code + "'";
            ProductAppendix2 oA2 = ProductAppendix2.LoadWhere(sql);

            if (oA2 != null)
            {
                return(oA2.Appendix2Id);
            }
            else
            {
                return(System.Guid.Empty);
            }
        }
        private bool VerifyAppendix2(string appendix2)
        {
            bool result = false;

            string           sql = "Appendix2Code = '" + appendix2 + "'";
            ProductAppendix2 oA2 = ProductAppendix2.LoadWhere(sql);

            if (oA2 != null)
            {
                result = true;
            }

            return(result);
        }
Exemple #5
0
 private bool VerifyAppendix2()
 {
     if (cboAppendix2.Text.Trim().Length > 0)
     {
         string           sql = "Appendix2Code = '" + cboAppendix2.Text.Trim() + "'";
         ProductAppendix2 a2  = ProductAppendix2.LoadWhere(sql);
         if (a2 == null)
         {
             errorProvider.SetError(cboAppendix2, "The code is invalid! Try to select a value from the list!");
             return(false);
         }
         else
         {
             errorProvider.SetError(cboAppendix2, string.Empty);
             return(true);
         }
     }
     else
     {
         return(true);
     }
 }
Exemple #6
0
 public ProductAppendix2[] GetAppendix2ListByWhereClause(string whereClause)
 {
     return(ProductAppendix2.LoadCollection(whereClause).ToArray <ProductAppendix2>());
 }
Exemple #7
0
        public ProductAppendix2 GetAppendix2ByCode(string appendix2Code)
        {
            string query = "Appendix2Code = '" + appendix2Code + "'";

            return(ProductAppendix2.LoadWhere(query));
        }
Exemple #8
0
        public ProductAppendix2 GetAppendix2ById(string appendix2Id)
        {
            string query = "Appendix2Id = '" + appendix2Id + "'";

            return(ProductAppendix2.LoadWhere(query));
        }
Exemple #9
0
 public ProductAppendix2[] GetAllAppendix2()
 {
     return(ProductAppendix2.LoadCollection().ToArray <ProductAppendix2>());
 }
Exemple #10
0
 /// <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);
 }