コード例 #1
0
        private void FilliSura()
        {
            //fill ddSelSura
            this.ddSelSura.DataSource = QuranSura.GetSuras(this.SiteId, this.quranID);
            this.ddSelSura.DataBind();
            if (int.Parse(hdnSuraID.Value) > 0)
            {
                this.suraID = int.Parse(hdnSuraID.Value);
            }
            else
            {
                this.suraID = int.Parse(ddSelSura.SelectedItem.Value.ToString());
            }

            hdnQuranID.Value = this.suraID.ToString();

            ddSelSura.ClearSelection();
            ddSelSura.Items.FindByValue(this.suraID.ToString()).Selected = true;


            if (this.suraID > 0)
            {
                BindGrid();
            }
        }
コード例 #2
0
        private void BindDropDown()
        {
            ddSurasFrom.DataSource = QuranSura.GetSuras(this.siteID, this.quranID);
            ddSurasFrom.DataBind();


            if (suraIDFrom < 1)
            {
                suraIDFrom          = int.Parse(ddSurasFrom.SelectedItem.Value.ToString());
                hdnSuraIDFrom.Value = ddSurasFrom.ToString();
                ddSurasFrom.ClearSelection();
                ddSurasFrom.Items.FindByValue(suraIDFrom.ToString()).Selected = true;
            }
            else
            {
                ddSurasFrom.ClearSelection();
                ddSurasFrom.Items.FindByValue(suraIDFrom.ToString()).Selected = true;
            }

            ddSurasTo.DataSource = QuranSura.GetSuras(this.siteID, this.quranID);
            ddSurasTo.DataBind();

            if (suraIDTo < 1)
            {
                int cnt     = ddSurasTo.Items.Count;
                int lastVal = int.Parse(ddSurasTo.Items[cnt - 1].Value);

                suraIDTo          = lastVal;
                hdnSuraIDTo.Value = ddSurasTo.ToString();
                ddSurasTo.ClearSelection();
                ddSurasTo.Items.FindByValue(suraIDTo.ToString()).Selected = true;
            }
            else
            {
                ddSurasTo.ClearSelection();
                ddSurasTo.Items.FindByValue(suraIDTo.ToString()).Selected = true;
            }

            txtSearchVerseFrom.Text = verseOrderFrom.ToString();
            txtSearchVerseTo.Text   = verseOrderTo.ToString();
            txtPageSize.Text        = hdnPageSize.Value.ToString();

            Quran iquran = new Quran(this.siteID, this.quranID);

            if (iquran.IsDefault == true)
            {
                divWantedWord.Visible       = true;
                hdnIsDefault.Value          = "1";
                divRootSelection.Visible    = true;
                divSearchedTextType.Visible = true;
                FillRoot();
            }
            else
            {
                divWantedWord.Visible       = false;
                hdnIsDefault.Value          = "0";
                divRootSelection.Visible    = false;
                divSearchedTextType.Visible = false;
            }
        }
コード例 #3
0
 private void FilliSura()
 {
     //fill ddSelSura
     this.ddSelSura.DataSource = QuranSura.GetSuras(this.SiteId, 1);
     this.ddSelSura.DataBind();
 }