示例#1
0
        public void devuelveParametros()
        {
            Cone con = new Cone();
            SqlConnection cone = con.Conecta();
            SqlDataAdapter da = new SqlDataAdapter();
            DataSet ds = new DataSet();

            da = new SqlDataAdapter("SELECT * FROM TBPARVEN", con.Conecta());
            da.Fill(ds, "0");

            txt_iva.Text = ds.Tables[0].Rows[0]["IVA"].ToString();
            txt_minboleta.Text = ds.Tables[0].Rows[0]["MINBOLETAS"].ToString();
            txt_maxcuotas.Text = ds.Tables[0].Rows[0]["TOPECUOTAS"].ToString();
            txt_intcredito.Text = ds.Tables[0].Rows[0]["INTVTACRED"].ToString();
            txt_intatraso.Text = ds.Tables[0].Rows[0]["INTMORA"].ToString();
            txt_cuocontado.Text = ds.Tables[0].Rows[0]["MAXCUOTPCO"].ToString();
            txt_diatope.Text = ds.Tables[0].Rows[0]["ULTIMODIA"].ToString();
            string contado = ds.Tables[0].Rows[0]["PARACONTAD"].ToString();
            string credito = ds.Tables[0].Rows[0]["PARACREDIT"].ToString();
            string oferta  = ds.Tables[0].Rows[0]["PARAOFERTA"].ToString();
            txt_ffijo.Text = ds.Tables[0].Rows[0]["FONDOFIJO"].ToString();

            con.CloseAll();

            buscontado(contado);
            buscredito(credito);
            busoferta(oferta);
        }
示例#2
0
        public void devuelveMarca()
        {
            Cone con = new Cone();
            SqlConnection cone = con.Conecta();
            SqlDataAdapter da = new SqlDataAdapter();
            DataSet ds = new DataSet();

            da = new SqlDataAdapter("SELECT * FROM TBMARCAS WHERE C_MARCA ='" + txt_codigo.Text + "'", con.Conecta());
            da.Fill(ds, "0");

            txt_marca.Text = ds.Tables[0].Rows[0]["D_MARCA"].ToString();

            con.CloseAll();
        }
示例#3
0
        public void devuelveComision()
        {
            Cone con = new Cone();
            SqlConnection cone = con.Conecta();
            SqlDataAdapter da = new SqlDataAdapter();
            DataSet ds = new DataSet();

            da = new SqlDataAdapter("SELECT * FROM TBCONVE WHERE COD_FORPAG ='" + txt_codigo.Text + "'", con.Conecta());
            da.Fill(ds, "0");

            txt_nombre.Text = ds.Tables[0].Rows[0]["DES_FORPAG"].ToString();
            txt_comision.Text = ds.Tables[0].Rows[0]["COMISION"].ToString();

            con.CloseAll();
        }
示例#4
0
        public void devuelveProveedor()
        {
            Cone con = new Cone();
            SqlConnection cone = con.Conecta();
            SqlDataAdapter da = new SqlDataAdapter();
            DataSet ds = new DataSet();

            da = new SqlDataAdapter("SELECT * FROM TBPROVE WHERE PRV_RUT ='" + txt_rut.Text + "'", con.Conecta());
            da.Fill(ds, "0");

            txt_digito.Text = ds.Tables[0].Rows[0]["PRV_DV"].ToString();
            txt_proveedor.Text = ds.Tables[0].Rows[0]["PRV_RAZON"].ToString();
   
             con.CloseAll();
            
        }
示例#5
0
        public void devuelveParametros()
        {
            Cone con = new Cone();
            SqlConnection cone = con.Conecta();
            SqlDataAdapter da = new SqlDataAdapter();
            DataSet ds = new DataSet();

            da = new SqlDataAdapter("SELECT * FROM TBNUMERO", con.Conecta());
            da.Fill(ds, "0");

            txt_bcontado.Text = ds.Tables[0].Rows[0]["BOLETA"].ToString();
            txt_bcredito.Text = ds.Tables[0].Rows[0]["BOLCREDITO"].ToString();
            txt_fventa.Text = ds.Tables[0].Rows[0]["FACTURA"].ToString();
            txt_comprobante.Text = ds.Tables[0].Rows[0]["ABONO"].ToString();
            txt_grupoa.Text = ds.Tables[0].Rows[0]["PORC_CIERRE_A"].ToString();
            txt_grupob.Text = ds.Tables[0].Rows[0]["PORC_CIERRE_B"].ToString();
          
            con.CloseAll();

           
        }
