//CAMBIA LA AGENCIA private void ddlAgencia_SelectedIndexChanged(object sender, System.EventArgs e) { string nitResponsable = DBFunctions.SingleData("select mnit_nit from DBXSCHEMA.susuario where susu_login='******';"); pnlDatos.Visible = false; pnlPlanilla.Visible = true; //pnlConcepto.Visible=true; //ddlConcepto.SelectedIndex=0; pnlDatos.Visible = false; txtPlaca.Enabled = true; if (ddlTipoAsociar.SelectedValue.Equals("A")) { Label10.Text = "Agencia :"; txtPlaca.Text = ddlAgencia.SelectedValue; txtPlaca.Enabled = false; } else if (ddlTipoAsociar.SelectedValue.Equals("B")) { Label10.Text = "Placa del Bus :"; txtPlaca.Text = ""; } else if (ddlTipoAsociar.SelectedValue.Equals("C")) { txtPlaca.Text = DBFunctions.SingleData("SELECT * FROM palmacen WHERE palm_descripcion='ADMINISTRACION';"); txtPlaca.Enabled = false; } int agencia = Convert.ToInt16(ddlAgencia.SelectedValue); Agencias.TraerPersonalAgencia(ddlPersonalAgencia, agencia); ddlPersonalAgencia.Items.Insert(0, new ListItem("--Seleccione--", "")); }
private void Page_Load(object sender, System.EventArgs e) { Ajax.Utility.RegisterTypeForAjax(typeof(Comercial.AMS_Comercial_ModificarViaje)); if (!IsPostBack) { DatasToControls bind = new DatasToControls(); Agencias.TraerAgenciasUsuario(ddlAgencia); if (ddlAgencia.Items.Count > 0) { ddlAgencia_SelectedIndexChanged(sender, e); } bind.PutDatasIntoDropDownList(ddlProgramacion, "select tprog_tipoprog,tprog_nombre from DBXSCHEMA.tprogramacionruta"); ddlProgramacion.Items.Insert(0, new ListItem("---Programacion---", "")); bind.PutDatasIntoDropDownList(ddlConfiguracion, "select MCON_COD, 'Conf:[' concat rtrim(char(MCON_COD)) concat '] Puestos:[' concat rtrim(char(PUESTOS_PASAJEROS)) concat '] [' concat NOMBRE concat ']' from DBXSCHEMA.MCONFIGURACIONBUS ORDER BY NOMBRE"); ddlConfiguracion.Items.Insert(0, new ListItem("---Configuracion---", "")); if (Request.QueryString["act"] != null) { Utils.MostrarAlerta(Response, " El viaje ha sido modificado."); } for (int i = 0; i < 24; i++) { ddlHora.Items.Add(new ListItem(i.ToString("00"), i.ToString())); } for (int i = 0; i < 60; i++) { ddlMinuto.Items.Add(new ListItem(i.ToString("00"), i.ToString())); } } }
private void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) { string asignacion = DBFunctions.SingleData("SELECT MASIGNACION_NUMERO+1 FROM DBXSCHEMA.MASIGNACION_PAPELERIA ORDER BY MASIGNACION_NUMERO DESC FETCH FIRST 1 ROWS ONLY;"); if (asignacion.Length == 0) { asignacion = "1"; } Agencias.TraerAgenciasPrefijoUsuario(ddlAgencia); lblNumero.Text = asignacion; lblFecha.Text = DateTime.Now.ToString("yyyy-MM-dd"); //TIPOS DE DOCUMENTOS DataSet dsTiposDoc = new DataSet(); DBFunctions.Request(dsTiposDoc, IncludeSchema.NO, "select tdoc_codigo concat case when prefijo='S' then '|' else '' end as valor,tdoc_nombre as texto from DBXSCHEMA.TDOCU_TRANS WHERE PAPELERIA='S' ORDER BY TDOC_NOMBRE;"); DataRow drC = dsTiposDoc.Tables[0].NewRow(); drC[0] = ""; drC[1] = "---seleccione---"; dsTiposDoc.Tables[0].Rows.InsertAt(drC, 0); ViewState.Add("dtTiposDocumentos", dsTiposDoc.Tables[0]); MostrarTabla(); ConsultarCapacidadTalonarios(); if (Request.QueryString["act"] != null && Request.QueryString["asg"] != null) { Utils.MostrarAlerta(Response, "La asignación ha sido creada con el número de asignación " + Request.QueryString["asg"]); Response.Write("<script language:javascript>w=window.open('../aspx/AMS.Comercial.AsignacionPapeleria.aspx?asg=" + Request.QueryString["asg"] + "','ASIGPAPELERIA" + Request.QueryString["asg"] + "','width=340,height=290,top=0,left=0,toolbar=no,menubar=no,status=no,scrollbars=no,history=no');</script>"); //Utils.MostrarAlerta(Response, "La asignación ha sido creada con el número de asignación " + Request.QueryString["asg"] + ".');" + // "window.open('../aspx/AMS.Comercial.AsignacionPapeleria.aspx?asg=" + Request.QueryString["asg"] + "','ASIGPAPELERIA" + Request.QueryString["asg"] + "',\"width=340,height=290,top=0,left=0,toolbar=no,menubar=no,status=no,scrollbars=no,history=no\""); } } }
private void Page_Load(object sender, System.EventArgs e) { // Introducir aquí el código de usuario para inicializar la página if (!IsPostBack) { Agencias.TraerPeriodo(ddlperiodo); btnPrecierrePeriodo.Visible = false; btnCerrarPeriodo.Visible = false; } if (IsPostBack) { if (estado == "C") { btnPrecierrePeriodo.Visible = false; btnCerrarPeriodo.Visible = false; } else { btnPrecierrePeriodo.Visible = true; btnCerrarPeriodo.Visible = true; } } }
private void Page_Load(object sender, System.EventArgs e) { // Introducir aquí el código de usuario para inicializar la página Ajax.Utility.RegisterTypeForAjax(typeof(AMS.Comercial.AMS_Comercial_RecepcionGiros)); if (!IsPostBack) { DatasToControls bind = new DatasToControls(); Agencias.TraerAgenciasUsuario(ddlAgenciaO); //Todas las agencias bind.PutDatasIntoDropDownList(ddlAgenciaD, "select ma.mag_codigo,ma.mage_nombre from DBXSCHEMA.magencia ma order by ma.mage_nombre"); //Tipo Docs bind.PutDatasIntoDropDownList(txtNITEmisorc, "select TNIT_TIPONIT, TNIT_NOMBRE FROM DBXSCHEMA.TNIT;"); txtNITEmisorc.SelectedIndex = txtNITEmisorc.Items.IndexOf(txtNITEmisorc.Items.FindByValue("C")); bind.PutDatasIntoDropDownList(txtNITReceptorc, "select TNIT_TIPONIT, TNIT_NOMBRE FROM DBXSCHEMA.TNIT;"); txtNITReceptorc.SelectedIndex = txtNITReceptorc.Items.IndexOf(txtNITReceptorc.Items.FindByValue("C")); //NIT txtNITEmisor.Attributes.Add("onKeyDown", "return(KeyDownHandlerNIT(this));"); txtNITReceptor.Attributes.Add("onKeyDown", "return(KeyDownHandlerNIT(this));"); ListItem it = new ListItem("---no definida---", ""); ddlPlanilla.Items.Add(it); btnGuardar.Attributes.Add("onClick", "return(validarGiro());"); if (Request.QueryString["act"] != null && Request.QueryString["gir"] != null) { Response.Write("<script language='javascript'>alert('El giro ha sido registrado con el número " + Request.QueryString["gir"] + ".');</script>"); } ViewState["PorcentajeGiro"] = Convert.ToDouble(DBFunctions.SingleData("SELECT VALOR_PORCENTAJE FROM DBXSCHEMA.TPORCENTAJESTRANSPORTES WHERE CLAVE='GIRO';")).ToString("0"); ViewState["Giro"] = "0"; } strPorcentajeGiro = ViewState["PorcentajeGiro"].ToString(); }
private void Page_Load(object sender, System.EventArgs e) { // Introducir aquí el código de usuario para inicializar la página if (!IsPostBack) { Agencias.TraerAgenciasUsuario(ddlAgencia); txtFecha.Text = DateTime.Now.ToString("yyyy-MM-dd"); } }
private void Page_Load(object sender, System.EventArgs e) { btnEliminar.Enabled = false; string nitResponsable = DBFunctions.SingleData("select mnit_nit from DBXSCHEMA.susuario where susu_login='******';"); Agencias.TraerAgenciasUsuario(ddlAgencia); // Introducir aquí el código de usuario para inicializar la página }
private void Page_Load(object sender, System.EventArgs e) { // Introducir aquí el código de usuario para inicializar la página if (!IsPostBack) { Agencias.TraerAgenciasUsuario(ddlAgencia); if (Request.QueryString["act"] != null) { Utils.MostrarAlerta(Response, "' " + Request.QueryString["mensaje"] + " ."); lblError.Text = Request.QueryString["mensaje"] + " Planilla numero: " + Request.QueryString["pla"]; } } }
private void Page_Load(object sender, System.EventArgs e) { // Introducir aquí el código de usuario para inicializar la página if (!IsPostBack) { Agencias.TraerAgenciasUsuario(ddlAgencia); Agencias.TraerCargosEmpleados(ddlCargo); ddlCargo.Items.Insert(0, new ListItem("---seleccione---", "")); if (ddlAgencia.Items.Count > 0) { ddlAgencia_SelectedIndexChanged(sender, e); } } }
private void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) { Agencias.TraerAgenciasUsuario(ddlAgencia); DatasToControls bind = new DatasToControls(); bind.PutDatasIntoDropDownList(ddlMotivo, "select TCON_CODIGO as valor, TCON_DESCRIPCION as texto from DBXSCHEMA.TCONCEPTO_ANULACION_TIQUETE ORDER BY TCON_DESCRIPCION;"); ddlMotivo.Items.Insert(0, new ListItem("---seleccione---", "")); if (Request.QueryString["act"] != null) { Utils.MostrarAlerta(Response, "El tiquete ha sido anulado."); } } }
private void Page_Load(object sender, System.EventArgs e) { // Introducir aquí el código de usuario para inicializar la página if (!IsPostBack) { Agencias.TraerAgenciasUsuario(ddlAgencia); DatasToControls bind = new DatasToControls(); bind.PutDatasIntoDropDownList(ddlAgenciaS, "select mag_codigo,mage_nombre from DBXSCHEMA.magencia;"); ddlAgenciaS.Items.Add(new ListItem("--todas--", "")); if (ddlAgencia.Items.Count > 0) { ddlAgencia_SelectedIndexChanged(sender, e); } } }
private void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) { DatasToControls bind = new DatasToControls(); Agencias.TraerAgenciasUsuario(ddlAgenciaD); bind.PutDatasIntoDropDownList(ddlAgenciaO, "select ma.mag_codigo,ma.mage_nombre " + "from DBXSCHEMA.magencia ma order by ma.mage_nombre"); CargarDocumentos(); if (Request.QueryString["act"] != null) { Utils.MostrarAlerta(Response, " El giro ha sido pagado."); } } }
private void Page_Load(object sender, System.EventArgs e) { // Introducir aquí el código de usuario para inicializar la página // Introducir aquí el código de usuario para inicializar la página if (!IsPostBack) { //Agencias Agencias.TraerAgenciasUsuario(ddlAgencia); ddlAgencia.Items.Insert(0, new ListItem("No asignada", "0")); //Tipos DataSet dsTipos = new DataSet(); DatasToControls bind = new DatasToControls(); bind.PutDatasIntoDropDownList(ddlTipoDocumento, "select tdoc_codigo as valor,tdoc_nombre as texto from DBXSCHEMA.TDOCU_TRANS ORDER BY tdoc_nombre;"); } }
private void Page_Load(object sender, System.EventArgs e) { // Introducir aquí el código de usuario para inicializar la página if (!IsPostBack) { Agencias.TraerAgenciasUsuario(ddlAgencia); txtFechaI.Text = txtFechaF.Text = DateTime.Now.ToString("yyyy-MM-dd"); } responsable = txtNITTiquetero.Text; if (ddlAgencia.SelectedValue.Length == 0) { Utils.MostrarAlerta(Response, "Debe dar la agencia."); return; } //cargarinformacion(); }
private void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) { if (Convert.ToInt32(Request.QueryString["recarga"]) == 1) { //Se guardo la informacion y se muestra la rta. Response.Write("<script language='javascript'>alert('Se ha relacionado el elemento a la planilla.');</script>"); } Agencias.TraerAgenciasUsuario(ddlAgencia); if (ddlAgencia.Items.Count > 0) { ddlAgencia_SelectedIndexChanged(sender, e); } } }
private void Page_Load(object sender, System.EventArgs e) { // Introducir aquí el código de usuario para inicializar la página Ajax.Utility.RegisterTypeForAjax(typeof(AMS.Comercial.AMS_Comercial_RecepcionEncomiendas)); if (!IsPostBack) { DatasToControls bind = new DatasToControls(); Agencias.TraerAgenciasUsuario(ddlAgencia); //Rutas if (ddlAgencia.Items.Count > 0) { ddlAgencia_SelectedIndexChanged(sender, e); } //Tipo Docs bind.PutDatasIntoDropDownList(txtNITEmisorc, "select TNIT_TIPONIT, TNIT_NOMBRE FROM DBXSCHEMA.TNIT;"); txtNITEmisorc.SelectedIndex = txtNITEmisorc.Items.IndexOf(txtNITEmisorc.Items.FindByValue("C")); bind.PutDatasIntoDropDownList(txtNITReceptorc, "select TNIT_TIPONIT, TNIT_NOMBRE FROM DBXSCHEMA.TNIT;"); txtNITReceptorc.SelectedIndex = txtNITReceptorc.Items.IndexOf(txtNITReceptorc.Items.FindByValue("C")); //NIT txtNITEmisor.Attributes.Add("onKeyDown", "return(KeyDownHandlerNIT(this));"); txtNITReceptor.Attributes.Add("onKeyDown", "return(KeyDownHandlerNIT(this));"); ListItem it = new ListItem("---seleccione---", ""); ddlRuta.Items.Insert(0, it); btnGuardar.Attributes.Add("onClick", "return(validarEncomienda());"); txtFecha.Text = DateTime.Now.ToString("yyyy-MM-dd"); if (ConfigurationManager.AppSettings["DiferenteFechaRemesa"] == "SI") { txtFecha.Enabled = true; } else { txtFecha.Enabled = false; } if (Request.QueryString["act"] != null && Request.QueryString["enc"] != null) { Response.Write("<script language='javascript'>alert('La encomienda se ha registrado con el número " + Request.QueryString["enc"] + ".');</script>"); } ViewState["Encomienda"] = "0"; ViewState["FactorPeso"] = "0"; ViewState["FactorVolumen"] = "0"; } strFactorPeso = ViewState["FactorPeso"].ToString(); strFactorVolumen = ViewState["FactorVolumen"].ToString(); }
//AMS.documentos impresion; private void Page_Load(object sender, System.EventArgs e) { // Introducir aquí el código de usuario para inicializar la página if (!IsPostBack) { Agencias.TraerAgenciasUsuario(ddlAgencia); txtFCierre.Text = DateTime.Now.ToString("yyyy-MM-dd"); btnCerrar.Visible = false; } if (IsPostBack) { //cargarInformacio(); btnCerrar.Visible = false; Ver.Visible = false; lblError.Text = " "; } }
private void Page_Load(object sender, System.EventArgs e) { Ajax.Utility.RegisterTypeForAjax(typeof(AMS.Comercial.AMS_Comercial_PlanillarViaje)); if (!IsPostBack) { //Agencias usuario Agencias.TraerAgenciasUsuario(ddlAgencia); if (Request.QueryString["act"] != null && Request.QueryString["pln"] != null) { Response.Write("<script language='javascript'>alert('El viaje ha sido planillado con el número de planilla " + Request.QueryString["pln"] + ".');</script>"); } txtFecha.Text = DateTime.Now.ToString("yyyy-MM-dd"); if (ddlAgencia.Items.Count > 0) { ddlAgencia_SelectedIndexChanged(sender, e); } } }
private void Page_Load(object sender, System.EventArgs e) { // Introducir aquí el código de usuario para inicializar la página if (!IsPostBack) { Agencias.TraerAgenciasUsuario(ddlAgencia); //Rutas if (ddlAgencia.Items.Count > 0) { ddlAgencia_SelectedIndexChanged(sender, e); } ListItem it = new ListItem("---seleccione---", ""); ddlRuta.Items.Insert(0, it); if (Request.QueryString["act"] != null) { Utils.MostrarAlerta(Response, "La encomienda se ha entregado."); } } }
private void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) { DatasToControls bind = new DatasToControls(); //Traer agencias del usuario Agencias.TraerAgenciasUsuario(ddlAgencia); if (ddlAgencia.Items.Count > 0) { ddlAgencia_SelectedIndexChanged(sender, e); } bind.PutDatasIntoDropDownList(ddlEstado, "select testa_codigo, testa_descripcion " + "from DBXSCHEMA.TESTADOBUSAFILIADO where testa_codigo>0;"); ddlEstado.Items.Insert(0, new ListItem("---Seleccione---", "")); if (Request.QueryString["act"] != null) { Utils.MostrarAlerta(Response, " El bus ha sido ubicado en la agencia"); } } }
private void Page_Load(object sender, System.EventArgs e) { // Introducir aquí el código de usuario para inicializar la página if (!IsPostBack) { string anulacion = DBFunctions.SingleData("SELECT MANULACION_NUMERO+1 FROM DBXSCHEMA.MANULACION_PAPELERIA ORDER BY MANULACION_NUMERO DESC FETCH FIRST 1 ROWS ONLY;"); if (anulacion.Length == 0) { anulacion = "1"; } lblNumero.Text = anulacion; lblFecha.Text = DateTime.Now.ToString("yyyy-MM-dd"); //AGENCIAS Agencias.TraerAgenciasPrefijoUsuario(ddlAgencia); //TIPOS DE DOCUMENTOS DataSet dsTiposDoc = new DataSet(); DBFunctions.Request(dsTiposDoc, IncludeSchema.NO, "select tdoc_codigo concat case when prefijo='S' then '|' else '' end as valor,tdoc_nombre as texto from DBXSCHEMA.TDOCU_TRANS WHERE PAPELERIA='S' ORDER BY TDOC_NOMBRE;"); DataRow drC = dsTiposDoc.Tables[0].NewRow(); drC[0] = ""; drC[1] = "---seleccione---"; dsTiposDoc.Tables[0].Rows.InsertAt(drC, 0); ViewState.Add("dtTiposDocumentos", dsTiposDoc.Tables[0]); //CONCEPTOS ANULACION DataSet dsTiposAnul = new DataSet(); DBFunctions.Request(dsTiposAnul, IncludeSchema.NO, "select rtrim(char(tcon_codigo)) as valor,tcon_descripcion as texto from DBXSCHEMA.TCONCEPTO_ANULACION_PAPELERIA ORDER BY TCON_DESCRIPCION;"); drC = dsTiposAnul.Tables[0].NewRow(); drC[0] = ""; drC[1] = "---seleccione---"; dsTiposAnul.Tables[0].Rows.InsertAt(drC, 0); ViewState.Add("dtTiposAnulacion", dsTiposAnul.Tables[0]); if (Request.QueryString["act"] != null && Request.QueryString["anl"] != null) { Utils.MostrarAlerta(Response, "La papelería ha sido anulada con el número de anulación " + Request.QueryString["anl"] + "."); } } }
private void Page_Load(object sender, System.EventArgs e) { // Introducir aquí el código de usuario para inicializar la página if (!IsPostBack) { //Agencias Agencias.TraerAgenciasUsuario(ddlAgencia); //Agencias.TraerAgenciasPrefijoUsuario(ddlAgencia); //Tipos DataRow drC; DataSet dsTipos = new DataSet(); DBFunctions.Request(dsTipos, IncludeSchema.NO, "select tdoc_codigo as valor,tdoc_nombre as texto from DBXSCHEMA.TDOCU_TRANS where PAPELERIA = 'S' ORDER BY tdoc_nombre;"); drC = dsTipos.Tables[0].NewRow(); ddlTipoDocumento.DataSource = dsTipos.Tables[0]; ddlTipoDocumento.DataTextField = "texto"; ddlTipoDocumento.DataValueField = "valor"; ddlTipoDocumento.DataBind(); } }
private void btnConsultar_Click(object sender, System.EventArgs e) { pnlBuscar.Visible = true; ViewState["Operacion"] = "B"; //Agencias Agencias.TraerAgencias(ddlAgencia1); ddlAgencia.Items.Insert(0, new ListItem("Todas", "0")); ddlAgencia.DataBind(); //Cargo DataRow drCargo; DataSet dsCargos = new DataSet(); DBFunctions.Request(dsCargos, IncludeSchema.NO, "Select PCAR_CODIGO AS VALOR,PCAR_DESCRIPCION AS TEXTO from DBXSCHEMA.PCARGOS_TRANSPORTES ORDER BY PCAR_DESCRIPCION ;"); drCargo = dsCargos.Tables[0].NewRow(); drCargo[0] = 0; drCargo[1] = "Todos"; dsCargos.Tables[0].Rows.InsertAt(drCargo, 0); ddlCargo1.DataSource = dsCargos.Tables[0]; ddlCargo1.DataTextField = "texto"; ddlCargo1.DataValueField = "valor"; ddlCargo1.DataBind(); //Conceptos DataRow drConcepto; DataSet dsConceptos = new DataSet(); DBFunctions.Request(dsConceptos, IncludeSchema.NO, "Select TCON_CODIGO AS VALOR,NOMBRE AS TEXTO from DBXSCHEMA.TCONCEPTOS_TRANSPORTES WHERE TDOC_CODIGO = 'ANT' ORDER BY NOMBRE;"); drConcepto = dsConceptos.Tables[0].NewRow(); drConcepto[0] = 0; drConcepto[1] = "Todos"; dsConceptos.Tables[0].Rows.InsertAt(drConcepto, 0); ddlConcepto1.DataSource = dsConceptos.Tables[0]; ddlConcepto1.DataTextField = "texto"; ddlConcepto1.DataValueField = "valor"; ddlConcepto1.DataBind(); pnlBuscar.Visible = true; }
private void SeleccionarConsulta() { //Agencias Agencias.TraerAgenciasUsuario(ddlAgencia); ddlAgencia.Items.Insert(0, new ListItem("Agencias Asignadas", "0")); //Conceptos DataRow drConcepto; DataSet dsConceptos = new DataSet(); DBFunctions.Request(dsConceptos, IncludeSchema.NO, "Select TCON_CODIGO AS VALOR,NOMBRE AS TEXTO from DBXSCHEMA.TCONCEPTOS_TRANSPORTES WHERE TDOC_CODIGO = 'ANT';"); drConcepto = dsConceptos.Tables[0].NewRow(); drConcepto[0] = 0; drConcepto[1] = "Todos"; dsConceptos.Tables[0].Rows.InsertAt(drConcepto, 0); ddlConcepto.DataSource = dsConceptos.Tables[0]; ddlConcepto.DataTextField = "texto"; ddlConcepto.DataValueField = "valor"; ddlConcepto.DataBind(); }
private void Page_Load(object sender, System.EventArgs e) { Ajax.Utility.RegisterTypeForAjax(typeof(Comercial.AMS_Comercial_CrearViaje)); if (!IsPostBack) { DatasToControls bind = new DatasToControls(); Agencias.TraerAgenciasUsuario(ddlAgencia); txtNumeroBus.Attributes.Add("onKeyDown", "return(KeyDownHandlerBus(this));"); if (ddlAgencia.Items.Count > 0) { ddlAgencia_SelectedIndexChanged(sender, e); } bind.PutDatasIntoDropDownList(ddlProgramacion, "select tprog_tipoprog,tprog_nombre from DBXSCHEMA.tprogramacionruta"); ddlProgramacion.Items.Insert(0, new ListItem("---No asignada---", "")); for (int i = 0; i < 24; i++) { ddlHora.Items.Add(new ListItem(i.ToString("00"), i.ToString())); } for (int i = 0; i < 60; i++) { ddlMinuto.Items.Add(new ListItem(i.ToString("00"), i.ToString())); } bind.PutDatasIntoDropDownList(ddlConfiguracion, "select MCON_COD, '[' concat rtrim(char(MCON_COD)) concat '] [' concat NOMBRE concat ']' from DBXSCHEMA.MCONFIGURACIONBUS ORDER BY NOMBRE;"); ddlConfiguracion.Items.Insert(0, new ListItem("---Configuracion---", "")); if (Request.QueryString["act"] != null && Request.QueryString["num"] != null) { string msg = "El viaje ha sido creado con el número " + Request.QueryString["num"]; if (Request.QueryString["pla"] != null) { msg += " y el número de planilla " + Request.QueryString["pla"]; } msg += "."; Utils.MostrarAlerta(Response, "" + msg + ""); } txtFecha.Text = DateTime.Now.ToString("yyyy-MM-dd"); } }
private void Page_Load(object sender, System.EventArgs e) { Ajax.Utility.RegisterTypeForAjax(typeof(AMS_Comercial_PlanillaManual)); Response.Cache.SetCacheability(HttpCacheability.NoCache); if (!IsPostBack) { Agencias.TraerAgenciasPrefijoUsuario(ddlAgencia); txtPlaca.Attributes.Add("onKeyDown", "return(KeyDownHandler(this));"); txtFecha.Text = DateTime.Now.ToString("yyyy-MM-dd"); //Horas-minutos for (int i = 0; i < 24; i++) { ddlHora.Items.Add(new ListItem(i.ToString("00"), i.ToString())); } for (int i = 0; i < 60; i++) { ddlMinuto.Items.Add(new ListItem(i.ToString("00"), i.ToString())); } //Cargar conceptos anulacion etc. CargarConceptos(); //Seleccionar agencia if (ddlAgencia.Items.Count > 0) { ddlAgencia_SelectedIndexChanged(sender, e); } //Actualizo? if (Request.QueryString["act"] != null && Request.QueryString["pln"] != null) { Response.Write("<script language='javascript'>alert('La planilla ha sido registrada con el numero " + Request.QueryString["pln"] + ".');</script>"); } } }
private void Page_Load(object sender, System.EventArgs e) { // Introducir aquí el código de usuario para inicializar la página if (!IsPostBack) { /* * DataRow drC; * //Agencias * DataSet dsAgencias=new DataSet(); * DBFunctions.Request(dsAgencias,IncludeSchema.NO, * "select rtrim(char(mag_codigo)) as valor,mage_nombre as texto from DBXSCHEMA.MAGENCIA ORDER BY mage_nombre;"); * drC=dsAgencias.Tables[0].NewRow(); * drC[0]=""; * drC[1]="Todas"; * dsAgencias.Tables[0].Rows.InsertAt(drC,0); * ddlAgencia.DataSource=dsAgencias.Tables[0]; * ddlAgencia.DataTextField="texto"; * ddlAgencia.DataValueField="valor"; * ddlAgencia.DataBind(); */ Agencias.TraerAgenciasUsuario(ddlAgencia); ddlAgencia.Items.Insert(0, new ListItem("Todas", "0")); //Conceptos DataRow drConcepto; DataSet dsConceptos = new DataSet(); DBFunctions.Request(dsConceptos, IncludeSchema.NO, "Select TCON_CODIGO AS VALOR,NOMBRE concat ' [' concat rtrim(char(TCON_CODIGO)) concat ']' AS TEXTO from DBXSCHEMA.TCONCEPTOS_TRANSPORTES WHERE TDOC_CODIGO = 'ANT' ORDER BY NOMBRE;"); drConcepto = dsConceptos.Tables[0].NewRow(); drConcepto[0] = 0; drConcepto[1] = "Todos"; dsConceptos.Tables[0].Rows.InsertAt(drConcepto, 0); ddlConcepto.DataSource = dsConceptos.Tables[0]; ddlConcepto.DataTextField = "texto"; ddlConcepto.DataValueField = "valor"; ddlConcepto.DataBind(); } }
private void Page_Load(object sender, System.EventArgs e) { // Introducir aquí el código de usuario para inicializar la página if (!IsPostBack) { //Agencias Agencias.TraerAgenciasUsuario(ddlAgencia); ddlAgencia.Items.Insert(0, new ListItem("Todas", "0")); //Tipos DataRow drC; DataSet dsTipos = new DataSet(); DBFunctions.Request(dsTipos, IncludeSchema.NO, "select tdoc_codigo as valor,tdoc_nombre as texto from DBXSCHEMA.TDOCU_TRANS ORDER BY tdoc_nombre;"); drC = dsTipos.Tables[0].NewRow(); drC[0] = ""; drC[1] = "Todos"; dsTipos.Tables[0].Rows.InsertAt(drC, 0); ddlTipoDocumento.DataSource = dsTipos.Tables[0]; ddlTipoDocumento.DataTextField = "texto"; ddlTipoDocumento.DataValueField = "valor"; ddlTipoDocumento.DataBind(); } }
private void Page_Load(object sender, System.EventArgs e) { Response.Cache.SetCacheability(HttpCacheability.NoCache); Ajax.Utility.RegisterTypeForAjax(typeof(AMS_Comercial_AnticiposManuales)); if (!IsPostBack) { DatasToControls bind = new DatasToControls(); Agencias.TraerAgenciasUsuario(ddlAgencia); ddlAgencia.Items.Insert(0, new ListItem("--Seleccione--", "0")); Agencias.TraerAgencias(ddlAgenciaPapeleria); ddlAgenciaPapeleria.Items.Insert(0, new ListItem("--Agencia Papeleria Anticipo--", "")); //btnGuardar.Attributes.Add("onClick", "return(validarGasto());"); txtFecha.Text = DateTime.Now.ToString("yyyy-MM-dd"); txtCantidad.Attributes.Add("onkeyup", "NumericMask(this);Totales();"); txtValorUnidad.Attributes.Add("onkeyup", "NumericMask(this);Totales();"); txtNIT.Attributes.Add("onKeyDown", "KeyDownHandlerNIT();if(event.keyCode==13)return(false);"); } }
private void Page_Load(object sender, System.EventArgs e) { // Introducir aquí el código de usuario para inicializar la página if (!IsPostBack) { Agencias.TraerAgenciasUsuario(ddlAgencia); if (ddlAgencia.Items.Count > 0) { ddlAgencia_SelectedIndexChanged(sender, e); } txtFechaI.Text = txtFechaF.Text = DateTime.Now.ToString("yyyy-MM-dd"); for (int i = 0; i < 24; i++) { ddlHoraI.Items.Add(new ListItem(i.ToString("00"), i.ToString())); ddlHoraF.Items.Add(new ListItem(i.ToString("00"), i.ToString())); } for (int i = 0; i < 60; i++) { ddlMinutoI.Items.Add(new ListItem(i.ToString("00"), i.ToString())); ddlMinutoF.Items.Add(new ListItem(i.ToString("00"), i.ToString())); } } }