Exemple #1
0
        private void GetDropDownInfo()
        {
            HostRankingDropDown.DataTextField  = "Name";
            HostRankingDropDown.DataValueField = "PersistenceLayerId";
            HostRankingDropDown.DataSource     = HostViabilityRanking.HostRankings;
            HostRankingDropDown.DataBind();

            HostRankingDropDown.Items.Insert(0, new ListItem("Select Rank", "0"));
        }
        private void OpenHostRankingInputBox()
        {
            HostRankingDiv.Style[HtmlTextWriterStyle.Display] = "block";

            HostRankingDropDown.DataTextField  = "Name";
            HostRankingDropDown.DataValueField = "PersistenceLayerId";

            HostRankingDropDown.DataSource = HostViabilityRanking.HostRankings;
            HostRankingDropDown.DataBind();

            HostRankingDropDown.Items.Insert(0, new ListItem("Select Rank", "0"));

            var isHostRated = new HostFacilityRankingRepository().IsHostRatedByTechnician(HostId, EventId);

            if (isHostRated)
            {
                var hostFacilityRanking = new HostFacilityRankingService().GetHostFacilityRankingByTechnician(HostId);
                if (hostFacilityRanking != null)
                {
                    if (hostFacilityRanking.Ranking != null)
                    {
                        var listItem = HostRankingDropDown.Items.FindByValue(hostFacilityRanking.Ranking.PersistenceLayerId.ToString());
                        if (listItem != null)
                        {
                            listItem.Selected = true;
                        }
                    }

                    if (!string.IsNullOrEmpty(hostFacilityRanking.Notes))
                    {
                        CommentsForHostRankingInputBox.Text = hostFacilityRanking.Notes;
                    }
                }
            }

            _divLoginInfo.Style.Add(HtmlTextWriterStyle.Display, "none");
            divCustomerList.Style.Add(HtmlTextWriterStyle.Display, "none");
            _divCustomerRegisterAfterSignoff.Style.Add(HtmlTextWriterStyle.Display, "none");
            _divSignoffCompleted.Style.Add(HtmlTextWriterStyle.Display, "none");
            this.form1.DefaultButton = "SaveButton";
        }