示例#6
0
        public void devuelveEmpresa()
        {
            Cone con = new Cone();
            SqlConnection cone = con.Conecta();
            SqlDataAdapter da = new SqlDataAdapter();
            DataSet ds = new DataSet();

            da = new SqlDataAdapter("SELECT * FROM TBEMPRE", con.Conecta());
            da.Fill(ds, "0");

            txt_rut.Text = ds.Tables[0].Rows[0]["EMP_RUT"].ToString();
            txt_digito.Text = ds.Tables[0].Rows[0]["EMP_DV"].ToString();
            txt_razon.Text = ds.Tables[0].Rows[0]["EMP_RAZON"].ToString();
            txt_giro.Text = ds.Tables[0].Rows[0]["EMP_GIRO"].ToString();
            txt_ciudad.Text = ds.Tables[0].Rows[0]["EMP_CIUDAD"].ToString();
            txt_direccion.Text = ds.Tables[0].Rows[0]["EMP_DIREC"].ToString();
            txt_fono.Text = ds.Tables[0].Rows[0]["EMP_FONO"].ToString();
            txt_fax.Text = ds.Tables[0].Rows[0]["EMP_FAX"].ToString();
            txt_casilla.Text = ds.Tables[0].Rows[0]["EMP_CAS"].ToString();
            txt_email.Text = ds.Tables[0].Rows[0]["EMP_MAIL"].ToString();
            txt_sitio.Text = ds.Tables[0].Rows[0]["EMP_SITIO"].ToString();

            con.CloseAll();
        }
示例#7
0
        public void devuelveProveedor()
        {
            Cone con = new Cone();
            SqlConnection cone = con.Conecta();
            SqlDataAdapter da = new SqlDataAdapter();
            DataSet ds = new DataSet();

            da = new SqlDataAdapter("SELECT * FROM TBPROVE WHERE PRV_RUT ='" + txt_rut.Text + "'", con.Conecta());
            da.Fill(ds, "0");

            txt_digito.Text = ds.Tables[0].Rows[0]["PRV_DV"].ToString();
            txt_identificacion.Text = ds.Tables[0].Rows[0]["PRV_RAZON"].ToString();
            txt_direccion.Text = ds.Tables[0].Rows[0]["PRV_DIREC"].ToString();
            txt_ciudad.Text = ds.Tables[0].Rows[0]["PRV_CIUDAD"].ToString();
            txt_giro.Text = ds.Tables[0].Rows[0]["PRV_GIRO"].ToString();
            txt_telefono.Text = ds.Tables[0].Rows[0]["PRV_FONO"].ToString();
            txt_fax.Text = ds.Tables[0].Rows[0]["PRV_FAX"].ToString();
            txt_contacto.Text = ds.Tables[0].Rows[0]["PRV_CONTAC"].ToString();
            txt_casilla.Text = ds.Tables[0].Rows[0]["PRV_CASILL"].ToString();
            txt_email.Text = ds.Tables[0].Rows[0]["PRV_EMAIL"].ToString();
            txt_gerente.Text = ds.Tables[0].Rows[0]["PRV_GERENT"].ToString();
            cmb_formap.Text = ds.Tables[0].Rows[0]["PRV_FPAGO"].ToString();
            txt_responsable.Text = ds.Tables[0].Rows[0]["PRV_NOMZON"].ToString();
            txt_zonal.Text = ds.Tables[0].Rows[0]["PRV_FONZON"].ToString();
      
            con.CloseAll();
        }
示例#8
0
文件: Usuarios.cs 项目: FJSOTO/Tienda
        public void devuelveUsuario()
        {
            Cone con = new Cone();
            SqlConnection cone = con.Conecta();
            SqlDataAdapter da = new SqlDataAdapter();
            DataSet ds = new DataSet();

            da = new SqlDataAdapter("SELECT * FROM TBUSUAR where ID_USUA ='" + txt_user.Text + "'", con.Conecta());
            da.Fill(ds, "0");

            txt_contrasena.Text = ds.Tables[0].Rows[0]["PASS_USUA"].ToString();
            txt_contrasena2.Text = ds.Tables[0].Rows[0]["PASS_USUA"].ToString();
            txt_identificacion.Text = ds.Tables[0].Rows[0]["NOM_USUA"].ToString();
            txt_cargo.Text = ds.Tables[0].Rows[0]["CARGO"].ToString();

         

            con.CloseAll();
        }
