Example #1
0
        /// <summary>
        /// Search By Criteria - iQuran version instances as IList with paging
        /// </summary>
        /// <param name="WithSuras"> used to retrive the QuranSuras - Sura - instances of the Quran Revesion </param>
        /// <param name="siteId"></param>
        /// <param name="isActive"></param>
        /// <param name="pageNumber"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalPages"></param>
        /// <returns></returns>
        public static List <Quran> GetPage_iQuran_ByActive(bool WithSuras, int siteId, bool isActive, int pageNumber, int pageSize, out int totalPages)
        {
            totalPages = 1;
            IDataReader reader = DBiQuran.iQuran_GetPage_ByActive(siteId, isActive, pageNumber, pageSize, out totalPages);

            return(LoadListFromReader(reader, WithSuras));
        }
Example #2
0
 private void GetCounts_ByRoot_Table(int siteId, int quranID, int strtSuraOrder,
                                     int endSuraOrder, int strtVerseOrder, int endVerseOrder, string TextWordRoot)
 {
     using (IDataReader reader = DBiQuran.iSearch_GetCounts_Default_ByRoot_Table_Dr(siteId, quranID, strtSuraOrder, endSuraOrder,
                                                                                    strtVerseOrder, endVerseOrder, TextWordRoot))
     {
         if (reader.Read())
         {
             this.verseQty      = reader["VerseQty"].ToString();
             this.wordQty       = reader["WordQty"].ToString();
             this.searchedWords = reader["SearchedWords"].ToString().Replace("--", "-");
             if (this.searchedWords.Contains("-"))
             {
                 this.searchedWords = searchedWords.Substring(1, searchedWords.Length - 1);
             }
         }
         else
         {
             if (log.IsErrorEnabled)
             {
                 log.Error("IDataReader didn't read in Quran.GetiQuran");
             }
         }
     }
 }
Example #3
0
        private void GetiQuran(int siteId, int quranId)
        {
            using (IDataReader reader = DBiQuran.iQuran_GetiQuran(siteId, quranId))
            {
                if (reader.Read())
                {
                    this.quranID          = int.Parse(reader["QuranID"].ToString());
                    this.siteID           = int.Parse(reader["SiteID"].ToString());
                    this.title            = reader["Title"].ToString().Trim();
                    this.description      = reader["Description"].ToString();
                    this.tRanslatorDetUrl = reader["TRanslatorDetUrl"].ToString();
                    this.translationSrc   = reader["TranslationSrc"].ToString();

                    this.suraCount = int.Parse(reader["SuraCount"].ToString());

                    string isdefault = reader["IsDefault"].ToString();
                    this.isDefault = (isdefault == "True" || isdefault == "1");
                    this.qLanguage = reader["QLanguage"].ToString().Trim();
                    string active = reader["IsActive"].ToString();
                    this.isActive    = (active == "True" || active == "1");
                    this.createdDate = Convert.ToDateTime(reader["CreatedDate"]);

                    this.createdByUserName = reader["UserName"].ToString().Trim();
                    this.createdByUserID   = int.Parse(reader["CreatedBy"].ToString());
                }
                else
                {
                    if (log.IsErrorEnabled)
                    {
                        log.Error("IDataReader didn't read in Quran.GetiQuran");
                    }
                }
            }
        }
Example #4
0
        /// <summary>
        /// Search By Criteria - iSura version instances as IList with paging
        /// </summary>
        /// <param name="WithVerses"> used to retrive the SuraVerse - Verse - instances of the Sura </param>
        /// <param name="siteId"></param>
        /// <param name="quranID"></param>
        /// <param name="isActive"></param>
        /// <param name="pageNumber"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalPages"></param>
        /// <returns></returns>
        public static List <QuranSura> GetPage_iSura_ByActive(bool WithVerses, int siteId, int quranID, bool isActive, int pageNumber, int pageSize, out int totalPages)
        {
            totalPages = 1;
            IDataReader reader = DBiQuran.iSura_GetPage_ByActive(siteId, quranID, isActive, pageNumber, pageSize, out totalPages);

            return(LoadListFromReader(reader, WithVerses));
        }
