/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param> protected void Page_Load(object sender, EventArgs e) { if (Session["IDENTEMI"] != null) { if (Session["errorTimbres"] != null && Convert.ToBoolean(Session["errorTimbres"])) { Response.Redirect("~/CantidadTimbres.aspx", true); return; } else if (Session["errorCertificado"] != null && Convert.ToBoolean(Session["errorCertificado"])) { Response.Redirect("~/LicExpirada.aspx", true); return; } _dbe = new BasesDatos(Session["IDENTEMI"] != null ? Session["IDENTEMI"].ToString() : "CORE"); _dbr = new BasesDatos(Session["IDENTEMI"] != null ? Session["IDENTEMI"].ToString() : "CORE", "Recepcion"); _log = new Control.Log(Session["IDENTEMI"] != null ? Session["IDENTEMI"].ToString() : "CORE"); if (Session["idUser"] != null) { SqlDataTiposProveedor.ConnectionString = _dbr.CadenaConexion; SqlDataSourceTProveedor.ConnectionString = _dbr.CadenaConexion; SqlDataSourceGValidation.ConnectionString = _dbr.CadenaConexion; SqlDataSourceGroupValidate.ConnectionString = _dbr.CadenaConexion; SqlDataSourceEstructura.ConnectionString = _dbr.CadenaConexion; _idUser = Session["idUser"].ToString(); } } }
/// <summary> /// Handles the Load event of the Page control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param> protected void Page_Load(object sender, EventArgs e) { if (Session["IDENTEMI"] != null) { if (Session["errorTimbres"] != null && Convert.ToBoolean(Session["errorTimbres"])) { Response.Redirect("~/CantidadTimbres.aspx", true); return; } else if (Session["errorCertificado"] != null && Convert.ToBoolean(Session["errorCertificado"])) { Response.Redirect("~/LicExpirada.aspx", true); return; } _dbe = new BasesDatos(Session["IDENTEMI"] != null ? Session["IDENTEMI"].ToString() : "CORE"); _dbr = new BasesDatos(Session["IDENTEMI"] != null ? Session["IDENTEMI"].ToString() : "CORE", "Recepcion"); _log = new Control.Log(Session["IDENTEMI"] != null ? Session["IDENTEMI"].ToString() : "CORE"); if (Session["idUser"] != null) { _idUser = Session["idUser"].ToString(); } llenarGridViewBD(); if (!IsPostBack) { _files = new Dictionary <int, HttpPostedFile[]>(); Array_registros.Clear(); Session["GROUPEDIT"] = ""; id_Renglon = 0; } else { CreateControls(); } } }