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

                TxtCod_caja.Text       = Ds.Tables[0].Rows[0]["cod_caja"].ToString();
                TxtCod_cajav.Text      = Ds.Tables[0].Rows[0]["cod_caja"].ToString();
                TxtDesc_caja.Text      = Ds.Tables[0].Rows[0]["desc_caja"].ToString();
                TxtCod_moneda.Text     = Ds.Tables[0].Rows[0]["cod_moneda"].ToString();
                TxtDesc_moneda.Text    = Ds.Tables[0].Rows[0]["desc_moneda"].ToString();
                TxtResponsable.Text    = Ds.Tables[0].Rows[0]["responsable"].ToString();
                TxtSaldoefectivo.Text  = Ds.Tables[0].Rows[0]["saldoefectivo"].ToString();
                TxtSaldodocumento.Text = Ds.Tables[0].Rows[0]["saldodocumento"].ToString();
                TxtSaldototal.Text     = Ds.Tables[0].Rows[0]["saldototal"].ToString();
                TxtFecha_reg.Text      = Ds.Tables[0].Rows[0]["fecha_reg"].ToString();
                TxtActiva.Text         = Ds.Tables[0].Rows[0]["activa"].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_caja.Focus();
                string rpta = Ex.Message;
                Show();
                MensajeOk("Tabla Vacia, esta en modo Ingreso");
            }
        }