Example #5
0
        /// <summary>
        /// Search By Criteria - iVerse version instances as IList with paging
        /// </summary>
        /// <param name="siteId"></param>
        /// <param name="quranID"></param>
        /// <param name="suraID"></param>
        /// <param name="isActive"></param>
        /// <param name="isTranslation"> To tell SP to search within the translation or the arabic texts</param>
        /// <param name="pageNumber"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalPages"></param>
        /// <returns></returns>
        public static List <QuranVerse> GetPage_iVerse_ByActive(int siteId, int quranID, int suraID, bool isActive, bool isTranslation, int pageNumber, int pageSize, out int totalPages)
        {
            totalPages = 1;
            IDataReader reader = DBiQuran.iVerse_GetPage_ByActive(siteId, quranID, suraID, isActive, isTranslation, pageNumber, pageSize, out totalPages);

            return(LoadListFromReader(reader, isTranslation));
        }
Example #6
0
        /// <summary>
        /// Search Arabic Quran for Word root
        /// </summary>
        public static List <iQuranSearch> iSearch_GetPage_Default_ByRoot(string searchCriteria, int siteId, int quranID, int strtSuraID, int endSuraID, int strtVerseOrder, int endVerseOrder,
                                                                         string TextSearchWord, int pageNumber, int pageSize, out int totalPages)
        {
            totalPages = 1;
            IDataReader reader = DBiQuran.iSearch_GetPage_Default_ByRoot(searchCriteria, siteId, quranID, strtSuraID, endSuraID, strtVerseOrder, endVerseOrder,
                                                                         TextSearchWord, pageNumber, pageSize, out totalPages);

            return(LoadListFromReader(reader, 0, false));
        }
Example #7
0
        /// <summary>
        /// Search Translation for word or sentence  or part from
        /// </summary>
        public static List <iQuranSearch> iSearch_GetPage_Translation_ByWordSentence(int siteId, int quranID, int strtSuraID, int endSuraID, int strtVerseOrder, int endVerseOrder,
                                                                                     string TextSearchWord, int pageNumber, int pageSize, out int totalPages)
        {
            totalPages = 1;
            IDataReader reader = DBiQuran.iSearch_GetPage_Translation_ByWordSentence(siteId, quranID, strtSuraID, endSuraID, strtVerseOrder, endVerseOrder,
                                                                                     TextSearchWord, pageNumber, pageSize, out totalPages);

            return(LoadListFromReader(reader, 0, true));
        }
Example #8
0
        private bool Create()
        {
            int newID = -1;


            newID = DBiQuran.iQuran_Create(this.siteID, this.title, this.description, this.isDefault, this.qLanguage,
                                           this.tRanslatorDetUrl, this.translationSrc, this.isActive, this.createdByUserID);


            this.quranID = newID;

            return(newID > -1);
        }
Example #9
0
        private bool Create()
        {
            int newID = -1;

            newID = DBiQuran.iSura_Create(this.siteID, this.quranID, this.title, this.place,
                                          this.suraOrder, this.isActive, this.createdByUserID);

            DBiQuran.iQuran_Increment_SuraCount(this.siteID, this.quranID);

            this.suraID = newID;

            return(newID > -1);
        }
Example #10
0
 private bool Update()
 {
     if (this.qLanguage == "ar")
     {
         return(DBiQuran.iVerse_UpdateVerse_Text(this.siteID, this.quranID, this.suraID, this.verseID, this.verseOrder, this.suraOrder,
                                                 this.halfNo, this.partNo, this.hizbNo, this.quraterNo, this.place,
                                                 this.startTime, this.endTime, this.endTimeText, this.isActive, this.createdByUserID,
                                                 this.verseText, this.quranVerseTxt.VerseTextNM, this.quranVerseTxt.VerseTextNMAlif));
     }
     else
     {
         return(DBiQuran.iVerse_UpdateVerse_Transl(this.siteID, this.quranID, this.suraID, this.verseID,
                                                   this.suraOrder, this.verseOrder, this.VerseText));
     }
 }
