Exemplo n.º 1
0
    //Fill the dropdowns & lists with values
    private void FillControls()
    {
        //Populate Role dropdown with all Roles
        DataSet dsRole;

        _objGen                = new General();
        dsRole                 = _objGen.get_AllRoles();
        ddlRole.DataSource     = dsRole;
        ddlRole.DataTextField  = "UserRole";
        ddlRole.DataValueField = "ID";
        ddlRole.DataBind();
        if ((ddlRole.Items.Count != 0))
        {
            ddlRole.Items.Insert(0, new ListItem("--Select--", "-1"));
        }

        //Populate Federation List with all Federations
        DataSet dsFed;

        _objGen               = new General();
        dsFed                 = _objGen.get_AllFederations();
        lstFed.DataSource     = dsFed;
        lstFed.DataTextField  = "Federation";
        lstFed.DataValueField = "ID";
        lstFed.DataBind();

        //Populate Camp List with all the Camps
        //DataSet dsCamps;
        //_objGen = new General();
        //dsCamps = _objGen.get_AllCamps(Master.CampYear);
        //lstCamps.DataSource = dsCamps;
        //lstCamps.DataTextField = "Camp";
        //lstCamps.DataValueField = "ID";
        //lstCamps.DataBind();

        // 2014-12-10 Movement Camps Admin

        lstMovements.DataSource = MovementDAL.GetAllMovement();
        lstMovements.DataBind();
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //Set Page Heading
        Label lbl = (Label)this.Master.FindControl("lblPageHeading");

        lbl.Text = "Manage User";

        //TV: 04/2009 - added message Label to display informative (non-error) messages to the user
        lblMsg.Text = "";

        if (!IsPostBack)
        {
            //Populate Federation dropdown
            DataSet dsFed;
            _objGen               = new General();
            dsFed                 = _objGen.get_AllFederations();
            ddlFed.DataSource     = dsFed;
            ddlFed.DataTextField  = "Federation";
            ddlFed.DataValueField = "ID";
            ddlFed.DataBind();
            if ((ddlFed.Items.Count != 0))
            {
                ddlFed.Items.Insert(0, new ListItem("--Select--", "-1"));
            }

            ddlMovement.DataSource = MovementDAL.GetAllMovement();
            ddlMovement.DataBind();
            ddlMovement.Items.Insert(0, new ListItem("--Select--", "-1"));
        }
        else
        {
            //TV: 04/2009 - Task # A-046 - check to see if was saved in a prior screen
            if (Session["objUsrAdmin"] != null)
            {
                _objUsrAdmin = (UserAdministration)Session["objUsrAdmin"];
            }
        }
    }