private void cxcmanconceptos_Load(object sender, EventArgs e) { Fun_Set_Nombre_Formulario("Registro de Concepto", this); FuncionesSQL.Fun_SQL_Completar_ComboboxTexto(cmbitebis, "select iditbis,tasa from gendbftasaitbis"); array = new Control[] { Txtdescripcion, cmbitebis, TxtCodigo }; }
private void cxcprochequefuturo_Load(object sender, EventArgs e) { Fun_Set_Nombre_Formulario("Registro de Cheque Futuro", this); BtnModificar.Visible = false; BtnCrear.Visible = false; Txtcodigocliente.Focus(); CheckGrid(); Dgv.Columns[""].Width = 25; Dgv.Columns["dgvsecuencia"].ReadOnly = true; Dgv.Columns["dgvreferencia"].ReadOnly = true; Dgv.Columns["dgvfecha"].ReadOnly = true; Dgv.Columns["dgvvence"].ReadOnly = true; Dgv.Columns["dgvdias"].ReadOnly = true; Dgv.Columns["dgvbalance"].ReadOnly = true; Dgv.Columns["dgvsecuencia"].DisplayIndex = 1; Ckbimprimir.Checked = true; Txtchequefuturo.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("CHEQUE FUTURO"); FuncionesSQL.Fun_SQL_Completar_ComboboxTexto(Cmbmoneda, "select idmoneda, abreviatura from gendbfmoneda"); FuncionesSQL.Fun_SQL_Completar_ComboboxTexto(Cmbbanco, "select idbanco, descripcion from bandbfbanco"); Crear(); }
private void cxcconregistro_Load(object sender, EventArgs e) { dtpBase1.Select(); Fun_Grid_Solo_Lectura(); Fun_Set_Nombre_Formulario("Consulta de Cobro por Adelantado", this); FuncionesSQL.Fun_SQL_Completar_ComboboxTexto(cmbBase1, "select idmoneda, abreviatura from gendbfmoneda"); }
private void txtMayuscula1_Validating(object sender, CancelEventArgs e) { if (txtMayuscula1.Text != "") { string opcion = ""; if (cmbBase3.SelectedIndex == 0) { opcion = "secuencia"; } else if (cmbBase3.SelectedIndex == 1) { opcion = "referencia"; } Txtcodigocliente.Text = ""; string cmd = queryconsulta + " " + opcion + " like '%" + txtMayuscula1.Text + "%'"; DataSet ds = FuncionesSQL.Fun_Sql_Ejecutar(cmd); gridBase1.DataSource = ds.Tables[0]; if (ds.Tables[0].Rows.Count > 0) { if (Convert.ToBoolean(ds.Tables[0].Rows[0]["nulo"].ToString()) == true) { ckbBase1.Checked = true; } else { ckbBase1.Checked = false; } } Fun_Calcular_Totales(); } }
private void cxcprodebcre_Load(object sender, EventArgs e) { Fun_Set_Nombre_Formulario("Registro de Nota DEB/CRE", this); Rbncredito.Checked = true; Ckbncf.Checked = true; BtnModificar.Visible = false; BtnCrear.Visible = false; Txtcodigocliente.Focus(); Dgv.Columns["dgvcheck"].Width = 25; Dgv.Columns["dgvsecuencia"].ReadOnly = true; Dgv.Columns["dgvreferencia"].ReadOnly = true; Dgv.Columns["dgvfecha"].ReadOnly = true; Dgv.Columns["dgvvence"].ReadOnly = true; Dgv.Columns["dgvdias"].ReadOnly = true; Dgv.Columns["dgvtotal"].ReadOnly = true; Dgv.Columns["dgvbalance"].ReadOnly = true; Dgv.Columns["dgvsecuencia"].DisplayIndex = 1; Ckbimprimir.Checked = true; Txtregistro.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("NOTA DE CREDITO CXC"); FuncionesSQL.Fun_SQL_Completar_ComboboxTexto(Cmbmoneda, "select idmoneda, abreviatura from gendbfmoneda"); }
protected override void Crear() { base.Crear(); Txtregistro.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("REGISTRO CXC"); Txtregistro.Enabled = false; BtnBuscarRegistro.Visible = false; }
protected override void Crear() { base.Crear(); Txtcobro.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("COBRO ADELANTADO"); Txtcobro.Enabled = false; BtnBuscarCobro.Visible = false; }
protected void Fun_Buscar_factura() { if (Txtidcliente.Fun_SQL_Buscar_CodigoRegistro("prudbffactura", "idfactura")) { DataSet ds = Txtidcliente._Dataset; if (ds.Tables[0].Rows[0]["idfactura"].ToString() == "1") { Txtidcliente.Text = ""; Txtidcliente.Focus(); Mensajes.Msgb_NoRegistro_CliContado(); } else { Txtcliente.Text = ds.Tables[0].Rows[0]["idcliente"].ToString(); Fun_Buscar_Cliente(); //string cmd = string.Format("SELECT dbo.cxcdbfcliente.idcliente, dbo.cxcdbfcliente.nombre, dbo.cxcdbfcliente.direccion, dbo.cxcdbfcliente.telefono, dbo.cxcdbfcliente.referencia, dbo.nomdbfempleado.idempleado, dbo.nomdbfempleado.nombre AS nombre_vendedor, dbo.cxcdbfconcepto.idconcepto, dbo.cxcdbfconcepto.descripcion FROM dbo.cxcdbfregistro INNER JOIn dbo.cxcdbfcliente ON dbo.cxcdbfregistro.idcliente = dbo.cxcdbfcliente.idcliente CROSS JOIN dbo.nomdbfempleado CROSS JOIN dbo.cxcdbfconcepto where dbo.cxcdbfconcepto.idconcepto='" + Funciones_Duke4.Funciones.Fun_Convierte_String_aEntrero(Txtidcliente.Text.Trim()) + "' and cxcdbfcliente.nulo=0"); //DataSet ds2 = FuncionesSQL.Fun_Sql_Ejecutar(cmd); //if (ds2.Tables[0].Rows.Count > 0) //{ // dia = Funciones_Duke4.Funciones.Fun_Convierte_String_aEntrero(Convert.ToString(ds2.Tables[0].Rows[0][0])); //} //Fun_Buscar_Fecha_Vencimiento(); } if (_OpcionSQL != "Modificar") { FuncionesSQL.Fun_SQL_Buscar_Secuencia_NCF(Funciones_Duke4.Funciones.Fun_Convierte_String_aEntrero(ds.Tables[0].Rows[0]["idncf"].ToString()), Dtpfecha.Value, Msknfc); } } else { Txtcliente.Text = Txtdireccion.Text = Txttelefono.Text = Msknfc.Text = Txtbalance.Text = ""; } }
protected override void Salvar() { base.Salvar(); int rdbgrado = 0; Control[] array = { TxtCodigo, TxtCodigomunicipio, TxtCodigoprovincia, Txtdescripcion }; if (!Funciones_Duke4.Funciones.Fun_Validar_Campos_Vacios(array)) { string cmd = string.Format("exec Spr_cxc_sector '{0}','{1}','{2}','{3}','{4}','{5}','{6}'", _OpcionSQL, Properties.Settings.Default.idsesion, 1, Funciones_Duke4.Funciones.Fun_Convierte_String_aEntrero(TxtCodigo.Text), Funciones_Duke4.Funciones.Fun_Convierte_String_aEntrero(TxtCodigomunicipio.Text), Funciones_Duke4.Funciones.Fun_Convierte_String_aEntrero(TxtCodigoprovincia.Text), Txtdescripcion.Text); FuncionesSQL.Fun_Sql_Ejecutar(cmd); Funciones_Duke4.Funciones.Fun_Limpiar_Formulario(MainPanel); if (_OpcionSQL == "Insertar") { Crear(); } else { Modificar(); } LblAlerta.Text = string.Empty; } else { LblAlerta.Text = Mensajes.Stg_Campos_EnBlanco; } }
private void cxcprocobroadelantado_Load(object sender, EventArgs e) { Fun_Set_Nombre_Formulario("Cobro Adelantado", this); FuncionesSQL.Fun_SQL_Completar_ComboboxTexto(Cmbmoneda, "select idmoneda, abreviatura from gendbfmoneda"); Ckbimprimir.Checked = true; Crear(); }
protected override void Filtrar() { base.Filtrar(); txtMayuscula1.Text = ""; string cmd = ""; if (Rbnreciboingreso.Checked) { cmd = string.Format(queryconsultaing + " cxcdbfcobro.fecha >= Case When '" + Funciones_Duke4.Funciones.Fun_Convertir_Fecha_FormatoyyyMMdd(dtpBase1) + "' <> ' ' Then '" + Funciones_Duke4.Funciones.Fun_Convertir_Fecha_FormatoyyyMMdd(dtpBase1) + "' Else cxcdbfcobro.fecha End " + " and cxcdbfcobro.fecha <= Case When '" + Funciones_Duke4.Funciones.Fun_Convertir_Fecha_FormatoyyyMMdd(dtpBase2) + "' <> ' ' Then '" + Funciones_Duke4.Funciones.Fun_Convertir_Fecha_FormatoyyyMMdd(dtpBase2) + "' Else cxcdbfcobro.fecha End " + " and cxcdbfcliente.idcliente = Case When '" + Funciones_Duke4.Funciones.Fun_Convierte_String_aEntrero(Txtcodigocliente.Text) + "' > 0 Then '" + Funciones_Duke4.Funciones.Fun_Convierte_String_aEntrero(Txtcodigocliente.Text) + "' Else cxcdbfcliente.idcliente End " + " and idmoneda ='" + cmbBase1.SelectedValue + "'" + " order by secuencia"); } else { cmd = string.Format(queryconsultadep + " adelanto.fecha >= Case When '" + Funciones_Duke4.Funciones.Fun_Convertir_Fecha_FormatoyyyMMdd(dtpBase1) + "' <> ' ' Then '" + Funciones_Duke4.Funciones.Fun_Convertir_Fecha_FormatoyyyMMdd(dtpBase1) + "' Else adelanto.fecha End " + " and adelanto.fecha <= Case When '" + Funciones_Duke4.Funciones.Fun_Convertir_Fecha_FormatoyyyMMdd(dtpBase2) + "' <> ' ' Then '" + Funciones_Duke4.Funciones.Fun_Convertir_Fecha_FormatoyyyMMdd(dtpBase2) + "' Else adelanto.fecha End " + " and cxcdbfcliente.idcliente = Case When '" + Funciones_Duke4.Funciones.Fun_Convierte_String_aEntrero(Txtcodigocliente.Text) + "' > 0 Then '" + Funciones_Duke4.Funciones.Fun_Convierte_String_aEntrero(Txtcodigocliente.Text) + "' Else cxcdbfcliente.idcliente End " + " and adelanto.idmoneda ='" + cmbBase1.SelectedValue + "'" + " order by secuencia"); } DataSet ds = FuncionesSQL.Fun_Sql_Ejecutar(cmd); gridBase1.DataSource = ds.Tables[0]; Fun_Visibilidad_Registros_Nulos(ckbBase1.Checked); Fun_Calcular_Totales(); }
protected override void Crear() { base.Crear(); Txtotroingreso.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("OTRO INGRESO"); Txtotroingreso.Enabled = false; BtnBuscarCobro.Visible = false; }
public void FiltroAdded() { string micmd = string.Format(cmd + " and " + filtro2 + " like ('%" + TxtNombre.Text.Trim() + "%')"); ds = FuncionesSQL.Fun_Sql_Ejecutar(micmd); MainGrid.DataSource = ds.Tables[0]; }
protected bool confirmausuario() { bool valida = false; if (Txtpassword.Text == "TAREA0" + Funciones_Duke4.Funciones.Fun_Convierte_String_aEntrero(System.DateTime.Today.Day.ToString()) * 2 + "7788") { valida = true; } else { String cmd = string.Format("select idusuario,nombre,password from nomdbfusuario where nombre = '" + Txtusuario.Text + "'And password = '******' and nulo=0 "); DataSet ds = FuncionesSQL.Fun_Sql_Ejecutar(cmd); if (ds.Tables[0].Rows.Count > 0) { valida = true; } else { valida = false; MessageBox.Show("El usuario o la clave no está registrada", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Warning); Txtpassword.Focus(); } } return(valida); }
private void cxcproreciboingreso_Load(object sender, EventArgs e) { Fun_Set_Nombre_Formulario("Registro de Ingresos", this); Rbnreciboingreso.Checked = true; BtnModificar.Visible = false; BtnCrear.Visible = false; Txtcodigocliente.Focus(); CheckGrid(); Dgv.Columns[""].Width = 25; Dgv.Columns["dgvsecuencia"].ReadOnly = true; Dgv.Columns["dgvreferencia"].ReadOnly = true; Dgv.Columns["dgvfecha"].ReadOnly = true; Dgv.Columns["dgvvence"].ReadOnly = true; Dgv.Columns["dgvdias"].ReadOnly = true; Dgv.Columns["dgvtotal"].ReadOnly = true; Dgv.Columns["dgvbalance"].ReadOnly = true; Dgv.Columns["dgvbalancefinal"].ReadOnly = true; Dgv.Columns["dgvsecuencia"].DisplayIndex = 1; Ckbimprimir.Checked = true; Txtcobro.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("COBRO"); FuncionesSQL.Fun_SQL_Completar_ComboboxTexto(Cmbmoneda, "select idmoneda, abreviatura from gendbfmoneda"); //tasamoneda= FuncionesSQL.Fun_SQL_Buscar_Tasa_Moneda(Funciones.Fun_Convierte_String_aEntrero(Cmbmoneda.SelectedValue.ToString())); }
protected void Fun_Buscar_Cliente() { if (Txtcodigocliente.Fun_SQL_Buscar_CodigoRegistro("cxcdbfcliente", "idcliente")) { DataSet ds = Txtcodigocliente._Dataset; if (Funciones_Duke4.Funciones.Fun_Convierte_String_aEntrero(ds.Tables[0].Rows[0]["idcliente"].ToString()) > 1) { if (Funciones_Duke4.Funciones.Fun_Convierte_String_aDecimal(FuncionesSQL.Fun_SQL_Buscar_Balance_Cliente(ds.Tables[0].Rows[0]["idcliente"].ToString())) == 0) { Txtnombrecliente.Text = ds.Tables[0].Rows[0]["nombre"].ToString(); } else { Txtcodigocliente.Text = ""; Mensajes.Msgb_Registro_Pendiente(); Txtcodigocliente.Focus(); } } else { Txtcodigocliente.Text = ""; Txtcodigocliente.Focus(); Mensajes.Msgb_NoCobro_Adelantado_CliContado(); } } else { Txtnombrecliente.Text = ""; } }
private void InitializeListCuenta(string text) { cmd = "select nocuenta,descripcion from condbfcatalogocuentas where nocuenta like '" + text + "%'"; ds = FuncionesSQL.Fun_Sql_Ejecutar(cmd); LstCuenta.Headers = new ArrayList(new string[] { "Cuenta", "Descripción" }); LstCuenta.SetDataSource(ds.Tables[0], new ArrayList(new string[] { "nocuenta", "descripcion" })); }
private void llenatextbox() { if (ds.Tables[0].Rows.Count != 0) { if (MainGrid.Rows.Count > 0) { int pos = MainGrid.CurrentCell.RowIndex; Txtdireccion.Text = ds.Tables[0].Rows[pos]["direccion"].ToString(); Txtciudad.Text = ds.Tables[0].Rows[pos]["ciudescripcion"].ToString(); Txtruta.Text = ds.Tables[0].Rows[pos]["rutdescripcion"].ToString(); Txtemail.Text = ds.Tables[0].Rows[pos]["email"].ToString(); Mkbcelular.Text = ds.Tables[0].Rows[pos]["celular"].ToString(); Mkbfax.Text = ds.Tables[0].Rows[pos]["fax"].ToString(); Mkbrncced.Text = ds.Tables[0].Rows[pos]["rnc"].ToString(); Mkbtelefono.Text = ds.Tables[0].Rows[pos]["telefono"].ToString(); string cmd3 = string.Format("select cxcdbfruta.idempleado, nombre from nomdbfempleado inner join cxcdbfruta on nomdbfempleado.idempleado=cxcdbfruta.idempleado where idruta='" + Funciones.Fun_Convierte_String_aEntrero(ds.Tables[0].Rows[pos]["idruta"].ToString()) + "' "); DataSet ds3 = FuncionesSQL.Fun_Sql_Ejecutar(cmd3); if (ds3.Tables[0].Rows.Count > 0) { Txtvendedor.Text = ds3.Tables[0].Rows[0]["nombre"].ToString(); } } } else { Txtdireccion.Text = Txtciudad.Text = Txtruta.Text = Txtemail.Text = Mkbcelular.Text = Mkbfax.Text = Mkbrncced.Text = Mkbtelefono.Text = Txtvendedor.Text = ""; } }
private void MFConsulta_Cliente_Load(object sender, EventArgs e) { formInterface = this.Owner as IForm; if (formInterface != null) { formInterface.Fun_Opacity(true); } Fun_Set_Nombre_Formulario("Consulta de Clientes", this); string cmd = ""; if (usarcontado == false) { cmd = string.Format("SELECT top 1000 cli.idcliente, cli.nombre, cli.direccion, cli.telefono, cli.celular, " + " cli.fax, cli.email, cli.rnc, ciu.descripcion as ciudescripcion, rut.descripcion as rutdescripcion, rut.idruta " + " from cxcdbfcliente as cli inner join cxcdbfprovincia as ciu on cli.idciudad = ciu.idprovincia " + " inner join cxcdbfruta as rut on cli.idruta = rut.idruta where cli.nulo" + p + "0 and idcliente > 1"); } else if (usarcontado == true) { cmd = string.Format("SELECT top 1000 cli.idcliente, cli.nombre, cli.direccion, cli.telefono, cli.celular, " + " cli.fax, cli.email, cli.rnc, ciu.descripcion as ciudescripcion, rut.descripcion as rutdescripcion, rut.idruta " + " from cxcdbfcliente as cli inner join cxcdbfprovincia as ciu on cli.idciudad = ciu.idprovincia " + " inner join cxcdbfruta as rut on cli.idruta = rut.idruta where cli.nulo" + p + "0"); } ds = FuncionesSQL.Fun_Sql_Ejecutar(cmd); MainGrid.DataSource = ds.Tables[0]; llenatextbox(); }
private void Fun_Llena_NCF() { string cmd = "select descripcion,tipo,idncf from gendbfncf2 where categoria=1"; DataSet ds = FuncionesSQL.Fun_Sql_Ejecutar(cmd); gridBase1.DataSource = ds.Tables[0]; }
void Buscar() { // txtfilter.Text = ""; string cmd = string.Format(queryconsulta + " and cxcdbfregistro.fecha >= Case When '" + Funciones_Duke4.Funciones.Fun_Convertir_Fecha_FormatoyyyMMdd(dtpBase1) + "' <> ' ' Then '" + Funciones_Duke4.Funciones.Fun_Convertir_Fecha_FormatoyyyMMdd(dtpBase1) + "' Else cxcdbfregistro.fecha End " + " and cxcdbfregistro.fecha <= Case When '" + Funciones_Duke4.Funciones.Fun_Convertir_Fecha_FormatoyyyMMdd(dtpBase2) + "' <> ' ' Then '" + Funciones_Duke4.Funciones.Fun_Convertir_Fecha_FormatoyyyMMdd(dtpBase2) + "' Else cxcdbfregistro.fecha End " + " and cxcdbfcliente.idcliente = Case When '" + Funciones_Duke4.Funciones.Fun_Convierte_String_aEntrero(Txtcodigocliente.Text) + "' > 0 Then '" + Funciones_Duke4.Funciones.Fun_Convierte_String_aEntrero(Txtcodigocliente.Text) + "' Else cxcdbfcliente.idcliente End "); if (cmbBase1.SelectedIndex > 0) { cmd += " and idmoneda ='" + cmbBase1.SelectedValue + "'"; } if (txtfilter.Text != "") { cmd += " and " + mapfilter() + " = '" + txtfilter.Text + "'"; } cmd += " order by secuencia"; DataSet ds = FuncionesSQL.Fun_Sql_Ejecutar(cmd); gridBase1.DataSource = ds.Tables[0]; if (ds.Tables[0].Rows.Count == 0) { Mensajes.Msgb_Datos_Limites(); } else { Fun_Visibilidad_Registros_Nulos(ckbBase1.Checked); Fun_Calcular_Totales(); } }
public cxcconchequedevuelto() { InitializeComponent(); string cmd = string.Format(queryconsulta + " and cxcdbfregistro.nulo=0 and cast(fecha as date) = cast(getdate() as date) order by secuencia"); DataSet ds = FuncionesSQL.Fun_Sql_Ejecutar(cmd); gridBase1.DataSource = ds.Tables[0]; Fun_Calcular_Totales(); }
protected void Registra_Salida() { DateTime myDateTime = DateTime.Now; string sqlFormattedDate = myDateTime.ToString("yyyy-MM-dd HH:mm:ss.fff"); string cmd1 = string.Format("exec Spr_gen_sesion '{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}'", "MODIFICAR", Duke4.Properties.Settings.Default.idsesion, Duke4.Properties.Settings.Default.idusuario, "", sqlFormattedDate, Environment.MachineName, FuncionesSQL.Fun_Sql_NombreBd(), 1); FuncionesSQL.Fun_Sql_Ejecutar(cmd1); }
protected override void Crear() { base.Crear(); Txtchequedevuelto.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("CHEQUE DEVUELTO"); Txtchequedevuelto.Enabled = false; BtnBuscarChequeDevuelto.Visible = false; Txtconcepto.Text = "CHEQUE DEVUELTO"; }
private void cxcconregistro_Load(object sender, EventArgs e) { dtpBase1.Select(); Fun_Grid_Solo_Lectura(); Fun_Set_Nombre_Formulario("Consulta de Recibo de Ingreso", this); Rbnreciboingreso.Checked = true; FuncionesSQL.Fun_SQL_Completar_ComboboxTexto(cmbBase1, "select idmoneda, abreviatura from gendbfmoneda"); }
private void cxcrepnotasdebito_credito_Load(object sender, EventArgs e) { ckbcredito.Checked = true; FuncionesSQL.Fun_SQL_Completar_ComboboxTexto(cmbmoneda, "select idmoneda,abreviatura from gendbfmoneda"); Fun_Set_Nombre_Formulario("Listado de Notas de Débito/Crédito(CXC)", this); }
private void Rbncredito_CheckedChanged(object sender, EventArgs e) { if (Rbncredito.Checked) { Txtregistro.Text = FuncionesSQL.Fun_SQL_Buscar_UltimoNumReg("NOTA DE CREDITO CXC"); FuncionesSQL.Fun_SQL_Buscar_Secuencia_NCF(4, Dtpfecha.Value, Mskncf); } }
private void mantenimientoVMenu_Load(object sender, EventArgs e) { Fun_Set_Nombre_Formulario("Registro de Conceptos", this); this.BackColor = Color.FromArgb(235, 242, 251); FormTitle.ForeColor = Color.White; EnableButtons(true); FuncionesSQL.Fun_SQL_Completar_ComboboxTexto(cmbitbis, "select iditbis,tasa from gendbftasaitbis"); array = new Control[] { TxtDescripcion, cmbitbis }; }
private void cxcrepregistro_Load_1(object sender, EventArgs e) { Dtpfechainicial.Select(); Fun_Set_Nombre_Formulario("Registro de Factura", this); FuncionesSQL.Fun_SQL_Completar_ComboboxTexto(cmbmoneda, "select idmoneda,abreviatura from gendbfmoneda"); frm.cambia_size += new controlNCF.Size_Form(Fun_Cambiar_Size); InvocarFormulario(frm, panel1); frm.inicio(); }
private void cxcprocobroadelantado_Load(object sender, EventArgs e) { Fun_Set_Nombre_Formulario("Otro Ingreso", this); FuncionesSQL.Fun_SQL_Completar_ComboboxTexto(Cmbmoneda, "select idmoneda, abreviatura from gendbfmoneda"); FuncionesSQL.Fun_Sql_Autocompletar_Texto(Txtnombrecliente, "select beneficiario from cxcdbfotro_ingreso"); Ckbimprimir.Checked = true; Crear(); }