示例#9
0
          public void ivaahora() { 
        
            Cone con = new Cone();
            SqlConnection cone = con.Conecta();
            SqlDataAdapter da = new SqlDataAdapter();
            DataSet ds = new DataSet();

            da = new SqlDataAdapter("SELECT IVA FROM TBPARVEN", con.Conecta());
            da.Fill(ds, "0");

            string iva = ds.Tables[0].Rows[0]["IVA"].ToString();
            lbl_iva.Text = iva;
            con.CloseAll();
          }
示例#10
0
          public void calculoiva()
        {
            Cone con = new Cone();
            SqlConnection cone = con.Conecta();
            SqlDataAdapter da = new SqlDataAdapter();
            DataSet ds = new DataSet();

            da = new SqlDataAdapter("SELECT IVA FROM TBPARVEN", con.Conecta());
            da.Fill(ds, "0");

            string iva = ds.Tables[0].Rows[0]["IVA"].ToString();
            lbl_iva.Text = iva;
            string neto = txt_neto.Text;
            decimal iva2 = Convert.ToDecimal(iva);
            decimal neto2 = Convert.ToDecimal(neto);

            decimal cal = Math.Round(iva2 / 100 * neto2 , 0);

            decimal tot = neto2 + cal;

            txt_iva.Text = Convert.ToString(cal);
            txt_total.Text = Convert.ToString(tot);
            con.CloseAll();

            
        }
示例#11
0
        public void devuelveVendedor()
        {
            Cone con = new Cone();
            SqlConnection cone = con.Conecta();
            SqlDataAdapter da = new SqlDataAdapter();
            DataSet ds = new DataSet();

            da = new SqlDataAdapter("SELECT * FROM TBVENDE WHERE VENDE_COD ='" + txt_codigo.Text + "'", con.Conecta());
            da.Fill(ds, "0");

            txt_nombre.Text = ds.Tables[0].Rows[0]["VENDE_NOM"].ToString();
            txt_comision.Text = ds.Tables[0].Rows[0]["VENDE_COMI"].ToString();
            txt_seccion.Text = ds.Tables[0].Rows[0]["VENDE_SECC"].ToString();

            con.CloseAll();
        }
示例#12
0
        public void devuelveConvenio(string convenio)
        {
            Cone con = new Cone();
            SqlConnection cone = con.Conecta();
            SqlDataAdapter da = new SqlDataAdapter();
            DataSet ds = new DataSet();

            da = new SqlDataAdapter("SELECT * FROM TBCONVE WHERE COD_FORPAG ='" + convenio + "' ", con.Conecta());
            da.Fill(ds, "0");

            string nomconvenio = ds.Tables[0].Rows[0]["DES_FORPAG"].ToString();

            txt_convenio.Text = txt_convenio.Text + " " + nomconvenio;

            con.CloseAll();

        }
示例#13
0
        public void devuelveDClientes(string rut)
        {
            Cone con = new Cone();
            SqlConnection cone = con.Conecta();
            SqlDataAdapter da = new SqlDataAdapter();
            DataSet ds = new DataSet();

            da = new SqlDataAdapter("SELECT * FROM TBCLIEN WHERE CLT_RUT ='" + rut + "' ", con.Conecta());
            da.Fill(ds, "0");

            txt_digito.Text = ds.Tables[0].Rows[0]["CLT_DV"].ToString();
            txt_razon.Text = ds.Tables[0].Rows[0]["CLT_RAZON"].ToString();
            txt_convenio.Text = ds.Tables[0].Rows[0]["CLT_CONVE"].ToString();

            con.CloseAll();

            devuelveConvenio(txt_convenio.Text);


        }
示例#14
0
        public void devuelveSuperior(string tipodoc, string tipoventa, string documento)
        {
            Cone con = new Cone();
            SqlConnection cone = con.Conecta();
            SqlDataAdapter da = new SqlDataAdapter();
            DataSet ds = new DataSet();

            da = new SqlDataAdapter("SELECT * FROM TBDOCVAR WHERE DOCV_TIPO ='" + tipodoc + "' AND DOCV_NUMER ='" + documento + "' AND DOCV_CONDI ='" + tipoventa + "'  ", con.Conecta());
            da.Fill(ds, "0");

            txt_fecha.Text = ds.Tables[0].Rows[0]["DOCV_FECHA"].ToString();
            txt_tipodoc.Text = ds.Tables[0].Rows[0]["DOCV_TIPO"].ToString();
            txt_rut.Text = ds.Tables[0].Rows[0]["DOCV_RUTCP"].ToString();

            con.CloseAll();


             if (txt_rut.Text !="0")
             {
                 devuelveDClientes(txt_rut.Text);
             }

        }