private void CargarElementoSeleccionado() { if (_currentRow != null) { String Accion = ""; Accion = (Convert.ToBoolean(_currentRow["Aplicado"]) == false) ? "Edit" : "View"; frmDocumentoInv ofrmDocumento = new frmDocumentoInv(Convert.ToInt32(_currentRow["IDTransaccion"]), Accion); // ofrmDocumento.MdiParent = this; ofrmDocumento.WindowState = FormWindowState.Normal; //ShowPagesRibbonMan(false); ofrmDocumento.Show(); } }
private void BtnAgregar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { //validar que el paquete este seleccionado if (this.slkupPaquete.EditValue != null) { DataRowView dr = (DataRowView)this.slkupPaquete.GetSelectedDataRow(); if (dr["Transaccion"].ToString() == "VT") { MessageBox.Show("No se puede crear un paquete de tipo venta desde el modulo de inventario"); return; } int IDPaquete = (int)this.slkupPaquete.EditValue; frmDocumentoInv ofrmDocumento = new frmDocumentoInv(IDPaquete); ofrmDocumento.ShowDialog(); } else { MessageBox.Show("Por favor seleccione un paquete, para poder agregar el documento."); } }