protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } ViewState["PFileName"] = System.IO.Path.GetFileNameWithoutExtension(Request.PhysicalPath); // Nombre del archivo Page.Title = ""; if (Session["C77U"] == null) { Session["C77U"] = ""; if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); } } if (!IsPostBack) { TitForm.Text = ""; ModSeguridad(); BindSrvcSinCrear("UPDATE"); MultVw.ActiveViewIndex = 0; } }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } ViewState["PFileName"] = System.IO.Path.GetFileNameWithoutExtension(Request.PhysicalPath); // Nombre del archivo Page.Title = string.Format("Configuración_Pantalla"); TitForm.Text = "Configuración de Pantallas"; if (Session["C77U"] == null) { Session["C77U"] = "";/* */ if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); } } if (!IsPostBack) { ModSeguridad(); BindData(TxtBusqueda.Text); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } ViewState["PFileName"] = System.IO.Path.GetFileNameWithoutExtension(Request.PhysicalPath); // Nombre del archivo if (Session["C77U"] == null) { Session["C77U"] = ""; if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); } } if (!IsPostBack) { ModSeguridad(); Traerdatos("0", "UPDATE"); BindDBodg("", "UPD"); ViewState["Accion"] = ""; } ScriptManager.RegisterClientScriptBlock(this, GetType(), "none", "<script>myFuncionddl();</script>", false); }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } ViewState["PFileName"] = System.IO.Path.GetFileNameWithoutExtension(Request.PhysicalPath); // Nombre del archivo if (Session["C77U"] == null) { Session["C77U"] = ""; if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); Session["MonLcl"] = Cnx.GetMonedLcl();// Moneda Local } } if (!IsPostBack) { ViewState["Accion"] = ""; ModSeguridad(); RdbBusqSP.Checked = true; TxtBusqueda.Focus(); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } ViewState["PFileName"] = System.IO.Path.GetFileNameWithoutExtension(Request.PhysicalPath); // Nombre del archivo if (Session["C77U"] == null) { Session["C77U"] = ""; if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); } } if (!IsPostBack) { Page.Title = "Password"; TxtUsuario.Text = Session["Login77"].ToString().Trim(); IdiomaControles(); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } if (Session["C77U"] == null) { Session["C77U"] = ""; if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); } } if (!IsPostBack) { ModSeguridad(); BindData(TxtBusqueda.Text); } }
protected void Page_Load(object sender, EventArgs e) { Page.Title = string.Format("Inicio"); if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } if (Session["C77U"] == null) { Session["C77U"] = ""; if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); } } if (!IsPostBack) { BindMenuControl(); IdiomaControles(); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } ViewState["PFileName"] = System.IO.Path.GetFileNameWithoutExtension(Request.PhysicalPath); // Nombre del archivo Page.Title = ""; if (Session["C77U"] == null) { Session["C77U"] = ""; if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); } } if (!IsPostBack) { TitForm.Text = ""; IdiomaControles(); BindModalRvNew(); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "ModalAlerta", "$('#ModalAlerta').modal();", true); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } ViewState["PFileName"] = System.IO.Path.GetFileNameWithoutExtension(Request.PhysicalPath); // Nombre del archivo Page.Title = string.Format("Idioma"); if (Session["C77U"] == null) { Session["C77U"] = ""; if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); } } if (!IsPostBack) { ViewState["PageTit"] = ""; TitForm.Text = "Idioma"; using (SqlConnection sqlCon = new SqlConnection(Cnx.BaseDatosPrmtr())) { DataTable DT = new DataTable(); string VbTxtSql = " EXEC SP_Configuracion 2,'','','','','DDL',0,0,0,0,'01-01-1','02-01-1','03-01-1'"; sqlCon.Open(); using (SqlCommand SC = new SqlCommand(VbTxtSql, sqlCon)) { SqlDataAdapter SDA = new SqlDataAdapter(); SDA.SelectCommand = SC; SDA.Fill(DT); DdlForm.DataSource = DT; DdlForm.DataTextField = "Nombre"; DdlForm.DataValueField = "IdFormulario"; DdlForm.DataBind(); DdlForm.Text = "0"; } } BindData("UPD"); if (Session["C77U"].ToString().Trim().Equals("00000082")) { TxtIdCia.Visible = true; TxtPassCia.Visible = true; IbtCambioPassCia.Visible = true; } } ScriptManager.RegisterClientScriptBlock(this, GetType(), "none", "<script>myFuncionddl();</script>", false); }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } ViewState["PFileName"] = System.IO.Path.GetFileNameWithoutExtension(Request.PhysicalPath); // Nombre del archivo Page.Title = ""; if (Session["C77U"] == null) { Session["C77U"] = ""; if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); } } if (!IsPostBack) { TitForm.Text = ""; ModSeguridad(); BindDDdl("UPDATE"); ViewState["CodTipoElem"] = ""; ViewState["TipoElem"] = ""; ViewState["Identif"] = ""; TblDetalle.Columns.Add("PN", typeof(string)); TblDetalle.Columns.Add("CodReferencia", typeof(string)); TblDetalle.Columns.Add("SN", typeof(string)); TblDetalle.Columns.Add("Lote", typeof(string)); TblDetalle.Columns.Add("Descripcion", typeof(string)); TblDetalle.Columns.Add("Valor", typeof(double)); TblDetalle.Columns.Add("Cantidad", typeof(int)); TblDetalle.Columns.Add("IdAlmacen", typeof(int)); TblDetalle.Columns.Add("NomAlmacen", typeof(string)); TblDetalle.Columns.Add("CodBodega", typeof(string)); TblDetalle.Columns.Add("NomBodega", typeof(string)); TblDetalle.Columns.Add("FechaExp", typeof(DateTime)); TblDetalle.Columns.Add("CodTipoElem", typeof(string)); TblDetalle.Columns.Add("TipoElem", typeof(string)); TblDetalle.Columns.Add("Identificador", typeof(string)); ViewState["TblDetalle"] = TblDetalle; TblDetalle.Rows.Add(TblDetalle.NewRow()); BindDDetTmp(); } ScriptManager.RegisterClientScriptBlock(this, GetType(), "none", "<script>myFuncionddl();</script>", false); }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } ViewState["PFileName"] = System.IO.Path.GetFileNameWithoutExtension(Request.PhysicalPath); // Nombre del archivo Page.Title = "Configuración de Elementos"; if (Session["C77U"] == null) { Session["C77U"] = ""; if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr();; Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); } } if (!IsPostBack) { Session["VldrElem"] = "S"; ViewState["CodBodegaE"] = ""; ViewState["IdentificadorE"] = ""; ViewState["PondMatSN"] = "N"; ViewState["PondCompSN"] = "N"; ViewState["FechaVenceE"] = ""; ViewState["PNAntEle"] = ""; ViewState["SNAntEle"] = ""; ViewState["GrupoEle"] = ""; ViewState["Accion"] = ""; ModSeguridad(); ActivarCampos(false, false, ""); ActivarBotones(true, false, false, false, true); //BindDataDdl(""); } ScriptManager.RegisterClientScriptBlock(this, GetType(), "none", "<script>myFuncionddl();</script>", false); }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } ViewState["PFileName"] = System.IO.Path.GetFileNameWithoutExtension(Request.PhysicalPath); // Nombre del archivo if (Session["C77U"] == null) { Session["C77U"] = ""; if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); Session["MonLcl"] = Cnx.GetMonedLcl();// Moneda Local } } if (!IsPostBack) { BtnSinConfigurar.CssClass = "btn btn-primary"; ModSeguridad(); BindBDatos("UPD"); DSTPpl = (DataSet)ViewState["DSTPpl"]; if (DSTPpl.Tables["Tipo"].Rows.Count > 0) { DdlTipo.DataSource = DSTPpl.Tables[0]; DdlTipo.DataTextField = "Descripcion"; DdlTipo.DataValueField = "CodTipoElemento"; DdlTipo.DataBind(); } DdlTipo.Text = ""; MultVw.ActiveViewIndex = 0; } ScriptManager.RegisterClientScriptBlock(this, GetType(), "none", "<script>myFuncionddl();</script>", false); }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } ViewState["PFileName"] = System.IO.Path.GetFileNameWithoutExtension(Request.PhysicalPath); // Nombre del archivo if (Session["C77U"] == null) { Session["C77U"] = ""; if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); Session["MonLcl"] = Cnx.GetMonedLcl(); // Moneda Local Session["FormatFecha"] = Cnx.GetFormatFecha(); // 103 formato europeo dd/MM/yyyy | 101 formato EEUU M/dd/yyyyy } } if (!IsPostBack) { ModSeguridad(); string LtxtSql = string.Format("EXEC SP_PANTALLA_Status 11,'','','','HK',0,0,0,{0},'01-1-2009','01-01-1900','01-01-1900'", Session["!dC!@"]); DdlAk.DataSource = Cnx.DSET(LtxtSql); DdlAk.DataTextField = "Matricula"; DdlAk.DataValueField = "CodAeronave"; DdlAk.DataBind(); BindPn(""); BindSn(""); MultVw.ActiveViewIndex = 0; } ScriptManager.RegisterClientScriptBlock(this, GetType(), "none", "<script>myFuncionddl();</script>", false); }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } ViewState["PFileName"] = System.IO.Path.GetFileNameWithoutExtension(Request.PhysicalPath); // Nombre del archivo if (Session["C77U"] == null) { Session["C77U"] = ""; if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); Session["MonLcl"] = Cnx.GetMonedLcl(); // "COP|USD" Session["FormatFecha"] = Cnx.GetFormatFecha(); // 103 formato europeo dd/MM/yyyy | 101 formato EEUU M/dd/yyyyy } } if (!IsPostBack) { string VbM = Convert.ToString(DateTime.UtcNow.Month); string VbY = Convert.ToString(DateTime.UtcNow.Year); string fecha = string.Format("{0}-{1}-{2}", VbY, VbM, "01"); DateTime VbFecID = Convert.ToDateTime(fecha); TxtFechI.Text = string.Format("{0:yyyy-MM-dd}", VbFecID); TxtFechF.Text = string.Format("{0:yyyy-MM-dd}", DateTime.UtcNow); ModSeguridad(); BindBDdl(); MultVw.ActiveViewIndex = 0; } ScriptManager.RegisterClientScriptBlock(this, GetType(), "none", "<script>myFuncionddl();</script>", false); }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } ViewState["PFileName"] = System.IO.Path.GetFileNameWithoutExtension(Request.PhysicalPath); // Nombre del archivo Page.Title = ""; if (Session["C77U"] == null) { Session["C77U"] = ""; if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); Session["MonLcl"] = Cnx.GetMonedLcl(); // Moneda Local Session["FormatFecha"] = Cnx.GetFormatFecha(); // 103 formato europeo dd/MM/yyyy | 101 formato EEUU M/dd/yyyyy } } if (!IsPostBack) { TitForm.Text = ""; string VbM = Convert.ToString(DateTime.UtcNow.Month); string VbY = Convert.ToString(DateTime.UtcNow.Year); string fecha = string.Format("{0}-{1}-{2}", VbY, VbM, "01"); DateTime VbFecID = Convert.ToDateTime(fecha); TxtFechI.Text = string.Format("{0:yyyy-MM-dd}", VbFecID); TxtFechF.Text = string.Format("{0:yyyy-MM-dd}", DateTime.UtcNow); IdiomaControles(); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } ViewState["PFileName"] = System.IO.Path.GetFileNameWithoutExtension(Request.PhysicalPath); // Nombre del archivo Page.Title = string.Format("Configuración_Discos"); if (Session["C77U"] == null) { Session["C77U"] = ""; if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); } } if (!IsPostBack) { TitForm.Text = "Configuración Ciclos de Discos"; ModSeguridad(); BtnAlaF.BackColor = Color.SandyBrown; BtnAlaF.Font.Bold = true; BtnAlaF.Font.Size = 14; BtnAlaR.BackColor = Color.LightBlue; BindDdl("UPD"); BindDataAlaF(""); BindDataAlaR(""); } ScriptManager.RegisterClientScriptBlock(this, GetType(), "none", "<script>myFuncionddl();</script>", false); }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } ViewState["PFileName"] = System.IO.Path.GetFileNameWithoutExtension(Request.PhysicalPath); // Nombre del archivo if (Session["C77U"] == null) { Session["C77U"] = ""; if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); Session["MonLcl"] = Cnx.GetMonedLcl(); // "COP|USD" Session["FormatFecha"] = Cnx.GetFormatFecha(); // 103 formato europeo dd/MM/yyyy | 101 formato EEUU M/dd/yyyyy } } if (!IsPostBack) { TxtDiaVisual.Text = "365"; ModSeguridad(); BindData("UPD"); MultVw.ActiveViewIndex = 0; } ScriptManager.RegisterClientScriptBlock(this, GetType(), "none", "<script>myFuncionddl();</script>", false); }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } ViewState["PFileName"] = System.IO.Path.GetFileNameWithoutExtension(Request.PhysicalPath); // Nombre del archivo if (Session["C77U"] == null) { Session["C77U"] = ""; if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); Session["MonLcl"] = Cnx.GetMonedLcl(); // Moneda Local Session["FormatFecha"] = Cnx.GetFormatFecha(); // 103 formato europeo dd/MM/yyyy | 101 formato EEUU M/dd/yyyyy } } if (!IsPostBack) { ViewState["CodReferencia"] = ""; ViewState["TitExprtMvts"] = "Movimientos Almacen"; ViewState["IdimaPnALter"] = "Partes alternos de la referencia"; ModSeguridad(); BindBDdl("", "", "", "UPD"); RdbMdlBusqPN.Checked = true; } ScriptManager.RegisterClientScriptBlock(this, GetType(), "none", "<script>myFuncionddl();</script>", false); }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } ViewState["PFileName"] = System.IO.Path.GetFileNameWithoutExtension(Request.PhysicalPath); // Nombre del archivo Page.Title = string.Format("Configuración_Contador"); if (Session["C77U"] == null) { ViewState["VldrCntdr"] = "S"; Session["C77U"] = ""; if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); //"admindemp"; Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); } } if (!IsPostBack) { TitForm.Text = "Configuración de Contadores"; ViewState["Accion"] = ""; ModSeguridad(); ActivarCampos(false, false); BindDataDdlCntr("UPD"); } ScriptManager.RegisterClientScriptBlock(this, GetType(), "none", "<script>myFuncionddl();</script>", false); }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } ViewState["PFileName"] = System.IO.Path.GetFileNameWithoutExtension(Request.PhysicalPath); // Nombre del archivo if (Session["C77U"] == null) { Session["C77U"] = ""; if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); } } if (!IsPostBack) { ModSeguridad(); BindData(TxtBusqueda.Text); if (Session["C77U"].ToString().Trim().Equals("00000082") || (Session["C77U"].ToString().Trim().Equals("00000083") && Session["!dC!@"].ToString().Trim().Equals("1"))) { IbtAbrirIdioma.Visible = true; } } }
protected void Page_Load(object sender, EventArgs e) { BtnExportar.Text = "Exportar "; if (Session["C77U"] == null) { /*Session["C77U"] = ""; */ if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); Session["MonLcl"] = Cnx.GetMonedLcl();// Moneda Local } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["Login77"] == null) { if (Cnx.GetProduccion().Trim().Equals("Y")) { Response.Redirect("~/FrmAcceso.aspx"); } } if (Session["C77U"] == null) { Session["C77U"] = ""; /**/ if (Cnx.GetProduccion().Trim().Equals("N")) { Session["C77U"] = Cnx.GetUsr(); //00000082|00000133 Session["D[BX"] = Cnx.GetBD(); //|DbNeoDempV2 |DbNeoAda | DbNeoHCT Session["$VR"] = Cnx.GetSvr(); Session["V$U@"] = Cnx.GetUsSvr(); Session["P@$"] = Cnx.GetPas(); Session["N77U"] = Session["D[BX"]; Session["Nit77Cia"] = Cnx.GetNit(); // 811035879-1 TwoGoWo |800019344-4 DbNeoAda | 860064038-4 DbNeoHCT Session["!dC!@"] = Cnx.GetIdCia(); Session["77IDM"] = Cnx.GetIdm(); } } if (!IsPostBack) { //string bnllrr = Request.QueryString["ToolT"].ToString(); TxtBusqueda.ToolTip = Request.QueryString["ToolT"].ToString(); LblTitulo.Text = Request.QueryString["TT"].ToString(); ViewState["PFileName"] = "FrmExportar"; if (Request.QueryString["TT"].ToString().Equals("Exportar Referencias")) { Lbl1.Text = "Verificación"; Lbl1.Visible = true; Rdb1.Checked = true; Rdb1.Visible = true; Lbl2.Text = "P/N con unidad de compra"; Lbl2.Visible = true; Rdb2.Visible = true; } BindData(); } } void BindData() { DataTable dtbl = new DataTable(); Cnx.SelecBD(); using (SqlConnection sqlCon = new SqlConnection(Cnx.GetConex())) { switch (Request.QueryString["TT"].ToString()) { case "Exportar Referencias": if (Rdb1.Checked == true) { VbPrmtrAnt = "EXEC SP_PANTALLA_ReferenciaV2 13,@PN,'','','','VERIFICAR',0,0,0,@ICC,'01-01-01','02-01-01','03-01-01'"; } if (Rdb2.Checked == true) { VbPrmtrAnt = "EXEC SP_PANTALLA_ReferenciaV2 13,@PN,'','','','UNDCOMPRA',0,0,0,@ICC,'01-01-01','02-01-01','03-01-01'"; } break; default: VbPrmtrAnt = Request.QueryString["TCDN"].ToString(); break; } string VbTxtSql = string.Format(VbPrmtrAnt, TxtBusqueda.Text); sqlCon.Open(); SqlCommand SC = new SqlCommand(VbTxtSql, sqlCon); SC.Parameters.AddWithValue("@PN", TxtBusqueda.Text); SC.Parameters.AddWithValue("@ICC", Session["!dC!@"]); SqlDataAdapter SDA = new SqlDataAdapter(); SDA.SelectCommand = SC; SDA.Fill(dtbl); if (dtbl.Rows.Count > 0) { GrdDatos.DataSource = dtbl; GrdDatos.DataBind(); } else { GrdDatos.DataSource = null; GrdDatos.DataBind(); } } } protected void IbtConsultar_Click(object sender, ImageClickEventArgs e) { BindData(); } protected void IbtExpExcel_Click(object sender, ImageClickEventArgs e) { /*Response.Clear(); * Response.Buffer = true; * Response.ContentType = "application/ms-excel"; * Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xls", Request.QueryString["NomArch"].ToString())); * Response.Charset = ""; * using (StringWriter StWt = new StringWriter()) * { * HtmlTextWriter HtmlT = new HtmlTextWriter(StWt); * // GrdDatos.HeaderRow.Style.Add("background-color", "#0000ff"); * GrdDatos.HeaderRow.Style.Add("color", "white"); * foreach (TableCell tableCell in GrdDatos.HeaderRow.Cells) * { * tableCell.Style["background-color"] = "#0000ff"; * } * * foreach (GridViewRow GrdV in GrdDatos.Rows) * { * //gridViewRow.BackColor = System.Drawing.Color.White; * foreach (TableCell GrdCell in GrdV.Cells) * { * if (GrdV.RowIndex % 2 == 0) * { * GrdCell.Style["background-color"] = "white"; * } * else * { * GrdCell.Style["background-color"] = "#cae4ff"; * } * * } * } * * GrdDatos.RenderControl(HtmlT); * Response.Write(StWt.ToString()); * Response.End(); * }*/ try { string StSql, VbPrmtrAnt = ""; switch (Request.QueryString["TT"].ToString()) { case "Exportar Referencias": if (Rdb1.Checked == true) { VbPrmtrAnt = "EXEC SP_PANTALLA_ReferenciaV2 13,@PN,'','','','VERIFICAR',0,0,0,@ICC,'01-01-01','02-01-01','03-01-01'"; } if (Rdb2.Checked == true) { VbPrmtrAnt = "EXEC SP_PANTALLA_ReferenciaV2 13,@PN,'','','','UNDCOMPRA',0,0,0,@ICC,'01-01-01','02-01-01','03-01-01'"; } break; default: VbPrmtrAnt = Request.QueryString["TCDN"].ToString(); break; } StSql = string.Format(VbPrmtrAnt, TxtBusqueda.Text); Cnx.SelecBD(); using (SqlConnection con = new SqlConnection(Cnx.GetConex())) { using (SqlCommand SC = new SqlCommand(StSql, con)) { SC.CommandTimeout = 90000000; SC.Parameters.AddWithValue("@PN", TxtBusqueda.Text); SC.Parameters.AddWithValue("@ICC", Session["!dC!@"]); using (SqlDataAdapter sda = new SqlDataAdapter()) { SC.Connection = con; sda.SelectCommand = SC; using (DataSet ds = new DataSet()) { sda.Fill(ds); ds.Tables[0].TableName = "Tabla"; using (XLWorkbook wb = new XLWorkbook()) { foreach (DataTable dt in ds.Tables) { wb.Worksheets.Add(dt); } Response.Clear(); Response.Buffer = true; Response.ContentType = "application/ms-excel"; // Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", VbNomRpt)); Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xls", Request.QueryString["NomArch"].ToString())); Response.Charset = ""; using (MemoryStream MyMemoryStream = new MemoryStream()) { wb.SaveAs(MyMemoryStream); MyMemoryStream.WriteTo(Response.OutputStream); Response.Flush(); Response.End(); } } } } } } } catch (Exception Ex) { string VbcatUs = Session["C77U"].ToString(), VbcatNArc = ViewState["PFileName"].ToString(), VbcatVer = Session["77Version"].ToString(), VbcatAct = Session["77Act"].ToString(); Cnx.UpdateErrorV2(VbcatUs, VbcatNArc, "Exportar Excel", Ex.StackTrace.Substring(Ex.StackTrace.Length - 300, 300), Ex.Message, VbcatVer, VbcatAct); } }