Пример #1
0
        private readonly List <int> _deletedProducts;   //Productos de los registrados a eliminar


        public FrmFamily(ChildMainFamily family)
        {
            InitializeComponent();
            _edit              = false;
            this._father       = family;
            _productRegistered = new List <int>();
            _productsAvailable = new List <int>();
            _newProducts       = new List <int>();
            _deletedProducts   = new List <int>();
        }
Пример #2
0
        private void btnAddFamily_Click(object sender, EventArgs e)
        {
            var childFamilies = new ChildMainFamily();

            if (pnlDashboard.Controls.Count > 0)                                   //Si el panel principal contiene un Formulario hijo
            {
                if (pnlDashboard.Controls[0].GetType() != typeof(ChildMainFamily)) //Si el tipo de formulario es diferente a ChildMenuProducts
                {
                    OpenChildForm(childFamilies);                                  //Agrega un nuevo formulario de childMenuProducts
                }
                else
                {
                    childFamilies = (ChildMainFamily)pnlDashboard.Controls[0];
                }
            }
            else
            {
                OpenChildForm(childFamilies);
            }
            var form = new FrmFamily(childFamilies);

            form.Show();
        }