Example #11
0
        private void GetOthmaniVerse(int siteId, int verseid)
        {
            using (IDataReader reader = DBiQuran.iVerse_GetOthmaniVerseDetails(siteId, verseid))
            {
                if (reader.Read())
                {
                    this.verseID = int.Parse(reader["VerseID"].ToString());
                    this.suraID  = int.Parse(reader["SuraID"].ToString());
                    this.quranID = int.Parse(reader["QuranID"].ToString());
                    this.siteID  = int.Parse(reader["SiteID"].ToString());

                    this.verseOrder       = int.Parse(reader["VerseOrder"].ToString());
                    this.suraOrder        = int.Parse(reader["SuraOrder"].ToString());
                    this.sortOrderInQuran = int.Parse(reader["SortOrderInQuran"].ToString());

                    this.halfNo    = int.Parse(reader["HalfNo"].ToString());
                    this.partNo    = int.Parse(reader["PartNo"].ToString());
                    this.hizbNo    = int.Parse(reader["HizbNo"].ToString());
                    this.quraterNo = int.Parse(reader["QuraterNo"].ToString());

                    this.place       = reader["Place"].ToString().Trim();
                    this.startTime   = float.Parse(reader["StartTime"].ToString());
                    this.endTime     = float.Parse(reader["EndTime"].ToString());
                    this.endTimeText = reader["EndTimeText"].ToString().Trim();

                    string active = reader["IsActive"].ToString();
                    this.isActive          = (active == "True" || active == "1");
                    this.createdDate       = Convert.ToDateTime(reader["CreatedDate"]);
                    this.createdByUserName = reader["UserName"].ToString().Trim();
                    this.createdByUserID   = int.Parse(reader["CreatedBy"].ToString());
                    this.qLanguage         = reader["QLanguage"].ToString().Trim();

                    this.verseText = reader["VerseText"].ToString();
                    this.quranVerseTxt.VerseText       = reader["VerseText"].ToString();
                    this.quranVerseTxt.VerseTextNM     = reader["VerseTextNM"].ToString();
                    this.quranVerseTxt.VerseTextNMAlif = reader["VerseTextNMAlif"].ToString();
                }
                else
                {
                    if (log.IsErrorEnabled)
                    {
                        log.Error("IDataReader didn't read in Quran.GetVerse");
                    }
                }
            }
        }
Example #12
0
 private void GetQuranPage(int siteId, int quranId, int pagenumber, bool isTranslation)
 {
     using (IDataReader reader = DBiQuran.iQuran_FrontEnd_GetPage_Header(siteId, quranId, pagenumber, isTranslation))
     {
         if (reader.Read())
         {
             this.partNo = int.Parse(reader["PartNo"].ToString());
             this.titles = reader["Titles"].ToString();
         }
         else
         {
             if (log.IsErrorEnabled)
             {
                 log.Error("IDataReader didn't read in QuranPage.GetQuranPage");
             }
         }
     }
 }
Example #13
0
        private bool Create()
        {
            int newID = -1;

            if (this.qLanguage == "ar")
            {
                newID = DBiQuran.iVerse_CreateVerse_Text(this.siteID, this.quranID, this.suraID, this.verseOrder, this.suraOrder,
                                                         halfNo, this.partNo, this.hizbNo, this.quraterNo, this.place,
                                                         this.startTime, this.endTime, this.endTimeText, this.isActive, this.createdByUserID,
                                                         this.quranVerseTxt.VerseText, this.quranVerseTxt.VerseTextNM, this.quranVerseTxt.VerseTextNMAlif);
            }
            else
            {
                newID = DBiQuran.iVerse_CreateVerse_Transl(this.siteID, this.quranID, this.suraID, this.verseID,
                                                           this.suraOrder, this.verseOrder, this.VerseText);
            }

            DBiQuran.iQuran_iSura_Increment_VerseCount(this.siteID, this.quranID, this.suraID);
            this.verseID = newID;

            return(newID > -1);
        }
        private void GetVerseTranslation(int siteId, int quranId, int verseId)
        {
            using (IDataReader reader = DBiQuran.iVerse_GetVerse_Translation_Dr(siteId, quranId, verseId))
            {
                if (reader.Read())
                {
                    this.verseID    = int.Parse(reader["VerseID"].ToString());
                    this.suraID     = int.Parse(reader["SuraID"].ToString());
                    this.quranID    = int.Parse(reader["QuranID"].ToString());
                    this.siteID     = int.Parse(reader["SiteID"].ToString());
                    this.suraOrder  = int.Parse(reader["SuraOrder"].ToString());
                    this.verseOrder = int.Parse(reader["VerseOrder"].ToString());

                    this.VerseText = reader["VerseText"].ToString();
                }
                else
                {
                    if (log.IsErrorEnabled)
                    {
                        log.Error("IDataReader didn't read in Quran.GetiQuran");
                    }
                }
            }
        }
