コード例 #1
0
 private void tlbMenu_NewClick()
 {
     try
     {
         frmManTypeCertificateEdit objManTypeCertificate = new frmManTypeCertificateEdit();
         objManTypeCertificate.lstTypeCertificate = mLista;
         objManTypeCertificate.pOperacion         = frmManTypeCertificateEdit.Operacion.Nuevo;
         objManTypeCertificate.IdTypeCertificate  = 0;
         objManTypeCertificate.StartPosition      = FormStartPosition.CenterParent;
         objManTypeCertificate.ShowDialog();
         Cargar();
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
コード例 #2
0
        public void InicializarModificar()
        {
            if (gvTypeCertificate.RowCount > 0)
            {
                TypeCertificateBE objTypeCertificate = new TypeCertificateBE();

                objTypeCertificate.IdTypeCertificate = int.Parse(gvTypeCertificate.GetFocusedRowCellValue("IdTypeCertificate").ToString());

                frmManTypeCertificateEdit objManTypeCertificateEdit = new frmManTypeCertificateEdit();
                objManTypeCertificateEdit.pOperacion         = frmManTypeCertificateEdit.Operacion.Modificar;
                objManTypeCertificateEdit.IdTypeCertificate  = objTypeCertificate.IdTypeCertificate;
                objManTypeCertificateEdit.pTypeCertificateBE = objTypeCertificate;
                objManTypeCertificateEdit.StartPosition      = FormStartPosition.CenterParent;
                objManTypeCertificateEdit.ShowDialog();

                Cargar();
            }
            else
            {
                MessageBox.Show("No se pudo editar");
            }
        }