Example #1
0
 public FrmVurtualBiddersForRoutine(Routine routine, FrmRoutine father)
 {
     InitializeComponent();
     _routine                  = routine;
     _father                   = father;
     _newVirtualBidders        = new List <int>();
     _deletedVirtualBidders    = new List <int>();
     _availableVirtualBidders  = new List <int>();
     _registeredVirtualBidders = new List <int>();
 }
 public FrmFamiliesForRoutine(Routine routine, FrmRoutine father)
 {
     InitializeComponent();
     _routine            = routine;
     _father             = father;
     _newFamilies        = new List <int>();
     _deletedFamilies    = new List <int>();
     _availableFamilies  = new List <int>();
     _registeredFamilies = new List <int>();
 }
Example #3
0
 public FrmProductsForRoutine(Routine routine, FrmRoutine father)
 {
     InitializeComponent();
     _routine            = routine;
     _father             = father;
     _newProducts        = new List <int>();
     _deletedProducts    = new List <int>();
     _availableProducts  = new List <int>();
     _registeredProducts = new List <int>();
 }
Example #4
0
        private void dgvRoutines_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            var row = dgvRoutines.CurrentRow; //Obtiene la fila seleccionada

            if (row == null || row.Index == -1 || e.RowIndex == -1)
            {
                return;
            }

            //Obtiene los datos de la fila seleccioanda y la convierte a objeto de PRODUCTO
            var idRoutine = int.Parse(row.Cells[0].Value.ToString());

            var routine = Routine.GetRoutineById(idRoutine);

            var form = new FrmRoutine(routine, this); //Instancia un nuevo formulario para agregar productos

            form.Show();                              //Abre el formulario
        }
Example #5
0
        private void btnAddRoutines_Click(object sender, EventArgs e)
        {
            var childRoutines = new ChildMainRoutines();

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

            form.Show();
        }