예제 #1
0
        private void _Iniciar()
        {
            this.xQueryParameters.Clear();
            this.xQueryValues.Clear();
            this.xQueryParameters.Add((object)"@ROWSGXID");
            this.xQueryValues.Add((object)this.ROWSGXID);
            //if (this.Session["CURRENTUSR_SGXID1"].ToString().Trim() =="")
            if (ROWSGXID.ToString() != "")
            {
                Session.Add("CURRENTUSR_SGXID1", this.ROWSGXID);
            }

            this.xQueryParameters.Add((object)"@ROLID");
            this.xQueryValues.Add((object)"AGENTSOC-CAID-SD");
            this.cmbAgenteSocial.Items.Add(new ListItem("-- SELECCIONE --", string.Empty));

            foreach (DataRow row in (InternalDataCollectionBase)DB.ExecuteAdapter("SGX00100S1_USUARIOSXROLES", this.xQueryParameters, this.xQueryValues, CommandType.StoredProcedure).Rows)
            {
                this.cmbAgenteSocial.Items.Add(new ListItem(row["NOMBRE"].ToString(), row["NOMBRE"].ToString()));
            }
            string str = this.Request.QueryString["X"];

            if (str == null)
            {
                this.xGUID.Value         = Guid.NewGuid().ToString().ToUpper();
                this.pnlConsulta.Visible = true;
                this.pnlData.Visible     = false;
                this.rpData.DataSource   = (object)null;
                this.rpData.DataBind();
                this._IniciarControles();
            }
            else if (str == "DATA")
            {
                this._Show((object)null, (EventArgs)null);
            }
            else
            {
                this.xGUID.Value = str;
                this.xQueryParameters.Clear();
                this.xQueryValues.Clear();
                this.xQueryParameters.Add((object)"@GUID");
                this.xQueryValues.Add((object)this.ROWGUID);
                this.xQueryParameters.Add((object)"@ROWSGXID");
                this.xQueryValues.Add((object)this.ROWSGXID);
                this.xQuery = "PAX00000S2";
                DataTable dataTable = DB.ExecuteAdapter(this.xQuery, this.xQueryParameters, this.xQueryValues, CommandType.StoredProcedure);
                DataRow   dataRow   = dataTable.Rows.Count != 0 ? dataTable.Rows[0] : (DataRow)null;
                if (dataRow == null)
                {
                    return;
                }
                this.cmbAgenteSocial.SelectedValue = dataRow["ESTATUS"].ToString();
                // this.txtMotivoEstatus.Value = dataRow["MOTIVOESTATUS"].ToString();
                this.pnlConsulta.Visible = false;
                this.pnlData.Visible     = true;
            }
        }
예제 #2
0
        void Page_LoadComplete(object sender, EventArgs e)
        {
            dtusuarios = DB.ExecuteAdapter(string.Format("select ROWGUID,ESPECIALIDADID from VUSUARIOS  where ROWGUID ='" + CurrentUSR_ROWGUID.ToString() + "' and ROWSGXID ='" + ROWSGXID.ToString() + "'", this.xQueryValues, CommandType.Text));
            if (dtusuarios.Rows[0]["ESPECIALIDADID"].ToString() != "CAID-SD-HISCL-15") //grupal
            {
                // rpHistorico._ddlasistio.
                // rpHistorico.Items[5].Visible = false;
                //ddlasistio.Enabled = false;
                //ddlasistio.Visible = false;
                //this.txtObservacion.Enabled = false;
                //ddlasistio.Attributes.Add("disabled", "disabled");
                //ddlasistio.Style["display"] = "block";

                foreach (RepeaterItem repeaterItem in this.rpHistorico.Items)
                {
                    DropDownList OBJDATO = (DropDownList)repeaterItem.FindControl("ddlasistio");
                    // OBJDATO.Attributes.Add("disabled", "disabled");
                    OBJDATO.Visible = false;
                }
            }
        }