Exemplo n.º 1
0
 private void OpenfrmSale(object sender, EventArgs e)
 {
     _frmSales             = new FrmSales();
     _frmSales.FormClosed += FrmSalesClosed;
     _frmSales.Show();
     Hide();
 }
        private void tableProductSale_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                FrmSales frmSales = new FrmSales();

                /*frmSales.tableSales.Rows.Add(new string[] {
                 * Convert.ToString(tableProductSale[0, tableProductSale.CurrentRow.Index].Value),
                 * Convert.ToString(tableProductSale[1, tableProductSale.CurrentRow.Index].Value)
                 * });*/
            }
            catch (Exception ex)
            {
                MessageBox.Show("paso algo " + ex.Message);
            }

            /* foreach (DataGridViewRow row in tableProductSale.SelectedRows)
             * {
             *   String a,b;
             *   a = this.tableProductSale.CurrentRow.Cells["CODIGO"].Value.ToString();
             *   b = this.tableProductSale.CurrentRow.Cells["PRODUCTO"].Value.ToString();
             *   MessageBox.Show(a,b);
             *   FrmSales frmSales = new FrmSales();
             *   foreach (Form frm in Application.OpenForms)
             *   {
             *       if (frm.Name == "FrmSales")
             *       {
             *           MessageBox.Show("igual");
             *           frmSales = (FrmSales)frm;
             *           frmSales.dgvTableSale.Rows.Add(a,b);
             *           this.Close();
             *           break;
             *       }
             *       else { MessageBox.Show("no igual"); }
             *
             *   }
             *
             * }*/
        }
Exemplo n.º 3
0
 void FrmSalesClosed(object sender, FormClosedEventArgs e)
 {
     _frmSales.Dispose();
     _frmSales = null;
     Show();
 }
Exemplo n.º 4
0
        private void BtnSales_Click(object sender, EventArgs e)
        {
            FrmSales Sales = new FrmSales();

            Sales.ShowDialog();
        }