Пример #1
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            Agregar agregarPrestamo = new Agregar(null);

            Tag = "I";
            agregarPrestamo.BringToFront();
            agregarPrestamo.FormClosed += new FormClosedEventHandler(A_FormClosed);
            agregarPrestamo.Show();
        }
Пример #2
0
        private void tblPrestamosFilter_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex >= 0)
                {
                    CEAsignaciones asignacion = new CEAsignaciones
                    {
                        id             = Convert.ToInt32(tblPrestamosFilter.Rows[e.RowIndex].Cells["NUMERO"].Value),
                        documento      = tblPrestamosFilter.Rows[e.RowIndex].Cells["DOCUMENTO"].Value.ToString(),
                        nombreCompleto = tblPrestamosFilter.Rows[e.RowIndex].Cells["NOMBRES"].Value.ToString(),
                        fecha          = tblPrestamosFilter.Rows[e.RowIndex].Cells["FECHA"].Value.ToString(),
                        asiTeclado     = Convert.ToBoolean(tblPrestamosFilter.Rows[e.RowIndex].Cells["TECLADO"].Value),
                        asiMouse       = Convert.ToBoolean(tblPrestamosFilter.Rows[e.RowIndex].Cells["MOUSE"].Value),
                        asiPuesto      = Convert.ToBoolean(tblPrestamosFilter.Rows[e.RowIndex].Cells["PUESTO"].Value),
                        asiBase        = Convert.ToBoolean(tblPrestamosFilter.Rows[e.RowIndex].Cells["BASE"].Value),
                        asiMaletin     = Convert.ToBoolean(tblPrestamosFilter.Rows[e.RowIndex].Cells["MALETIN"].Value),
                        asiMorral      = Convert.ToBoolean(tblPrestamosFilter.Rows[e.RowIndex].Cells["MORRAL"].Value),
                        asiCorreo      = Convert.ToBoolean(tblPrestamosFilter.Rows[e.RowIndex].Cells["CORREO"].Value),
                        anulado        = Convert.ToBoolean(tblPrestamosFilter.Rows[e.RowIndex].Cells["ANULADO"].Value),
                        observacion    = tblPrestamosFilter.Rows[e.RowIndex].Cells["OBSERVACIONES"].Value.ToString(),
                        fechaModifi    = tblPrestamosFilter.Rows[e.RowIndex].Cells["FECHAMODIFI"].Value.ToString(),
                        usuarioModifi  = tblPrestamosFilter.Rows[e.RowIndex].Cells["USUMODIFI"].Value.ToString()
                    };

                    Agregar agregarPrestamo = new Agregar(asignacion);
                    agregarPrestamo.TopLevel = false;
                    agregarPrestamo.Dock     = DockStyle.None;
                    Controls.Add(agregarPrestamo);
                    Tag = "C";
                    agregarPrestamo.Location = new Point(50, 50);
                    agregarPrestamo.BringToFront();
                    agregarPrestamo.FormClosed += new FormClosedEventHandler(A_FormClosed);
                    agregarPrestamo.Show();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("" + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }