Example #1
0
 private void BtnNuevo_Click(object sender, EventArgs e)
 {
     TxtEditar.Text = "Nuevo";
     Limpiar();
     TxtCod_vendedor.Focus();
     Botones();
 }
Example #2
0
 private void GenerarCod()
 {
     try
     {
         int rpta = Convert.ToInt32(EVendedor.GenerarCod(TxtCod_vendedor.Text));
         TxtCod_vendedor.Text = Pref + rpta.ToString(TxtCadena.Text);
     }
     catch (Exception Ex)
     {
         MensajeError(" Solo se puede Generar Codigos Numericos " + Ex.StackTrace);
         TxtCod_vendedor.Focus();
     }
 }
Example #3
0
        public void Listar()
        {
            try
            {
                Ds = EVendedor.Listar();

                TxtCod_vendedor.Text  = Ds.Tables[0].Rows[0]["cod_vendedor"].ToString();
                TxtCod_vendedorv.Text = Ds.Tables[0].Rows[0]["cod_vendedor"].ToString();
                TxtDesc_vendedor.Text = Ds.Tables[0].Rows[0]["desc_vendedor"].ToString();
                TxtRif.Text           = Ds.Tables[0].Rows[0]["rif"].ToString();
                TxtTelefono.Text      = Ds.Tables[0].Rows[0]["telefono"].ToString();
                TxtDireccion.Text     = Ds.Tables[0].Rows[0]["direccion"].ToString();
                TxtNivel.Text         = Ds.Tables[0].Rows[0]["nivel"].ToString();
                TxtComisionventa.Text = Ds.Tables[0].Rows[0]["comisionventa"].ToString();
                TxtComisioncobro.Text = Ds.Tables[0].Rows[0]["comisioncobro"].ToString();
                TxtTventas_item.Text  = Ds.Tables[0].Rows[0]["tventas_item"].ToString();
                TxtTventas_monto.Text = Ds.Tables[0].Rows[0]["tventas_monto"].ToString();
                TxtFecha_reg.Text     = Ds.Tables[0].Rows[0]["fecha_reg"].ToString();
                TxtCobra.Text         = Ds.Tables[0].Rows[0]["cobra"].ToString();
                TxtVenta.Text         = Ds.Tables[0].Rows[0]["venta"].ToString();
                TxtCampo1.Text        = Ds.Tables[0].Rows[0]["campo1"].ToString();
                TxtCampo2.Text        = Ds.Tables[0].Rows[0]["campo2"].ToString();
                TxtCampo3.Text        = Ds.Tables[0].Rows[0]["campo3"].ToString();
                TxtCampo4.Text        = Ds.Tables[0].Rows[0]["campo4"].ToString();
                TxtCampo5.Text        = Ds.Tables[0].Rows[0]["campo5"].ToString();
                TxtCampo6.Text        = Ds.Tables[0].Rows[0]["campo6"].ToString();
                TxtEditar.Text        = "Listar";
                Registros();
            }
            catch (Exception Ex)
            {
                TxtEditar.Text = "Nuevo";
                Limpiar();
                TxtCod_vendedor.Focus();
                string rpta = Ex.Message;
                MensajeOk("Tabla Vacia, esta en modo Ingreso");
                Show();
            }
        }