Пример #1
0
        /// <summary>
        /// This method will call the Gift Resource access class method to get the Image list for the passed Tribute Type
        /// </summary>
        /// <param name="objGiftImage">An object which contain the Tribute type for which wants to  
        ///                             get the Image list</param>
        /// <returns>This method will return the Gifts object which contain the list of Image</returns>
        public List<GiftImage> GetImage(GiftImage objGift)
        {
            try
            {
                GiftResource objGiftRes = new GiftResource();

                return objGiftRes.GetImage(objGift);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #2
0
        /// <summary>
        /// This method will call the Gift Resource access class method to delete the Gift
        /// </summary>
        /// <param name="objGift">Gift object which contain the Giftid which Gift user wants to delete</param>
        public void DeleteGift(Gifts objGift)
        {
            try
            {
                GiftResource objGiftRes = new GiftResource();

                objGiftRes.DeleteGift(objGift);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #3
0
        /// <summary>
        /// This method will call the Gift Resource access class method to Add the Gift detail
        /// </summary>
        /// <param name="objGift">Gift object which contain the Gift detail which user want to Add</param>
        public void InsertGift(Gifts objGift)
        {
            try
            {
                GiftResource objGiftRes = new GiftResource();

                object Identity = objGiftRes.InsertGift(objGift);

                if ((objGift != null) && (objGift.CustomError == null) && (Identity != null))
                {
                    string name;

                    if (objGift.FirstName == "" && objGift.UserName == string.Empty)
                    {
                        name = objGift.GiftSentBy;

                        if (objGift.GiftSentBy == "")
                        {
                            name = "Anonymous User";
                        }
                    }
                    else
                    {
                        if (objGift.FirstName == string.Empty)
                            name = objGift.UserName;
                        else
                            name = objGift.FirstName + " " + objGift.LastName;
                    }

                    string EmailSubject = name + " added a new gift on Your " + WebConfig.ApplicationWord + "...";
                    string EmailBody = "<font style='font-size: 12px; font-family:Lucida Sans;'><p>" + name + " added a new gift in the " + objGift.TributeName + " " + objGift.TributeType + " Tribute. <br/> <br/> To view the gift, follow the link below: <br/>" + objGift.UrlToEmail + "<br/> <br/>" + "----" + "<br/>" + "Your " + WebConfig.ApplicationWord + " Team</p></font>";

                    SendEmail(objGift.TributeId, EmailSubject, EmailBody);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }