Пример #1
0
 private void btnnuevo_Click(object sender, EventArgs e)
 {
     using (FrmVTipo_Existencia tipoExistencia = new FrmVTipo_Existencia())
     {
         tipoExistencia.StartPosition        = FormStartPosition.CenterParent;
         tipoExistencia.btnguardar.Visible   = true;
         tipoExistencia.btnmodificar.Visible = false;
         tipoExistencia.ShowDialog();
         Show_TipoExist();
     }
 }
Пример #2
0
        private void btneditar_Click(object sender, EventArgs e)
        {
            if (Dgv_tipoExist.Rows.Count <= 0)
            {
                Msg.M_warning("Seleccione una Fila para poder modificar");
                return;
            }


            using (FrmVTipo_Existencia tipoExistencia = new FrmVTipo_Existencia())
            {
                tipoExistencia.StartPosition     = FormStartPosition.CenterParent;
                tipoExistencia.txtidTipoDoc.Text = Dgv_tipoExist.CurrentRow.Cells[0].Value.ToString();
                tipoExistencia.txtcodDoc.Text    = Dgv_tipoExist.CurrentRow.Cells[1].Value.ToString();
                tipoExistencia.txtDescDoc.Text   = Dgv_tipoExist.CurrentRow.Cells[2].Value.ToString();

                tipoExistencia.btnmodificar.Visible = true;
                tipoExistencia.btnguardar.Visible   = false;
                tipoExistencia.txtDescDoc.Focus();
                tipoExistencia.ShowDialog();

                Show_TipoExist();
            }
        }