예제 #1
0
파일: Bitacora.cs 프로젝트: jsancvil/CES
        private void gvData_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                string id   = gvData.Rows[e.RowIndex].Cells["id"].FormattedValue.ToString();
                string tipo = gvData.Rows[e.RowIndex].Cells["tipo"].FormattedValue.ToString();

                if (tipo != "<===")
                {
                    EntradaAlta frm  = new EntradaAlta();
                    var         _frm = Application.OpenForms["EntradaAlta"] as EntradaAlta;
                    var         menu = Application.OpenForms["menu"] as Menu;
                    frm._idEntrada = int.Parse(id);
                    ofunciones.cargarForm(frm, null, menu);
                }
                else
                {
                    SalidaAlta frm  = new SalidaAlta();
                    var        _frm = Application.OpenForms["SalidaAlta"] as SalidaAlta;
                    var        menu = Application.OpenForms["menu"] as Menu;
                    frm._idSalida = int.Parse(id);
                    ofunciones.cargarForm(frm, null, menu);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #2
0
파일: Salidas.cs 프로젝트: jsancvil/CES
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            SalidaAlta frm  = new SalidaAlta();
            var        menu = Application.OpenForms["menu"] as Menu;
            var        _frm = Application.OpenForms["SalidaAlta"] as Control.SalidaAlta;

            ofunciones.cargarForm(frm, _frm, menu);
        }