Exemple #1
0
        internal void Init()
        {
            ManagerAmbalaj m = new ManagerAmbalaj();
            IList<Ambalaj> ambalaje = null;

            ambalaje = m.GetAmbalaje(rbToateAmbalajele.Checked);
            //log.Error("Multe anbalaje: " + ambalaje.Count);
            bindingSource1.DataSource = ambalaje;
            //dgrHale.Update(true);
            //bindingSource2_PositionChanged(this, null);
            bindingSource1_PositionChanged(this, null);
        }
        private void SetAmbalaje()
        {
            ManagerAmbalaj m = null;
            try
            {
                m = new ManagerAmbalaj();

                ambalaje = m.GetAmbalaje(false);
                ambalaje.Add(new Ambalaj("Toate ambalajele"));
                cmbAmbalaje.DataSource = ambalaje;
                cmbAmbalaje.DisplayMember = "Denumire";
                cmbAmbalaje.Text = "Toate ambalajele";
            }
            finally
            {
                m = null;
            }
        }