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 FillAppendixe3()
        {
            cboAppendix3.Items.Clear();

            string[] orderBy = new string[] { "Appendix3Code" };
            ProductAppendix3Collection oA3List = ProductAppendix3.LoadCollection(orderBy, true);

            oA3List.Add(new ProductAppendix3());
            cboAppendix3.DataSource    = oA3List;
            cboAppendix3.DisplayMember = "Appendix3Code";
            cboAppendix3.ValueMember   = "Appendix3Id";
            cboAppendix3.SelectedIndex = cboAppendix3.Items.Count - 1;
        }
Пример #3
0
        private Guid GetAppendix3Id(string a3Code)
        {
            string           sql = "Appendix3Initial = '" + a3Code + "'";
            ProductAppendix3 oA3 = ProductAppendix3.LoadWhere(sql);

            if (oA3 != null)
            {
                return(oA3.Appendix3Id);
            }
            else
            {
                return(System.Guid.Empty);
            }
        }
        private bool VerifyAppendix3(string appendix3)
        {
            bool result = false;

            string           sql = "Appendix3Code = '" + appendix3 + "'";
            ProductAppendix3 oA3 = ProductAppendix3.LoadWhere(sql);

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

            return(result);
        }
Пример #5
0
 private bool VerifyAppendix3()
 {
     if (cboAppendix3.Text.Trim().Length > 0)
     {
         string           sql = "Appendix3Code = '" + cboAppendix3.Text.Trim() + "'";
         ProductAppendix3 a3  = ProductAppendix3.LoadWhere(sql);
         if (a3 == null)
         {
             errorProvider.SetError(cboAppendix3, "The code is invalid! Try to select a value from the list!");
             return(false);
         }
         else
         {
             errorProvider.SetError(cboAppendix3, string.Empty);
             return(true);
         }
     }
     else
     {
         return(true);
     }
 }
Пример #6
0
 public ProductAppendix3[] GetAppendix3ListByWhereClause(string whereClause)
 {
     return(ProductAppendix3.LoadCollection(whereClause).ToArray <ProductAppendix3>());
 }
Пример #7
0
        public ProductAppendix3 GetAppendix3ByCode(string appendix3Code)
        {
            string query = "Appendix3Code = '" + appendix3Code + "'";

            return(ProductAppendix3.LoadWhere(query));
        }
Пример #8
0
        public ProductAppendix3 GetAppendix3ById(string appendix3Id)
        {
            string query = "Appendix3Id = '" + appendix3Id + "'";

            return(ProductAppendix3.LoadWhere(query));
        }
Пример #9
0
 public ProductAppendix3[] GetAllAppendix3()
 {
     return(ProductAppendix3.LoadCollection().ToArray <ProductAppendix3>());
 }
Пример #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);
 }