Ejemplo n.º 1
0
 void cargarCostos()
 {
     if (DDLCategoria.SelectedValue != "0" && DDLTipoViaje.SelectedValue != "0")
     {
         //CARGAR COSTOS
         string    vQuery = "VIATICOS_Costos 3, '" + DDLCategoria.SelectedValue + "','" + DDLTipoViaje.SelectedValue + "'";
         DataTable vDatos = vConexion.obtenerDataTable(vQuery);
         foreach (DataRow item in vDatos.Rows)
         {
             txtCirculacion.Text = item["circulacion"].ToString();
             txtTransporte.Text  = item["transporte"].ToString();
             txtPeaje.Text       = item["peaje"].ToString();
             txtHospedaje.Text   = item["hospedaje"].ToString();
             txtDepre.Text       = item["depreciacion"].ToString();
             txtAlimento.Text    = item["alimento"].ToString();
             txtCABelice.Text    = item["CA_Belice"].ToString();
             txtAreaDolar.Text   = item["pais_dolar"].ToString();
             txtAreaNoDolar.Text = item["pais_Nodolar"].ToString();
         }
         UPCostoTotal.Update();
     }
     else
     {
         limpiar();
         limpiarMoneda();
         DIVInternacional.Visible = false;
         UPCostoTotal.Update();
     }
 }
Ejemplo n.º 2
0
        protected void btnModalCrear_Click(object sender, EventArgs e)
        {
            string vQuery = "VIATICOS_Costos 4, '" + DDLCategoria.SelectedValue + "','" + DDLTipoViaje.SelectedValue + "','" + txtCirculacion.Text + "'," +
                            "'" + txtTransporte.Text + "','" + txtPeaje.Text + "','" + txtAlimento.Text + "','" + txtDepre.Text + "','" + txtCABelice.Text + "','" + txtAreaDolar.Text + "'," +
                            "'" + txtAreaNoDolar.Text + "','" + txtHospedaje.Text + "'";
            DataTable vDatos = vConexion.obtenerDataTable(vQuery);

            ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "Pop", "closeModal();", true);
            limpiar();
            limpiarMoneda();
            DDLCategoria.SelectedValue = "0";
            DDLTipoViaje.SelectedValue = "0";
            UPCatTipoV.Update();
            UPCostoTotal.Update();
            Mensaje("Costos modificados con éxito.", WarningType.Success);
        }
Ejemplo n.º 3
0
 protected void DDLTipoViaje_TextChanged(object sender, EventArgs e)
 {
     cargarCostos();
     if (DDLTipoViaje.SelectedValue == "2")
     {
         LBMonedaCirculacion.InnerText = "Circulación $";
         LBMonedaTransporte.InnerText  = "Transporte $";
         LBMonedaPeaje.InnerText       = "Peaje $";
         LBMonedaHospedaje.InnerText   = "Hospedaje $";
         LBMonedaDepre.InnerText       = "Depreciación $";
         LBMonedaAlimento.InnerText    = "Alimento $";
         LBMonedaCAB.InnerText         = "Centro América y Belice $";
         LBMonedaPaisDolar.InnerText   = "Países área dolar $";
         LBPaisNoDolar.InnerText       = "Países área no dolar $";
         DIVInternacional.Visible      = true;
     }
     else if (DDLTipoViaje.SelectedValue == "1")
     {
         LBMonedaCirculacion.InnerText = "Circulación L.";
         LBMonedaTransporte.InnerText  = "Transporte L.";
         LBMonedaPeaje.InnerText       = "Peaje L.";
         LBMonedaHospedaje.InnerText   = "Hospedaje L.";
         LBMonedaDepre.InnerText       = "Depreciación L.";
         LBMonedaAlimento.InnerText    = "Alimento L.";
         LBMonedaCAB.InnerText         = "Centro América y Belice L.";
         LBMonedaPaisDolar.InnerText   = "Países área dolar L.";
         LBPaisNoDolar.InnerText       = "Países área no dolar L.";
         DIVInternacional.Visible      = false;
     }
     else
     {
         DIVInternacional.Visible = false;
         limpiarMoneda();
     }
     UPCostoTotal.Update();
 }