コード例 #1
0
        protected void Btn_redirije_Click(object sender, EventArgs e)
        {
            try
            {
                this.MoviBanck                = new Movimientos_Bancarios();
                this.MoviBanck.Opc            = 1;
                this.MoviBanck.Id_banco       = this.DptBanco.SelectedValue;
                this.MoviBanck.Moneda         = this.DptMoneda.SelectedValue;
                this.MoviBanck.Fecha_registro = fecha.Value;
                this.MoviBanck.Nombre_movi    = this.txt_nombre_banco.Text;
                this.MoviBanck.Detalle_movi   = this.txt_descripcion.Text;

                this.MoviBanckHelp = new Movimientos_bancarios_Helper(MoviBanck);
                this.MoviBanckHelp.Agregar_movi_banc();

                this.txt_descripcion.Text    = null;
                this.txt_nombre_banco.Text   = null;
                this.DptBanco.SelectedValue  = null;
                this.DptMoneda.SelectedValue = null;
                ScriptManager.RegisterStartupScript(this, typeof(Page), "mmensajeDeconfirmacion", "mensajeDeconfirmacion('" + "" + "');", true);
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true);
            }
        }
コード例 #2
0
        public void buscaSaldos()
        {
            try
            {
                this.movibanck     = new Movimientos_Bancarios();
                this.movibanck.Opc = 2;
                this.movibanck.Id_registro_banco = id_movi;

                this.movihelper = new Movimientos_bancarios_Helper(movibanck);
                this.datos      = new DataTable();

                this.datos = this.movihelper.Consulta_saldo();
                if (datos.Rows.Count >= 0)
                {
                    DataRow fila = datos.Rows[0];
                    saldo = float.Parse(fila["saldo"].ToString());
                }
            }
            catch (Exception)
            {
                ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true);
            }
        }
コード例 #3
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            try
            {
                if (fecha.Value == "")
                {
                    ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeAviso", "mensajeAviso('" + "" + "');", true);
                }
                else
                {
                    string tipomovi;
                    float  saldo_total;
                    this.movibanck     = new Movimientos_Bancarios();
                    this.movibanck.Opc = 1;
                    this.movibanck.Fecha_movi_regis = fecha.Value;
                    this.movibanck.Detalle_registro = this.txt_detalle.Text;
                    this.movibanck.Financia         = int.Parse(this.DptFinanciamiento.SelectedValue);
                    if (int.Parse(this.DptFinanciamiento.SelectedValue) == 0)
                    {
                        this.movibanck.Centro_costos = "N/A";
                    }
                    else
                    {
                        this.movibanck.Centro_costos = this.DptCostos.SelectedValue;
                    }

                    this.movibanck.Cantidad_dinero = float.Parse(this.txtMontito.Text);
                    this.movibanck.Tipo_registro   = this.Dptmovi.SelectedValue;
                    tipomovi = this.Dptmovi.SelectedValue;
                    monto    = float.Parse(this.txtMontito.Text);
                    saldo    = float.Parse(this.LblSaldo.Text);
                    if (tipomovi == "Ingreso")
                    {
                        saldo_total          = saldo + monto;
                        this.movibanck.Saldo = saldo_total;
                    }
                    else
                    {
                        saldo_total          = saldo - monto;
                        this.movibanck.Saldo = saldo_total;
                    }
                    this.movibanck.Id_registro_banco = GloID;

                    if (this.DptItem.SelectedValue == "N/A")
                    {
                        this.movibanck.Numero = "NE";
                        this.movibanck.Item   = this.DptItem.SelectedValue;
                    }
                    else
                    {
                        this.movibanck.Numero = this.TxtNumFactura.Text;
                        this.movibanck.Item   = this.DptItem.SelectedValue;
                    }
                    this.movibanck.Numero = this.TxtNumFactura.Text;
                    this.movihelper       = new Movimientos_bancarios_Helper(movibanck);
                    this.movihelper.Agregar_trans_banc();

                    this.txtMontito.Text       = null;
                    this.TxtNumFactura.Text    = null;
                    this.txt_detalle.Text      = null;
                    this.DptItem.SelectedValue = null;
                    this.Dptmovi.SelectedValue = null;
                    ScriptManager.RegisterStartupScript(this, typeof(Page), "mmensajeDeconfirmacion", "mensajeDeconfirmacion('" + "" + "');", true);
                }
            }
            catch (Exception)
            {
                ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true);
            }
        }