Example #15
0
 public static bool CheckTranslationStatus(int siteId, int quranId, int suraId, int verseid)
 {
     return(DBiQuran.iVerse_Translation_CheckStatus(siteId, quranId, suraId, verseid));
 }
Example #16
0
 /// <summary>
 /// Used to retrive the original arabic verse id from it's order
 /// </summary>
 public static int GetDefaultVerseID(int siteId, int suraOrder, int OrigVerseOrder)
 {
     return(DBiQuran.iVerse_GetVerseDefaultID(siteId, suraOrder, OrigVerseOrder));
 }
Example #17
0
 public static IDataReader GetVersesTexts(int siteId, int suraid)
 {
     return(DBiQuran.iVerse_GetVersesTexts(siteId, suraid));
 }
Example #18
0
 public static bool DeleteVerse_Translation(int siteId, int quranId, int suraId, int verseid)
 {
     DBiQuran.iQuran_iSura_Decrement_VerseCount(siteId, quranId, suraId);
     return(DBiQuran.iVerse_Delete_Translation(siteId, quranId, suraId, verseid));
 }
Example #19
0
 public static bool OrderExists_Translation(int siteId, int quranID, int suraID, int verseID, int verseOrder)
 {
     return(DBiQuran.iVerse_OrderExists_Translation(siteId, quranID, suraID, verseID, verseOrder));
 }
Example #20
0
        public static List <iQuranSearch> GetFrontEndPage_iSura(int siteId, int quranID, int suraID, int selectedVerseID, int pageNumber, bool isTranslation)
        {
            IDataReader reader = DBiQuran.iSura_GetFrontPage_Sura(siteId, quranID, suraID, pageNumber, isTranslation);

            return(LoadListFromReader(reader, selectedVerseID, isTranslation));
        }
Example #21
0
 public static int GetSuraVersesCount(int siteId, int suraid)
 {
     return(DBiQuran.iSura_GetSura_VersesCount(siteId, suraid));
 }
Example #22
0
 public static IDataReader GetSuras(int siteId, int quranid)
 {
     return(DBiQuran.iSura_GetSuras_Dr(siteId, quranid));
 }
Example #23
0
 public static bool DeleteSura(int siteId, int quranID, int suraid)
 {
     DBiQuran.iQuran_Decrement_SuraCount(siteId, quranID);
     return(DBiQuran.iSura_Delete(siteId, quranID, suraid));
 }
Example #24
0
        public static List <QuranSura> GetiSura_All(int siteId, int quranID)
        {
            IDataReader reader = DBiQuran.iSura_FrontEnd_GetSurasIndex(siteId, quranID);

            return(LoadListFromReader(reader, false));
        }
Example #25
0
 public static int GetSuraIdFromPageNumber(int siteId, int quranId, int pageNumber, bool isTranslation)
 {
     return(DBiQuran.iVerse_GetSuraIdFromPageNumber(siteId, quranId, pageNumber, isTranslation));
 }
Example #26
0
 public static int GetVersePageNumber(int siteId, int suraId, int verseid)
 {
     return(DBiQuran.iVerse_GetVersePageNumber(siteId, suraId, verseid));
 }
Example #27
0
 public static string GetVerseBism(int siteId, int quranId, bool isTranslation)
 {
     return(DBiQuran.iVerse_GetVerseBism(siteId, quranId, isTranslation));
 }
Example #28
0
 public static bool Exists(int siteId, int quranID, int suraID, int verseID, string verseTextNMAlif)
 {
     return(DBiQuran.iVerse_Exists(siteId, quranID, suraID, verseID, verseTextNMAlif));
 }
Example #29
0
 public static bool Exists_Translation(int siteId, int quranID, int suraID, int verseID, string verseText)
 {
     return(DBiQuran.iVerse_Exists_Translation(siteId, quranID, suraID, verseID, verseText));
 }
Example #30
0
        /// <summary>
        /// View Page of Quran for reading in front end with selected searched verse
        /// </summary>
        public static List <iQuranSearch> GetFrontEnd_QuranPage_WithSearchVerse(int siteId, int quranID, int selectedVerseID, int pageNumber, bool isTranslation)
        {
            IDataReader reader = DBiQuran.iQuran_FrontEnd_GetPage(siteId, quranID, pageNumber, isTranslation);

            return(LoadListFromReader(reader, selectedVerseID, isTranslation));
        }