public object InsertCreditPointCCDetails(object[] objValue)
        {
            StringBuilder sb = new StringBuilder();
            UserRegistration objUserReg = new UserRegistration();
            BillingResource objBillingResource = new BillingResource();
            BillingHistory objBilling = new BillingHistory();
            EmailManager objEmailManager = new EmailManager();
            TributePackage objpackage = new TributePackage();
            // return objBillingResource.InsertRecord(objValue);
            UserCreditcardDetails objCCdetail = new UserCreditcardDetails();
            SessionValue objUser = new SessionValue();
            Tributes objTribute = new Tributes();

            object identity = new object();
            using (TransactionScope trans = new TransactionScope())
            {
                identity = objBillingResource.InsertRecord(objValue);
                //Transaction Commited
                trans.Complete();
            }
            return identity;
        }
        public object InsertCCDetails(object[] objValue)
        {
            StringBuilder sb = new StringBuilder();
            UserRegistration objUserReg = new UserRegistration();
            BillingResource objBillingResource = new BillingResource();
            BillingHistory objBilling = new BillingHistory();
            EmailManager objEmailManager = new EmailManager();
            TributePackage objpackage = new TributePackage();
            // return objBillingResource.InsertRecord(objValue);
            UserCreditcardDetails objCCdetail = new UserCreditcardDetails();
            SessionValue objUser = new SessionValue();
            Tributes objTribute = new Tributes();
            String[] SponsorNameandMsgForEmail;

            object identity = new object();
            using (TransactionScope trans = new TransactionScope())
            {
                identity = objBillingResource.InsertRecord(objValue);
                //Transaction Commited
                trans.Complete();
            }
            objUserReg = (UserRegistration)objValue[0];
            if (objValue.Length > 1)
            {
                objUser = (SessionValue)objValue[1];
                objTribute = (Tributes)objValue[2];
                objpackage = (TributePackage)objValue[3];
                if (objValue[4] != null)
                    SponsorNameandMsgForEmail = (String[])objValue[4];
                else
                    SponsorNameandMsgForEmail = null;

                // Send the email to all the adminstrator
                if ((identity != null)
                    && (int.Parse(identity.ToString()) != 0))
                {

                    if (objpackage.IsSponserHide)
                    {

                        if (SponsorNameandMsgForEmail[0] != string.Empty)
                        {
                            objEmailManager.SendSponsorMailsWithMessage(SponsorNameandMsgForEmail[0], SponsorNameandMsgForEmail[1], objTribute.TributeId, objTribute.TypeDescription, objTribute.TributeName, objTribute.TributeUrl, objpackage.EndDate != null ? DateTime.Parse(objpackage.EndDate.ToString()).ToString("MMMM dd, yyyy") : "Never", objpackage.PackageId);
                        }
                        //else if (objpackage.IsSponsor)
                        //{
                        //    objEmailManager.SendSponsorMails(objUser.UserType == 1 ? objUser.UserName : objUser.FirstName, objUser.UserEmail, objTribute.TributeId, objTribute.TypeDescription, objTribute.TributeName, objTribute.TributeUrl, objpackage.EndDate != null ? DateTime.Parse(objpackage.EndDate.ToString()).ToString("MMMM dd, yyyy") : "Never", objpackage.PackageId);
                        //}
                        else
                        {
                            if (objpackage.IsSponsor)
                            {
                                objEmailManager.SendSponsorMails(objUserReg.UserCreditcardDetails.CardholdersName, "Your " + WebConfig.ApplicationWord + "<" + WebConfig.NoreplyEmail + ">", objTribute.TributeId, objTribute.TypeDescription, objTribute.TributeName, objTribute.TributeUrl, objpackage.EndDate != null ? DateTime.Parse(objpackage.EndDate.ToString()).ToString("MMMM dd, yyyy") : "Never", objpackage.PackageId);
                            }
                            else
                            {
                                objEmailManager.SendSponsorMails("An anonymous person has", "Your " + WebConfig.ApplicationWord + "<" + WebConfig.NoreplyEmail + ">", objTribute.TributeId, objTribute.TypeDescription, objTribute.TributeName, objTribute.TributeUrl, objpackage.EndDate != null ? DateTime.Parse(objpackage.EndDate.ToString()).ToString("MMMM dd, yyyy") : "Never", objpackage.PackageId);
                            }
                        }
                        //objEmailManager.SendSponsorMails(objUser.UserName, objUser.UserEmail, objTribute.TributeId, objTribute.TypeDescription, objTribute.TributeName, objTribute.TributeUrl, objUserReg.UserCreditcardDetails.ExpirationDate.ToString("MMMM dd, yyyy"), objpackage.PackageId);

                    }

                }
            }
            return identity;
        }