Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        _connString       = ConfigurationManager.ConnectionStrings["SSSDbConnDev"].ConnectionString;
        Common.ConnString = _connString;

        MessageLabel.Text = string.Empty;
        GetCommon();
        StoreFormFields();
        if (!string.IsNullOrEmpty(Common.Club_ID))
        {
            Club_ID = Common.Club_ID;
            PopulateClub(Club_ID);
            divShowList.Visible = true;
        }
        else
        {
            PopulateClubGridView();
            divClubList.Visible       = true;
            divClubDetails.Visible    = false;
            divShowList.Visible       = false;
            divGetRequestList.Visible = false;
            divRequestList.Visible    = false;
        }
        if (!string.IsNullOrEmpty(Common.Show_ID))
        {
            Show_ID = Common.Show_ID;
            PopulateShow(Show_ID);
            PopulateClassList(Show_ID);
            divGetRequestList.Visible = true;
        }
        else
        {
            if (!string.IsNullOrEmpty(Club_ID))
            {
                PopulateShowGridView(Club_ID);
                divShowList.Visible = true;
            }
            else
            {
                divShowList.Visible       = false;
                divShowDetails.Visible    = false;
                divGetRequestList.Visible = false;
                divRequestList.Visible    = false;
            }
        }
        if (!string.IsNullOrEmpty(Show_Entry_Class_ID))
        {
            lstClasses.SelectedValue = Show_Entry_Class_ID.ToString();
        }
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        _connString       = ConfigurationManager.ConnectionStrings["SSSDbConnDev"].ConnectionString;
        Common.ConnString = _connString;

        MessageLabel.Text = string.Empty;
        GetCommon();

        if (!Page.IsPostBack)
        {
            if (!string.IsNullOrEmpty(Entrant_ID))
            {
                GetEntrant();
                PopulateListBoxes();
                PopulateDogClassGridView();
                Guid dog_ID = new Guid(lstDogs.Items[0].Value);
                PopulateOwnerList(dog_ID);
            }
            else
            {
                Server.Transfer("~/Competitors/Competitor.aspx");
            }
            if (!string.IsNullOrEmpty(Show_ID))
            {
                PopulateShow();
            }
            if (Common.DogOwnerList != null && Common.DogOwnerList.Count != 0)
            {
                divOwnerList.Visible = true;
                DogOwnerList ownerList = new DogOwnerList();
                ownerList.MyDogOwnerList = Common.DogOwnerList;
                PopulateOwnerGridView(ownerList.MyDogOwnerList);
            }
            else
            {
                divOwnerList.Visible = false;
            }
            if (!string.IsNullOrEmpty(Handler_ID))
            {
                PopulateHandler();
                divHandler.Visible        = true;
                divGetHandler.Visible     = false;
                divChangeHandler.Visible  = true;
                divHandlerDetails.Visible = true;
            }
            else
            {
                divHandler.Visible        = true;
                divGetHandler.Visible     = true;
                divChangeHandler.Visible  = false;
                divHandlerDetails.Visible = false;
            }
            if (!string.IsNullOrEmpty(Show_Entry_Class_ID))
            {
                lstClasses.SelectedValue = Show_Entry_Class_ID.ToString();
            }
            if (!string.IsNullOrEmpty(Dog_ID))
            {
                lstDogs.SelectedValue = Dog_ID.ToString();
            }
            string returnChars = Request.QueryString["return"];
            btnReturn.PostBackUrl = Common.ReturnPath(Request.QueryString, returnChars, "");
        }
    }