private void btnNuevo_Click(object sender, EventArgs e) { try { frmCatalogoP_quirog p = new frmCatalogoP_quirog(); p.tablaConsultar = "p_edocta"; p.enviar2 = rellenarDatos; p.ShowDialog(); string folio = txtfolio.Text; if (string.IsNullOrWhiteSpace(folio)) { return; } string query = $"select count(folio) as cantidad from datos.d_fondo where folio = {folio}"; int cantidad = Convert.ToInt32(globales.consulta(query)[0]["cantidad"]); if (cantidad > 0) { MessageBox.Show("Ya existe captura de este folio en la base de datos", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); limpiarCampos(); return; } this.insertar = true; this.ActiveControl = txtfechadevolucion; } catch { MessageBox.Show("Error, btnnuevo_click", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void button1_Click_2(object sender, EventArgs e) { frmCatalogoP_quirog p_quirog = new frmCatalogoP_quirog(); p_quirog.enviar2 = imprimirReporte; p_quirog.tablaConsultar = "p_marcha"; p_quirog.ShowDialog(); }
public void primeretapa() { // manda a llamar el catalogo frmCatalogoP_quirog p_hipo = new frmCatalogoP_quirog(); p_hipo.enviar2 = llenacampos; p_hipo.tablaConsultar = "p_hipotecarios"; p_hipo.ShowDialog(); }
private void button1_Click(object sender, EventArgs e) { frmCatalogoP_quirog cuenta = new frmCatalogoP_quirog(); cuenta.enviar2 = eliminando; cuenta.tablaConsultar = "p_cajaq"; cuenta.ShowDialog(); }
private void btnFolio_Click(object sender, EventArgs e) { frmCatalogoP_quirog p_quirog = new frmCatalogoP_quirog(); p_quirog.enviar2 = llenacampos; p_quirog.tablaConsultar = "p_hipote"; p_quirog.ShowDialog(); }
private void btnFolio_Click(object sender, EventArgs e) { frmCatalogoP_quirog cuenta = new frmCatalogoP_quirog(); cuenta.enviar2 = rellenarcampos; cuenta.enviarBool = true; cuenta.tablaConsultar = "p_edocta"; cuenta.ShowDialog(); }
private void llamarForma() { frmCatalogoP_quirog cuenta = new frmCatalogoP_quirog(); cuenta.enviar2 = rellenarcampos; cuenta.enviarBool = true; cuenta.tablaConsultar = "p_edocta"; cuenta.ShowDialog(); }
private void primeretapa() { frmCatalogoP_quirog p_hipo = new frmCatalogoP_quirog(); p_hipo.enviar2 = llenampos; p_hipo.tablaConsultar = "p_hipotecarios"; p_hipo.ShowDialog(); cargagrid(); }
private void btnNuevo_Click(object sender, EventArgs e) { frmCatalogoP_quirog p_quirog = new frmCatalogoP_quirog(); p_quirog.enviar2 = rellenarConsulta; p_quirog.tablaConsultar = "p_edocta"; p_quirog.ShowDialog(); this.ActiveControl = txtfolio; // guardar = false; }
private void frmavaluo_Load(object sender, EventArgs e) { frmCatalogoP_quirog p_hipo = new frmCatalogoP_quirog(); p_hipo.enviar2 = llenacampos; p_hipo.tablaConsultar = "p_hipotecarios"; p_hipo.ShowDialog(); txtfecha.ReadOnly = true; txtdestinario.ReadOnly = true; txtvalor.ReadOnly = true; LBL2.Visible = false; }
private void button2_Click(object sender, EventArgs e) { btnnueo.Visible = false; btnGuarda.Visible = true; btnguardar2.Visible = false; frmCatalogoP_quirog p_quirog = new frmCatalogoP_quirog(); p_quirog.enviar2 = llenacampos; p_quirog.tablaConsultar = "p_marcha"; p_quirog.ShowDialog(); btnnueo.Visible = false; btnmodi.Visible = false; }
private void btnModifica_Click(object sender, EventArgs e) { btnImprimir.Visible = false; btnGuardar.Visible = true; btnNuevo.Visible = false; btnModifica.Visible = false; btnImprimir.Visible = false; btnImprimir.Visible = true; frmCatalogoP_quirog p_hipo = new frmCatalogoP_quirog(); p_hipo.enviar2 = llenacampos; p_hipo.tablaConsultar = "p_hipotecarios"; p_hipo.ShowDialog(); }
private void txtexpediente_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { } if (e.KeyCode == Keys.F5) // BUSCAR FOLIO YA HECHO { frmCatalogoP_quirog p_hipo = new frmCatalogoP_quirog(); p_hipo.enviar2 = llenacampos; p_hipo.tablaConsultar = "p_hipote"; p_hipo.ShowDialog(); } }
private void btnModifica_Click(object sender, EventArgs e) { txtRfc.Focus(); btnGuardar.Visible = true; btnNuevo.Visible = false; btnModifica.Visible = false; frmCatalogoP_quirog p_hipo = new frmCatalogoP_quirog(); p_hipo.enviar2 = llenacampos; p_hipo.tablaConsultar = "p_hipotecarios"; p_hipo.ShowDialog(); llenagrid(); this.insertar = false; }
private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { e.Handled = true; if (e.KeyChar == 8) { textBox1.Text = ""; fecha2.Value = DateTime.Now; return; } frmCatalogoP_quirog q = new frmCatalogoP_quirog(); q.tablaConsultar = "p_cajaq"; q.enviarBool = true; q.enviar2 = rellenar; q.ShowDialog(); }
private void frmAltasCambios_Load(object sender, EventArgs e) { frmFolios = new frmCatalogoP_quirog(); frmFolios.tablaConsultar = "p_edocta"; frmFolios.enviar2 = rellenarCamposFolio; string query = "select * from datos.p_edocta order by folio desc limit 1"; List <Dictionary <string, object> > r1 = globales.consulta(query); if (r1.Count != 0) { rellenarCamposFolio(r1[0]); } this.boolFolio = false; // txtTipo_rel1.Text = "NA"; btnFolio.Enabled = true; this.ActiveControl = txtFolio; }
private void btnModifica_Click(object sender, EventArgs e) { try { btnGuardar.Enabled = true; this.esInsertar = false; this.ActiveControl = txtF_descuento; btnGuardar.Enabled = true; btnModifica.Enabled = false; btnNuevo.Enabled = false; frmCatalogoP_quirog cuenta = new frmCatalogoP_quirog(); cuenta.enviar2 = rellenarcampos2; cuenta.enviarBool = true; cuenta.tablaConsultar = "p_cajaq"; cuenta.ShowDialog(); } catch { } }
private void frmAltasCambios_Load(object sender, EventArgs e) { frmFolios = new frmCatalogoP_quirog(); frmFolios.tablaConsultar = "p_edocta"; frmFolios.enviar2 = rellenarCamposFolio; }
private void frmconsulta_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F6) { try { if (string.IsNullOrWhiteSpace(txtfolio.Text)) { globales.MessageBoxExclamation("Seleccionar un folio para visualizar resultados", "Aviso", globales.menuPrincipal); return; } string query = $"select sum(importe) as acumulado from datos.descuentos where t_prestamo = 'Q' and folio = {txtfolio.Text} "; double cantidad = 0; string cantidadStr = Convert.ToString(globales.consulta(query)[0]["acumulado"]); cantidad = string.IsNullOrWhiteSpace(cantidadStr) ? 0 : globales.convertDouble(cantidadStr); adicionalconsulta forma = new adicionalconsulta(); forma.txttotal.Text = txttotal.Text; forma.txtacumulado.Text = string.Format("{0:C}", cantidad); forma.txtsaldo.Text = string.Format("{0:C}", (double.Parse(txttotal.Text, NumberStyles.Currency) - Convert.ToDouble(cantidad))); globales.showModal(forma);; } catch { globales.MessageBoxExclamation("Es necesario guardar para visualizar resultados.\nDar clic en guardar o bien presionar F3", "Aviso", globales.menuPrincipal); } if (e.KeyCode == Keys.F5) { frmCatalogoP_quirog p_quirog = new frmCatalogoP_quirog(); p_quirog.enviar2 = rellenarConsulta; p_quirog.tablaConsultar = "p_edocta"; p_quirog.ShowDialog(); this.ActiveControl = txtimporte; btbuscar.Enabled = true; } } if (e.KeyCode == Keys.Escape) { this.Close(); } if (e.KeyCode == Keys.F2) { this.Close(); } if (e.KeyCode == Keys.F5) { btnNuevo_Click(null, null); } if (e.KeyCode == Keys.Insert && !globales.boolConsulta) { if (string.IsNullOrWhiteSpace(txtfolio.Text)) { return; } if (dtggrid.Rows.Count == 0) { DialogResult p = globales.MessageBoxQuestion("¿Deseas registrar una nuevo descuento?", "Aviso", globales.menuPrincipal); if (p == DialogResult.No) { return; } this.esInsertar = true; string fecha = ""; if (secretaria == "P" || secretaria == "J" || secretaria == "T") { if (DateTime.Now.Month != 2) { fecha = string.Format("{0:d}", new DateTime(DateTime.Now.Year, DateTime.Now.Month, 30)); } else { fecha = string.Format("{0:d}", new DateTime(DateTime.Now.Year, DateTime.Now.Month, 28)); } } else { fecha = string.Format("{0:d}", new DateTime(DateTime.Now.Year, DateTime.Now.Month, 15)); } string de = txtplazo.Text; string importe = "0.00"; string rfc = txtrfc.Text; string folio = txtfolio.Text; dtggrid.Rows.Insert(0); dtggrid.Rows[0].Cells[0].Value = fecha; dtggrid.Rows[0].Cells[1].Value = "0"; dtggrid.Rows[0].Cells[2].Value = de; dtggrid.Rows[0].Cells[3].Value = importe; dtggrid.Rows[0].Cells[4].Value = rfc; dtggrid.Rows[0].Cells[5].Value = ""; dtggrid.Rows[0].Cells[6].Value = ""; dtggrid.Rows[0].Cells[7].Value = ""; dtggrid.Rows[0].Cells[8].Value = ""; dtggrid.Rows[0].Cells[9].Value = "mo"; dtggrid.Rows[0].DefaultCellStyle.BackColor = Color.FromArgb(200, 230, 201); string query = "insert into datos.descuentos(folio,f_descuento,rfc,numdesc,totdesc,importe,cuenta,proyecto,tipo_rel,t_prestamo,f_registro,idusuario,hum,fum) values({0},'{1}','{2}',{3},{4},0,'','','','Q','{5}',{6},'{7}','{8}') returning id"; query = string.Format(query, folio, string.Format("{0:yyyy-MM-dd}", DateTime.Parse(fecha)), rfc, 0, de, string.Format("{0:yyyy-MM-dd}", DateTime.Now), globales.id_usuario, string.Format("{0:hh:mm}", DateTime.Now), string.Format("{0:yyyy-MM-dd}", DateTime.Now)); List <Dictionary <string, object> > resultado = globales.consulta(query); dtggrid.Rows[0].Cells[8].Value = resultado[0]["id"]; dtggrid.CurrentCell = dtggrid.Rows[0].Cells[0]; } } }
private void frmadicionaltec_Load(object sender, EventArgs e) { frmCatalogoP_quirog p_hipo = new frmCatalogoP_quirog(); p_hipo.enviar2 = llenacampos; }