Exemple #1
0
 private void tlbMenu_NewClick()
 {
     try
     {
         frmRegInspectionCertificateEdit objManClient = new frmRegInspectionCertificateEdit();
         objManClient.lstInspectionCertificate = mLista;
         objManClient.pOperacion = frmRegInspectionCertificateEdit.Operacion.Nuevo;
         objManClient.IdInspectionCertificate = 0;
         objManClient.IdClient      = Convert.ToInt32(cboClient.EditValue);
         objManClient.StartPosition = FormStartPosition.CenterParent;
         objManClient.ShowDialog();
         Cargar();
     }
     catch (Exception ex)
     {
         XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemple #2
0
        public void InicializarModificar()
        {
            if (gvInspectionCertificate.RowCount > 0)
            {
                InspectionCertificateBE objInspectionCertificate = new InspectionCertificateBE();

                objInspectionCertificate.IdInspectionCertificate = int.Parse(gvInspectionCertificate.GetFocusedRowCellValue("IdInspectionCertificate").ToString());

                frmRegInspectionCertificateEdit objManInspectionCertificateEdit = new frmRegInspectionCertificateEdit();
                objManInspectionCertificateEdit.pOperacion = frmRegInspectionCertificateEdit.Operacion.Modificar;
                objManInspectionCertificateEdit.IdInspectionCertificate = objInspectionCertificate.IdInspectionCertificate;
                objManInspectionCertificateEdit.StartPosition           = FormStartPosition.CenterParent;
                objManInspectionCertificateEdit.ShowDialog();

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