private void CheckIfDefault(bool isFilled) { bool isThereDefault = false; if (isFilled == true) { divDefault.Visible = true; cbIsDefault.Enabled = true; } else { // new quran or not default isThereDefault = Quran.CheckDefaultExists(SiteId); if (isThereDefault == true) { cbIsDefault.Enabled = false; divDefault.Visible = false; } else { cbIsDefault.Enabled = true; divDefault.Visible = true; } } }
void iQGrid_RowCommand(object sender, GridViewCommandEventArgs e) { if (log.IsDebugEnabled) { log.Debug(this.PageTitle + " fired event iQGrid_RowCommand"); } int iquranID = int.Parse(e.CommandArgument.ToString()); int siteid = siteSettings.SiteId; string dleteDate = String.Format(DateTime.Now.ToString(), "mm dd yyyy"); currentUser = SiteUtils.GetCurrentSiteUser(); Quran iquran = new Quran(siteid, iquranID); switch (e.CommandName) { case "delete": default: Quran.Delete(siteid, iquranID); //iQGrid.EditIndex = +1; //log it: log.Info("user " + currentUser.Name + " deleted Quran Version : " + iquran.Title + " at: " + dleteDate); BindGrid(); lblmessage.Text = iQuranMessagesResources.DeletedMsg + "<br />"; lblmessage.Visible = true; divMsg.Visible = true; break; } }
public override async Task FormatAsync(Quran quran) { var separator = Separator == CsvSeparator.Comma ? ',' : ';'; using (var metadataFile = File.Create(Path.Combine(OutputDirectory, "metadata.csv"))) { using (var metadataWriter = new StreamWriter(metadataFile)) { foreach (var chapter in quran.Chapters) { await metadataWriter.WriteLineAsync(chapter.Index + separator + chapter.Name); using (var chapterFile = File.Create(Path.Combine(OutputDirectory, chapter.Index + ".csv"))) { using (var chapterWriter = new StreamWriter(chapterFile)) { foreach (var verse in chapter.Verses) { await chapterWriter.WriteLineAsync(verse.Index + separator + verse.Text); } await chapterWriter.FlushAsync(); } } await metadataWriter.FlushAsync(); } } } }
/// <summary> /// Parse the given xml file and return Quran object representation of it. /// </summary> /// <returns>Quran object.</returns> public Quran Parse() { var quran = new Quran(); quran.Chapters = ParseChapters(quran); return(quran); }
private void FilliQuran() { //fill ddSelQuran this.ddSelQuran.DataSource = Quran.GetiQurans(this.SiteId); this.ddSelQuran.DataBind(); if (int.Parse(hdnQuranID.Value) > 0) { this.quranID = int.Parse(hdnQuranID.Value); } else { this.quranID = int.Parse(ddSelQuran.SelectedItem.Value.ToString()); } hdnQuranID.Value = this.quranID.ToString(); ddSelQuran.ClearSelection(); ddSelQuran.Items.FindByValue(this.quranID.ToString()).Selected = true; Quran q = new Quran(SiteId, this.quranID); this.quranLanguage = q.QLanguage; hdnQLang.Value = q.QLanguage; this.isTranslation = !q.IsDefault; if (this.quranID > 0) { FilliSura(); } }
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; } }
public ActionResult DeleteConfirmed(byte id) { Quran quran = db.Qurans.Find(id); db.Qurans.Remove(quran); db.SaveChanges(); return(RedirectToAction("Index")); }
private void BindGrid() { bool isAdmin = ((WebUser.IsInRole("iQuranManagers")) || (WebUser.IsInRole("iQuranContentsAdmins")) || (WebUser.IsAdmin)); // Get the Current Loged on UserID SiteUser siteUser = SiteUtils.GetCurrentSiteUser(); int userID = siteUser.UserId; List <Quran> dataList = new List <Quran>(); //0: all , 1.active , 2.notactive , if (this.BindByWhat == "all") { dataList = Quran.GetPage_iQuran_All(false, siteSettings.SiteId, isAdmin, pageNumber, pageSize, out totalPages); } //Search For Title if (this.BindByWhat == "title") { dataList = Quran.GetPage_iQuran_ByTitle(false, siteSettings.SiteId, isAdmin, this.searchTitle, pageNumber, pageSize, out totalPages); } if ((this.BindByWhat == "active") || (this.BindByWhat == "notactive")) { dataList = Quran.GetPage_iQuran_ByActive(false, siteSettings.SiteId, searchIsActive, pageNumber, pageSize, out totalPages); } string pageUrl = string.Empty; pageUrl = SiteRoot + "/Admin/AccessQuran/iQuran/iQuranManager.aspx?" + "sort=" + this.sort + "&search=" + this.search + "&searchtitle=" + Server.UrlEncode(this.searchTitle) + "&pagenumber={0}"; amsPager.PageURLFormat = pageUrl; amsPager.ShowFirstLast = true; amsPager.CurrentIndex = pageNumber; amsPager.PageSize = pageSize; amsPager.PageCount = totalPages; amsPager.Visible = (totalPages > 1); iQGrid.DataSource = dataList; iQGrid.PageIndex = pageNumber; iQGrid.PageSize = pageSize; iQGrid.DataBind(); if (iQGrid.Rows.Count == 0) { lblmessage.Visible = true; divMsg.Visible = true; lblmessage.Text = Resources.iQuranMessagesResources.NoDataYet; } }
public ActionResult Edit([Bind(Include = "ID,DatabaseID,SuraID,VerseID,AyahText")] Quran quran) { if (ModelState.IsValid) { db.Entry(quran).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(quran)); }
public ActionResult Create([Bind(Include = "ID,DatabaseID,SuraID,VerseID,AyahText")] Quran quran) { if (ModelState.IsValid) { db.Qurans.Add(quran); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(quran)); }
public override void Format(Quran quran) { foreach (var chapter in quran.Chapters) { using (var file = File.Create(Path.Combine(OutputDirectory, chapter.Index + ".json"))) { using (var writer = new StreamWriter(file)) { writer.Write(JsonConvert.SerializeObject(chapter, Settings)); writer.Flush(); } } } }
// GET: /QuranCRUD/Delete/5 public ActionResult Delete(byte?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Quran quran = db.Qurans.Find(id); if (quran == null) { return(HttpNotFound()); } return(View(quran)); }
public MoataaMaster(Quran qaaaa) { BindingContext = qaaaa; InitializeComponent(); Core.Initialize(); _libvlc = new LibVLC(); var media = new Media(_libvlc, qaaaa.URL, FromType.FromLocation); myVideo.MediaPlayer = new MediaPlayer(media) { EnableHardwareDecoding = true }; myVideo.MediaPlayer.Play(); }
public IslamMaster(Quran islam) { InitializeComponent(); BindingContext = islam; Core.Initialize(); _libvlc = new LibVLC(); var media = new Media(_libvlc, islam.URL, FromType.FromLocation); myVideo.MediaPlayer = new MediaPlayer(media) { EnableHardwareDecoding = true }; myVideo.MediaPlayer.Play(); }
/// <summary> /// Parses the chapters. /// </summary> /// <param name="quran">The quran.</param> /// <returns>Chapters.</returns> /// <exception cref="System.ArgumentException">The specified file is not recognized as a quran source file.</exception> private IEnumerable <Chapter> ParseChapters(Quran quran) { if (_xDoc.Root != null) { foreach (var xChapter in _xDoc.Root.Elements(XName.Get("sura"))) { var chapter = new Chapter(quran) { Index = Convert.ToInt32(xChapter.Attribute(XName.Get("index")).Value.Trim()), Name = xChapter.Attribute(XName.Get("name")).Value.Trim(), }; chapter.Verses = ParseVerses(xChapter, chapter); yield return(chapter); } } else { throw new ArgumentException("The specified file is not recognized as a quran source file."); } }
private void FilliQuran() { //fill ddSelQuran this.ddSelQuran.DataSource = Quran.GetiQurans(this.SiteId); this.ddSelQuran.DataBind(); if (int.Parse(hdnQuranID.Value) > 0) { this.quranID = int.Parse(hdnQuranID.Value); } else { this.quranID = int.Parse(ddSelQuran.SelectedItem.Value.ToString()); } hdnQuranID.Value = this.quranID.ToString(); ddSelQuran.ClearSelection(); ddSelQuran.Items.FindByValue(this.quranID.ToString()).Selected = true; if (this.quranID > 0) { BindGrid(); } }
void btnSearchByRoot_Click(object sender, EventArgs e) { // Parameteres: qid sf st vf vt sw tor d ps // pageSize (ps) // quranID (qid) suraIDFrom (sf) suraIDTo (st) verseOrderFrom (vf) verseOrderTo (vt) textSearchWord (sw) // textSearchWordOrRoot (tor) : w , r // isDefault (d) : 0 -no, 1 - yes pageSize = int.Parse(txtPageSize.Text); this.quranID = int.Parse(ddQuran.SelectedItem.Value.ToString()); Quran iquran = new Quran(this.siteID, this.quranID); int isdef = 1; if (iquran.IsDefault == false) { isdef = 0; } string redirectUrl = string.Empty; redirectUrl = SiteRoot + "/iQuran/QuranSearch/iQuranSimpleSearchView.aspx?" + "qid=" + this.quranID.ToInvariantString() + "&sf=" + int.Parse(ddSurasFrom.SelectedItem.Value).ToInvariantString() + "&st=" + int.Parse(ddSurasTo.SelectedItem.Value).ToInvariantString() + "&vf=" + int.Parse(txtSearchVerseFrom.Text.Trim()).ToInvariantString() + "&vt=" + int.Parse(txtSearchVerseTo.Text.Trim()).ToInvariantString() + "&tor=" + "r" + "&d=" + isdef + "&ps=" + pageSize + "&sw=" + ddRoot.SelectedItem.Value; WebUtils.SetupRedirect(this, redirectUrl); }
private void PopulateControls() { if (quranID > -1) { quran = new Quran(siteSettings.SiteId, quranID); } else { CheckIfDefault(false); return; } lblSuraCount.Text = quran.SuraCount.ToString(); txtTitle.Text = quran.Title; cbIsDefault.Checked = quran.IsDefault; cbIsActive.Checked = quran.IsActive; quranID = int.Parse(quran.QuranID.ToString()); edDescription.Text = quran.Description; edTRanslatorDetUrl.Text = quran.TRanslatorDetUrl; txtTranslationSrc.Text = quran.TranslationSrc; hdnQuranID.Value = quranID.ToString(); ddLang.SetValue(quran.QLanguage.Trim()); CheckIfDefault(quran.IsDefault); }
private void PopulateControls() { //edTranslation edOthmaniText edVerseTextNM edVerseTextNMAlif // info Quran quran = null; quran = new Quran(siteSettings.SiteId, this.quranID); lbliQuranVesrion.Text = quran.Title.ToString(); ddLang.SetValue(quran.QLanguage.Trim()); string selLangVal = ddLang.GetText().Trim(); lbliQuranLanguage.Text = selLangVal; this.qLanguage = quran.QLanguage.Trim(); QuranSura sura = null; sura = new QuranSura(siteSettings.SiteId, this.suraID); lblSuraTitle.Text = sura.Title.ToString().Trim(); lblSuraSortOrder.Text = sura.SuraOrder.ToString().Trim(); hdnOrigArabSuraID.Value = sura.SuraOrder.ToString(); bool isTranslation = false; if (this.qLanguage == "ar") { isTranslation = false; // VerseOrder SuraOrder ddHalfNo txtPartNo txtHizbNo txtQuraterNo cbIsActive ddPlace divArabicFields.Visible = true; divTranslation.Visible = false; edTranslation.Visible = false; divOthmani.Visible = true; edOthmaniText.Visible = true; edVerseTextNM.Visible = true; edVerseTextNMAlif.Visible = true; } else { isTranslation = true; divArabicFields.Visible = false; divTranslation.Visible = true; edTranslation.Visible = true; divOthmani.Visible = false; edOthmaniText.Visible = false; edVerseTextNM.Visible = false; edVerseTextNMAlif.Visible = false; } verse = new QuranVerse(siteSettings.SiteId, this.quranID, this.verseID, isTranslation); if (verseID <= 0) { return; } // Verse Details txtVerseSortOrder.Text = verse.VerseOrder.ToString().Trim(); ddHalfNo.ClearSelection(); ddHalfNo.Items.FindByValue(verse.HalfNo.ToString()).Selected = true; txtPartNo.Text = verse.PartNo.ToString(); txtHizbNo.Text = verse.HizbNo.ToString(); txtQuraterNo.Text = verse.QuraterNo.ToString(); ddPlace.ClearSelection(); ddPlace.Items.FindByValue(verse.Place.Trim().ToString()).Selected = true; cbIsActive.Checked = verse.IsActive; quranID = int.Parse(verse.QuranID.ToString()); suraID = int.Parse(verse.SuraID.ToString()); verseID = int.Parse(verse.VerseID.ToString()); hdnQuranID.Value = quranID.ToString(); hdnSuraID.Value = suraID.ToString(); hdnVerseID.Value = verseID.ToString(); //if (this.qLanguage == "ar") // hdnSuraID.Value = txtSortOrder.Text.ToString(); //else // hdnSuraID.Value = ddSelSura.SelectedItem.Value.ToString(); if (this.qLanguage == "ar") { edOthmaniText.Text = verse.VerseText; edVerseTextNM.Text = verse.QuranVerseTxt.VerseTextNM; edVerseTextNMAlif.Text = verse.QuranVerseTxt.VerseTextNMAlif; } else { edTranslation.Text = verse.VerseText; } }
private void BindVrses() { List <iQuranSearch> iSrchList = null; // Get the whole Sura without paging int pageNumber = 0; bool IsTranslation = false; Quran q = new Quran(this.siteID, this.quranID); IsTranslation = !q.IsDefault; QuranSura qSura = new QuranSura(this.siteID, this.suraID); this.suraOrder = qSura.SuraOrder; hdnsuraOrder.Value = this.suraOrder.ToString(); iSrchList = iQuranSearch.GetFrontEndPage_iSura(this.siteID, this.quranID, this.suraID, this.verseID, pageNumber, IsTranslation); rptVerses.DataSource = iSrchList; rptVerses.DataBind(); if (iSrchList.Count > 0) { if ((this.suraOrder != 1) && (this.suraOrder != 9)) { litBism.Text = QuranVerse.GetVerseBism(this.siteID, this.quranID, IsTranslation); divBism.Visible = true; litBism.Visible = true; } } if (iSrchList.Count > 0) { rptVerses.Visible = true; string info = string.Empty; CultureInfo defaultCulture = SiteUtils.GetDefaultUICulture(); info = ResourceHelper.GetMessageTemplate(defaultCulture, "SuraViewSearchInfo.config"); litSearchDescription.Text = string.Format( defaultCulture, info, qSura.Title, qSura.SuraOrder, qSura.VersesCount, this.verseOrder); litSearchDescription.Visible = true; divDescription.Visible = true; lblmessage.Visible = false; } else { rptVerses.Visible = false; lblmessage.Visible = true; lblmessage.Text = Resources.iQuranMessagesResources.NoSearchResult + "<br /><br />"; } }
private void FilliQuran() { this.ddQuran.DataSource = Quran.GetiQurans(this.siteID); this.ddQuran.DataBind(); }
protected virtual void LoadSettings() { siteSettings = CacheHelper.GetCurrentSiteSettings(); siteID = siteSettings.SiteId; pageNumber = WebUtils.ParseInt32FromQueryString("pagenumber", 0); if (pageNumber != 0) { isSearchResult = false; } quranID = WebUtils.ParseInt32FromQueryString("qid", -1); if (quranID > -1) { hdnQuranID.Value = quranID.ToString(); } else { quranID = int.Parse(hdnQuranID.Value); } Quran q = new Quran(this.siteID, this.quranID); IsTranslation = !q.IsDefault; if (IsTranslation == true) { hdnIsTranslation.Value = "1"; } suraID = WebUtils.ParseInt32FromQueryString("sid", -1); if (suraID > -1) { hdnSuraID.Value = suraID.ToString(); } else { suraID = int.Parse(hdnSuraID.Value); } //if we came from Paging, first get the [First Sura ID ] in that Page if ((isSearchResult == false) && (suraID <= 0)) { suraID = QuranSura.GetSuraIdFromPageNumber(this.siteID, this.quranID, this.pageNumber, this.IsTranslation); hdnSuraID.Value = suraID.ToString(); } if (isSearchResult == true) { verseID = WebUtils.ParseInt32FromQueryString("vid", -1); if (verseID > -1) { hdnVerseID.Value = verseID.ToString(); } else { verseID = int.Parse(hdnVerseID.Value); } verseOrder = WebUtils.ParseInt32FromQueryString("vo", -1); if (verseOrder > -1) { hdnverseOrder.Value = verseOrder.ToString(); } else { verseOrder = int.Parse(hdnverseOrder.Value); } } }
public abstract Task FormatAsync(Quran quran);
public abstract void Format(Quran quran);
void btnSave_Click(object sender, EventArgs e) { bool isExists = false; string qLanguage = ddLang.GetValue().Trim(); isExists = Quran.Exists(siteSettings.SiteId, this.quranID, qLanguage, this.txtTitle.Text.Trim()); if (isExists) { lblmessage.Visible = true; lblmessage.Text = Resources.iQuranMessagesResources.TitleExists; return; } if (this.txtTitle.Text.Trim().Length < 1) { lblmessage.Visible = true; lblmessage.Text = Resources.iQuranMessagesResources.TitleRequired; return; } string tmpEditorValue = string.Empty; tmpEditorValue = Regex.Replace((edDescription.Text).ToString(), @"<[^>]*>", String.Empty).Replace("\r\n", String.Empty).Trim(); if (tmpEditorValue.Length < 1) { lblmessage.Visible = true; lblmessage.Text = Resources.iQuranMessagesResources.QuranDescriptionRequired; return; } if (ddLang.GetValue() == "na") { lblmessage.Visible = true; lblmessage.Text = Resources.iQuranMessagesResources.QuranLanguageRequired; return; } int siteid = siteSettings.SiteId; currentUser = SiteUtils.GetCurrentSiteUser(); Quran quran = new Quran(siteid, quranID); quran.QuranID = this.quranID; quran.Title = SecurityHelper.RemoveMarkup(this.txtTitle.Text); quran.IsActive = bool.Parse(this.cbIsActive.Checked.ToString()); quran.IsDefault = bool.Parse(this.cbIsDefault.Checked.ToString()); quran.Description = this.edDescription.Text; quran.TRanslatorDetUrl = Regex.Replace((edTRanslatorDetUrl.Text).ToString(), @"<[^>]*>", String.Empty).Replace("\r\n", String.Empty).Trim(); quran.TranslationSrc = txtTranslationSrc.Text + ""; quran.SiteId = siteid; quran.CreatedByUserId = currentUser.UserId; quran.QLanguage = qLanguage; //quran.SuraCount = lblSuraCount.Text; bool res = quran.Save(); if (res == true) { string addDate = String.Format(DateTime.Now.ToString(), "mm dd yyyy"); log.Info("user " + currentUser.Name + " Added Quran Version : " + quran.Title + " at: " + addDate); if (hdnFromWhere.Value.Contains("?")) { WebUtils.SetupRedirect(this, hdnFromWhere.Value + "&st=ok"); } else { WebUtils.SetupRedirect(this, hdnFromWhere.Value + "?st=ok"); } } else { if (hdnFromWhere.Value.Contains("?")) { WebUtils.SetupRedirect(this, hdnFromWhere.Value + "&st=no"); } else { WebUtils.SetupRedirect(this, hdnFromWhere.Value + "?st=no"); } } }
private void PopulateControls() { // info Quran quran = null; quran = new Quran(siteSettings.SiteId, this.quranID); lbliQuranVesrion.Text = quran.Title.ToString(); ddLang.SetValue(quran.QLanguage.Trim()); string selLangVal = ddLang.GetText().Trim(); lbliQuranLanguage.Text = selLangVal; lbliSuraVersesCount.Text = "0"; //divTransl if (ddLang.GetValue().Trim() == "ar") { divTransl.Visible = false; divArabic.Visible = true; } else { FilliSura(); divTransl.Visible = true; divArabic.Visible = false; } sura = new QuranSura(siteSettings.SiteId, this.suraID); if (suraID <= 0) { return; } lbliSuraVersesCount.Text = sura.VersesCount.ToString(); // Sura Details txtTitle.Text = sura.Title.ToString(); ddPlace.ClearSelection(); ddPlace.Items.FindByValue(sura.Place.Trim().ToString()).Selected = true; if (ddLang.GetValue().Trim() != "ar") { ddSelSura.ClearSelection(); ddSelSura.Items.FindByValue(sura.SuraOrder.ToString()).Selected = true; } txtSortOrder.Text = sura.SuraOrder.ToString(); cbIsActive.Checked = sura.IsActive; quranID = int.Parse(sura.QuranID.ToString()); suraID = int.Parse(sura.SuraID.ToString()); hdnQuranID.Value = quranID.ToString(); hdnSuraID.Value = suraID.ToString(); if (ddLang.GetValue().Trim() == "ar") { hdnSuraOrder.Value = txtSortOrder.Text.ToString(); } else { hdnSuraOrder.Value = ddSelSura.SelectedItem.Value.ToString(); } if ((this.suraID > 0) && (ddLang.GetValue().Trim() != "ar")) { ddSelSura.ClearSelection(); ddSelSura.Items.FindByValue(this.hdnSuraOrder.Value.ToString()).Selected = true; } }
/// <summary> /// textSearchWordOrRoot : - r : root - w: word /// searchedTextType : Searched Text Type : Part From Word - p , Part From Verse - v , Exact word - i /// textSearchWord : the word we are searching for , no matter, root or word /// wordFontType - Word Fornt Type : Dictational (field : TypeDict) , Othmani (Field : TypeOthm) /// serachCriteria : the criteria no matter Otmani or Dictional : /// Word Dictional Criteria : DictNMAlif , DictNM /// Word Othmani Criteria : OthmNMAlif , OthmNM , Othm /// /// Parameteres: qid sf st vf vt sw tor tt sc ft d ps /// pageSize (ps) /// quranID (qid) suraIDFrom (sf) suraIDTo (st) verseOrderFrom (vf) verseOrderTo (vt) textSearchWord (sw) /// textSearchWordOrRoot (tor) : w , r /// isDefault (d) : 0 -no, 1 - yes /// searchedTextType (tt) : Part From - p , Exact word - i /// serachCriteria (sc) : * Word Dictional Criteria : DictNMAlif , DictNM / * Word Othmani Criteria : OthmNMAlif , OthmNM , Othm /// Font Type (ft) : o - Othmani , d- Dictional /// </summary> void btnSearch_Click(object sender, EventArgs e) { string textSearchWord = string.Empty; pageSize = int.Parse(txtPageSize.Text); textSearchWord = txtSearchWord.Text.Trim(); if (textSearchWord.Length <= 0) { lblmessage.Visible = true; lblmessage.Text = Resources.iQuranMessagesResources.SearchTextsRequired; return; } this.quranID = int.Parse(ddQuran.SelectedItem.Value.ToString()); Quran iquran = new Quran(this.siteID, this.quranID); int isdef = 1; string redirectUrl = string.Empty; if (iquran.IsDefault == false) { isdef = 0; } if (iquran.IsDefault == true) { string wordFontType = string.Empty; string wordCriteria = string.Empty; string searchedTextType = string.Empty; searchedTextType = rbSearchedTextType.SelectedItem.Value; wordFontType = rbWordFontType.SelectedItem.Value; if (wordFontType == "TypeDict") { wordCriteria = rbWordDictCriteria.SelectedItem.Value; fontType = "d"; } else { wordCriteria = rbWordOthmCriteria.SelectedItem.Value; fontType = "o"; } redirectUrl = SiteRoot + "/iQuran/QuranSearch/iQuranSimpleSearchView.aspx?" + "qid=" + this.quranID.ToInvariantString() + "&sf=" + int.Parse(ddSurasFrom.SelectedItem.Value).ToInvariantString() + "&st=" + int.Parse(ddSurasTo.SelectedItem.Value).ToInvariantString() + "&vf=" + int.Parse(txtSearchVerseFrom.Text.Trim()).ToInvariantString() + "&vt=" + int.Parse(txtSearchVerseTo.Text.Trim()).ToInvariantString() + "&tor=" + "w" + "&d=" + isdef + "&ps=" + pageSize + "&tt=" + searchedTextType + "&ft=" + fontType + "&sc=" + wordCriteria + "&sw=" + textSearchWord; } else { // translation: redirectUrl = SiteRoot + "/iQuran/QuranSearch/iQuranSimpleSearchView.aspx?" + "qid=" + this.quranID.ToInvariantString() + "&sf=" + int.Parse(ddSurasFrom.SelectedItem.Value).ToInvariantString() + "&st=" + int.Parse(ddSurasTo.SelectedItem.Value).ToInvariantString() + "&vf=" + int.Parse(txtSearchVerseFrom.Text.Trim()).ToInvariantString() + "&vt=" + int.Parse(txtSearchVerseTo.Text.Trim()).ToInvariantString() + "&tor=" + "w" + "&d=" + isdef + "&ps=" + pageSize + "&sw=" + textSearchWord; } WebUtils.SetupRedirect(this, redirectUrl); }