public void Deletecategory(object[] objRowID)
 {
     TributeResource objResource = new TributeResource();
     using (TransactionScope trans = new TransactionScope())
     {
         objResource.Deletecategory(objRowID);
         trans.Complete();
     }
 }
 //Delete tribute.
 public void DeleteTribute(object[] tribute)
 {
     TributeResource objResource = new TributeResource();
     using (TransactionScope trans = new TransactionScope())
     {
         objResource.DeleteTribute(tribute);
         trans.Complete();
     }
 }
 public bool IsStoryAdded(object[] objUserAdmin)
 {
     TributeResource objResource = new TributeResource();
     return objResource.IsStoryAdded(objUserAdmin);
 }
        public bool SaveVideoTributeAndSendEmail(Videos objVid, string type)
        {
            object objIdentity = null;
            bool videocaptionexist = false;
            try
            {
                VideoResource objVideo = new VideoResource();
                object[] param = { objVid };
                //objVideo.InsertRecord(param);
                object objVideoId = objVideo.InsertDataAndReturnId(param);
                if (objVideoId != null)
                {
                    objVid.VideoId = int.Parse(objVideoId.ToString());
                    //to send mail
                    TributeResource objTribute = new TributeResource();
                    Tributes objTrib = new Tributes();
                    objTrib.TributeId = int.Parse(objVid.UserTributeId.ToString());
                    objTrib.TypeDescription = objVid.ModuleTypeName;
                    object[] paramTrib = { objTrib };
                    List<UserInfo> objUser = objTribute.GetTributeAdministrators(paramTrib);
                    if (objUser.Count > 0)
                    {
                        SendEmailForNewVideoTribute(objUser, objVid, type);
                    }

                    //Function to send the mail to the list of users who have added the Tribute in their list of favourites
                    List<UserInfo> objUserFav = objTribute.GetFavouriteTributeUsers(paramTrib);
                    if (objUserFav.Count > 0)
                    {
                        //As per discussion with Rupendra: will send the mail in "To" field.
                        //ie a comma separated list of users in the "to" field
                        SendEmail(objUserFav, objVid, type);
                    }

                }
                else
                    videocaptionexist = true;

            }
            catch (Exception ex)
            {
                throw ex;
            }
            return videocaptionexist;
        }
 public IList<AdminTributeUpdate> GetAdminTransactions()
 {
     TributeResource objResource = new TributeResource();
     return objResource.GetAdminTransactions();
 }
 /// <summary>
 /// Method to update used coupon details.
 /// </summary>
 /// <param name="objParam"></param>
 /// <returns></returns>
 public void UpdateUsedCouponDetail(string couponCode)
 {
     TributeResource objTributeResource = new TributeResource();
     objTributeResource.UpdateUsedCouponDetail(couponCode);
 }
 //Update tribute privacy
 public void UpdateTributePrivacy(object[] tribute)
 {
     TributeResource objResource = new TributeResource();
     using (TransactionScope trans = new TransactionScope())
     {
         objResource.UpdateTributePrivacy(tribute);
         trans.Complete();
     }
 }
 public void UpdateTributePackage(int tributeId, string tributePackageType)
 {
     TributeResource objResource = new TributeResource();
     using (TransactionScope trans = new TransactionScope())
     {
         objResource.UpdateTributePackage(tributeId, tributePackageType);
         trans.Complete();
     }
 }
        /// <summary>
        /// Save the Donation Object
        /// </summary>
        /// <param name="objDonation"></param>
        /// <returns></returns>
        public object SaveDonation(Donation objDonation)
        {
            TributeResource objTributes = new TributeResource();
            object[] obj ={ objDonation };

            object objDonationReturn = new object();
            using (TransactionScope trans = new TransactionScope())
            {
                objDonationReturn = objTributes.InsertDonation(obj);
                //Transaction Commited
                trans.Complete();
            }
            return objDonationReturn;
        }
 public string CheckUrlExists(string strUrl, int tributetype)
 {
     string strSetButtonText = null;
     TributeResource objResource = new TributeResource();
     return objResource.CheckUrlExistsInTable(strUrl, tributetype);
 }
 /// <summary>
 /// Method to remove favorite from list.
 /// </summary>
 /// <param name="objFavorite">Filled AddToFavorite entity.</param>
 public void RemoveFromFavotire(AddToFavorite objFavorite)
 {
     TributeResource objTributeResource = new TributeResource();
     object[] objParam = { objFavorite };
     objTributeResource.RemoveFromFavorites(objParam);
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="videoTributeId"></param>
 /// <param name="tributeId"></param>
 /// <returns></returns>
 public void LinkVideoTribute(LinkVideoMemorialTribute objLinkTribute)
 {
     TributeResource objResource = new TributeResource();
     using (TransactionScope trans = new TransactionScope())
     {
         objResource.LinkVideoTribute(objLinkTribute);
         trans.Complete();
     }
 }
 public bool IsTributeExists(int TributeId)
 {
     TributeResource objTributeResource = new TributeResource();
     return objTributeResource.IsTributeExists(TributeId);
 }
 /// <summary>
 /// Added by UAttri: for checking whether a tribute contains video tribute
 /// </summary>
 /// <param name="tributeId"></param>
 /// <returns></returns>
 public bool IsTributeContainsVideoTribute(int tributeId)
 {
     TributeResource objResource = new TributeResource();
     return objResource.IsTributeContainsVideoTribute(tributeId);
 }
 public bool IsStoryHide(int TributeId)
 {
     TributeResource objResource = new TributeResource();
     return objResource.IsStoryHide(TributeId);
 }
 public bool UpdateNewTributeUrlTributeTypeinAlltables(UpdateTribute _objUpdateTribute, Tributes _newTribute)
 {
     TributeResource objResource = new TributeResource();
     return objResource.UpdateNewTributeUrlTributeTypeinAlltables(_objUpdateTribute, _newTribute);
 }
 public bool UpdateTributeExpiry(UpdateTribute objUTrb)
 {
     TributeResource objResource = new TributeResource();
     return objResource.UpdateTributeExpiry(objUTrb);
 }
        public object SaveTribute(Tributes tributes)
        {
            TributeResource objTributes = new TributeResource();
            object[] obj ={ tributes };

            object objTributeReturn = new object();
            using (TransactionScope trans = new TransactionScope())
            {
                objTributeReturn = objTributes.InsertTribute(obj);
                //Transaction Commited
                trans.Complete();
            }
            return objTributeReturn;
        }
 public bool UpdateTributePackage(UpdateTribute updateTribute)
 {
     TributeResource objResource = new TributeResource();
     return objResource.UpdateTributePackage(updateTribute);
 }
 /// <summary>
 /// Method to search tributes based on the entered criteria.
 /// </summary>
 /// <param name="objTribute">Filled TributeSearch entity containing search criteria.</param>
 /// <returns>List of tributes.</returns>
 public List<TributeSearch> SearchTribute(TributeSearch objTribute)
 {
     TributeResource objTributeResource = new TributeResource();
     object[] objParam = { objTribute };
     return objTributeResource.SearchTributes(objParam);
 }
 public void UpdateTributeURL(int tributeId,string tributeUrl)
 {
     TributeResource objResource = new TributeResource();
     objResource.UpdateTributeURL(tributeId, tributeUrl);
 }
 public string SequenceTributeName(string strTributeName, string strTributeType)
 {
     TributeResource objTributeResource = new TributeResource();
     return objTributeResource.SequenceTributeName(strTributeName, strTributeType);
 }
 public bool UpdateUserTributeMobileView(Users users)
 {
     TributeResource objResource = new TributeResource();
     return objResource.UpdateUserTributeMobileView(users);
 }
 public void SetStoryVisibility(int TributeId)
 {
     TributeResource objResource = new TributeResource();
     objResource.setStoryVisibility(TributeId);
 }
 public IList<UserInfo> GetAdministrators(object[] UserTributeID)
 {
     TributeResource objResource = new TributeResource();
     return objResource.GetAdministrators(UserTributeID);
 }
 public void UpdateAdminTributeUpdate(AdminTributeUpdate adminTributeUpdate)
 {
     TributeResource objTributeResource = new TributeResource();
     objTributeResource.UpdateAdminTributeUpdate(adminTributeUpdate);
 }
        /// <summary>
        /// Method to send the request to Notes resource for the record insertion.
        /// </summary>
        /// <param name="objVid">Filled Notes Entity</param>
        /// <returns>Object containing the Identity or Error Message</returns>
        public void SaveNote(Note objNote)
        {
            NotesResource objNotesManager = new NotesResource();
            TributeResource objTributeResource = new TributeResource();
            Tributes objTribute = new Tributes();
            object[] param = { objNote };
            object noteId = objNotesManager.InsertDataAndReturnId(param);
            objNote.NotesId = int.Parse(noteId.ToString());
            //to send email
            objTribute.TributeId = int.Parse(objNote.UserTributeId.ToString());
            objTribute.TypeDescription = objNote.ModuleTypeName;
            object[] paramMail = { objTribute };
            List<UserInfo> objUser = objTributeResource.GetTributeAdministrators(paramMail);
            if (objUser.Count > 0)
            {
                SendEmail(objUser, objNote);
            }

            //Function to send the mail to the list of users who have added the Tribute in their list of favourites
            List<UserInfo> objUserFav = objTributeResource.GetFavouriteTributeUsers(paramMail);
            if (objUserFav.Count > 0)
            {
                //As per discussion with Rupendra: will send the mail in "To" field.
                //ie a comma separated list of users in the "to" field
                SendEmail(objUserFav, objNote);
            }
        }
 /// <summary>
 /// Method to update information regarding the donation box
 /// this only updaes info at our end not at the epartners end
 /// </summary>
 /// <param name="objTributes"></param>
 public void UpdateDonationDetails(object[] objTributes)
 {
     TributeResource objResource = new TributeResource();
     using (TransactionScope trans = new TransactionScope())
     {
         objResource.UpdateDonationDetails(objTributes);
         trans.Complete();
     }
 }
        public void SendPhotoEmail(List<Photos> objPhotoList)
        {
            //to send mail
            TributeResource objTribute = new TributeResource();
            Tributes objTrib = new Tributes();
            objTrib.TributeId = int.Parse(objPhotoList[0].UserTributeId.ToString());
            objTrib.TypeDescription = objPhotoList[0].ModuleTypeName;
            object[] paramTrib = { objTrib };
            List<UserInfo> objUser = objTribute.GetTributeAdministrators(paramTrib);
            if (objUser.Count > 0)
            {
                Photos objPhoto = objPhotoList[objPhotoList.Count - 1];
                SendEmail(objUser, "Photo", objPhoto);
            }

            //Function to send the mail to the list of users who have added the Tribute in their list of favourites
            List<UserInfo> objUserFav = objTribute.GetFavouriteTributeUsers(paramTrib);
            if (objUserFav.Count > 0)
            {
                Photos objPhoto = objPhotoList[objPhotoList.Count - 1];
                //As per discussion with Rupendra: will send the mail in "To" field.
                //ie a comma separated list of users in the "to" field
                SendEmail(objUserFav, "Photo", objPhoto);
            }
        }
 public bool IsNewTypeURLValid(Tributes objTribute)
 {
     TributeResource objResource = new TributeResource();
     return objResource.IsNewTypeURLValid(objTribute);
 }