Exemple #1
0
        private void loadData()
        {
            Partner_list szall = new Partner_list(new SqlConnection(DEFS.ConSTR));
            szallitoBindingSource.Clear();

            foreach (var c in szall.lSzallitok)
            {
                szallitoBindingSource.Add(c);
            }

            dynComboBindingSource.Clear();

            StringEnum ct = new StringEnum(typeof(CimTipus));
            for (int cy = 0; cy <= Enum.GetValues(typeof(CimTipus)).Length - 1; cy++)
            {
                int value = (int)Enum.Parse(typeof(CimTipus), Enum.GetName(typeof(CimTipus), cy + 1));
                dynComboBindingSource.Add(new DynCombo(ct.GetStringValue(Enum.GetName(typeof(CimTipus), cy + 1)), value.ToString()));
            }

            dynComboBindingSource1.Clear();
            StringEnum mt = new StringEnum(typeof(MobilTipus));
            for (int cy = 0; cy <= Enum.GetValues(typeof(MobilTipus)).Length - 1; cy++)
            {

                int value = (int)Enum.Parse(typeof(MobilTipus), Enum.GetName(typeof(MobilTipus), cy + 1));
                dynComboBindingSource1.Add(new DynCombo(mt.GetStringValue(Enum.GetName(typeof(MobilTipus), cy + 1)), value.ToString()));
            }
        }
        private void frmMegrendelesArchivum_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'dsMegrendeles.MEGRENDELES_SOR' table. You can move, or remove it, as needed.
            this.mEGRENDELES_SORTableAdapter.Fill (this.dsMegrendeles.MEGRENDELES_SOR);
            // TODO: This line of code loads data into the 'dsMegrendeles.MEGRENDELES_FEJ' table. You can move, or remove it, as needed.

            dynComboBindingSource.Clear();
            StringEnum mt = new StringEnum(typeof(MegrendelesAllapot));
            for (int cy = 0; cy <= Enum.GetValues(typeof(MegrendelesAllapot)).Length - 1; cy++)
            {
                int value = (int)Enum.Parse(typeof(MegrendelesAllapot), Enum.GetName(typeof(MegrendelesAllapot), cy ));
                dynComboBindingSource.Add(new DynCombo(mt.GetStringValue(Enum.GetName(typeof(MegrendelesAllapot), cy )), value));
            }

            if (LoadType == LoadTypes.select)
            {
                // Az 1-ES LEZART kodúak jönnek csak fel ezeket lehet bevételezni.
                this.mEGRENDELES_FEJTableAdapter.FillArch(this.dsMegrendeles.MEGRENDELES_FEJ);
            }
            else
            {
                this.mEGRENDELES_FEJTableAdapter.Fill(this.dsMegrendeles.MEGRENDELES_FEJ);
            }
        }