コード例 #1
0
 private void tlbMenu_NewClick()
 {
     try
     {
         frmRegInvoiceEdit objManClient = new frmRegInvoiceEdit();
         objManClient.lstInvoice    = mLista;
         objManClient.pOperacion    = frmRegInvoiceEdit.Operacion.Nuevo;
         objManClient.IdInvoice     = 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);
     }
 }
コード例 #2
0
        public void InicializarModificar()
        {
            if (gvInvoice.RowCount > 0)
            {
                InvoiceBE objInvoice = new InvoiceBE();

                objInvoice.IdInvoice = int.Parse(gvInvoice.GetFocusedRowCellValue("IdInvoice").ToString());

                frmRegInvoiceEdit objManInvoiceEdit = new frmRegInvoiceEdit();
                objManInvoiceEdit.pOperacion    = frmRegInvoiceEdit.Operacion.Modificar;
                objManInvoiceEdit.IdInvoice     = objInvoice.IdInvoice;
                objManInvoiceEdit.StartPosition = FormStartPosition.CenterParent;
                objManInvoiceEdit.ShowDialog();

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