private void dgvBitacoraComercial_CellClick(object sender, DataGridViewCellEventArgs e) { //DialogResult dialogResult = 0; try { if (e.ColumnIndex < 0) { return; } if (e.RowIndex == -1) { return; } if (dgvBitacoraComercial.Columns[e.ColumnIndex].Name == "btnAtender") { //dialogResult = MessageBox.Show("¿Seguro de atender el compromiso?", "Confirme", MessageBoxButtons.YesNo, MessageBoxIcon.Question); //if (dialogResult == DialogResult.Yes) //{ //DataSet dsBitacoraComercial = new DataSet(); //BitacoraComercialBE BitacoraComercialBE = new BitacoraComercialBE() //{ // OPCION = 5, // USUARIO = General.General.GetUsuario, // IdBitacoraComercial = dgvBitacoraComercial.CurrentRow.Cells["IdBitacoraComercial"].Value.ToString() //}; //new BitacoraComercialBL().ProcesarBitacoraComercial(BitacoraComercialBE); //MessageBox.Show("Se Proceso Correctamente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information); frmMntBitacoraComercialDato ofrm = new frmMntBitacoraComercialDato(); ofrm.Operacion = "M"; ofrm.OrigenAtender = 1; ofrm.IdBitacoraComercialGenerada = dgvBitacoraComercial.Rows[e.RowIndex].Cells["IdBitacoraComercial"].Value.ToString(); // dgvBitacoraComercial.CurrentRow.Cells["IdBitacoraComercial"].Value.ToString(); ofrm.Codigo = dgvBitacoraComercial.Rows[e.RowIndex].Cells["IdBitacoraComercial"].Value.ToString(); // dgvBitacoraComercial.CurrentRow.Cells["IdBitacoraComercial"].Value.ToString(); ofrm._IdSocio = dgvBitacoraComercial.Rows[e.RowIndex].Cells["IdSocio"].Value.ToString(); //dgvBitacoraComercial.CurrentRow.Cells["IdSocio"].Value.ToString(); ofrm._NombreSocio = dgvBitacoraComercial.Rows[e.RowIndex].Cells["vcSocio"].Value.ToString(); //dgvBitacoraComercial.CurrentRow.Cells["vcSocio"].Value.ToString(); ofrm._NombreGestor = cboEjecutivo.Text; ofrm._IdGestor = cboEjecutivo.SelectedValue.ToString(); ofrm.ShowDialog(); CargarBitacoraComercial(); //} } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnAgregarBitacoraComercial_Click(object sender, EventArgs e) { try { frmMntBitacoraComercialDato frm = new frmMntBitacoraComercialDato(); frm.Operacion = "N"; frm._IdSocio = Codigo; frm._NombreSocio = _NombreSocio; frm._IdGestor = _IdGestor; frm._NombreGestor = _NombreGestor; frm.ShowDialog(); CargarBitacoraComercial(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void dgvBitacoraComercial_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { if (dgvBitacoraComercial.RowCount > 0) { frmMntBitacoraComercialDato ofrm = new frmMntBitacoraComercialDato(); ofrm.Operacion = "M"; ofrm.Codigo = dgvBitacoraComercial.CurrentRow.Cells["IdBitacoraComercial"].Value.ToString(); ofrm._IdSocio = Codigo; ofrm._NombreSocio = _NombreSocio; ofrm._NombreGestor = _NombreGestor; ofrm._IdGestor = _IdGestor; ofrm.ShowDialog(); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }