/// <summary> /// This method will call the Gift Resource access class method to get the Gift detail from database /// </summary> /// /// <param name="objGift">This is the Gift object which contain the Tribute ID to get ///the Gift for that tribute and user ID to get that user is admin or not for that tribute </param> /// /// <returns> This method will return the List of Gifts </returns> public List<Gifts> GetGifts(Gifts objGift) { try { GiftResource objGiftRes = new GiftResource(); return objGiftRes.GetGifts(objGift); } catch (Exception ex) { throw ex; } }
/// <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; } }
/// <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; } }