Exemplo n.º 1
0
        public AIA.Life.Models.Policy.Policy LoadPendingRequirementsData(Policy objPolicyData)
        {
            AIA.Life.Models.Policy.Policy objPolicy = new AIA.Life.Models.Policy.Policy();

            AIA.Life.Business.Quote.QuoteBusiness objQuoteBusiness = new AIA.Life.Business.Quote.QuoteBusiness();
            objPolicy = objQuoteBusiness.LoadPendingRequirements(objPolicyData);
            return(objPolicy);
        }
Exemplo n.º 2
0
        ///Services
        ///

        public AIA.Life.Models.Integration.Services.QuoteInfo GetQuoteInformation(string QuoteNo)
        {
            AIA.Life.Models.Integration.Services.QuoteInfo objLifeQuote = new AIA.Life.Models.Integration.Services.QuoteInfo();
            objLifeQuote.QuoteNo       = QuoteNo;
            objLifeQuote.IsForServices = true;
            AIA.Life.Business.Quote.QuoteBusiness objQuoteBusiness = new AIA.Life.Business.Quote.QuoteBusiness();
            return(objQuoteBusiness.FetchServicesQuoteData(objLifeQuote));
        }
Exemplo n.º 3
0
        public AIA.Life.Models.Policy.Policy LoadProposalReAllocateData(Policy objPolicyData)
        {
            AIA.Life.Models.Policy.Policy objPolicy = new AIA.Life.Models.Policy.Policy();

            AIA.Life.Business.Quote.QuoteBusiness objQuoteBusiness = new AIA.Life.Business.Quote.QuoteBusiness();
            objPolicy = objQuoteBusiness.LoadProposalReAllocate(objPolicyData);
            return(objPolicy);
        }
Exemplo n.º 4
0
        public AIA.Life.Models.Policy.Policy LoadSubmittedProposalsData(Policy objPolicyData)
        {
            AIA.Life.Models.Policy.Policy objPolicy = new AIA.Life.Models.Policy.Policy();

            AIA.Life.Business.Quote.QuoteBusiness objQuoteBusiness = new AIA.Life.Business.Quote.QuoteBusiness();
            objPolicy = objQuoteBusiness.LoadSubmittedProposals(objPolicyData);
            return(objPolicy);
        }
Exemplo n.º 5
0
        public AIA.Life.Models.EmailSMSDetails.EmailDetails Email(AIA.Life.Models.EmailSMSDetails.EmailDetails ObjEmailDetails)
        {
            // ObjEmailDetails = new AIA.Life.Models.EmailSMSDetails.EmailDetails();
            string ObjEmail = Newtonsoft.Json.JsonConvert.SerializeObject(ObjEmailDetails);

            AIA.Life.Business.Quote.QuoteBusiness objQuoteBusiness = new AIA.Life.Business.Quote.QuoteBusiness();
            ObjEmailDetails = objQuoteBusiness.Email(ObjEmailDetails);
            return(ObjEmailDetails);
        }
Exemplo n.º 6
0
        public AIA.Life.Models.Opportunity.Prospect SaveProspect(AIA.Life.Models.Opportunity.Prospect objProspect)
        {
            TpServiceLog tpServiceLog = new TpServiceLog();

            tpServiceLog.ServiceRequest = Newtonsoft.Json.JsonConvert.SerializeObject(objProspect);
            TransactLog transactLog = new TransactLog();

            transactLog.SerivceTraceID = tpServiceLog.ServiceTraceID = objProspect.ServiceTraceID;
            transactLog.UserName       = objProspect.UserName;
            string Message = ValidateUserAuth(transactLog);

            if (Message != "" && Message != null)
            {
                objProspect.Message = Message;
                return(objProspect);
            }
            ProspectController Prospect = new ProspectController();

            if (objProspect.NotePad != null)
            {
                objProspect.NotePadByteArray = Convert.FromBase64String(objProspect.NotePad);

                string Proposerfilename     = "NotePad.png";
                string ProposerdirectryPath = "";
                //ProposerdirectryPath = HttpContext.Current.Server.MapPath("ContactID_" + objProspect.ContactID);
                ProposerdirectryPath = System.Web.Hosting.HostingEnvironment.MapPath("~/Policy/ContactID_" + objProspect.ContactID);
                if (!Directory.Exists(ProposerdirectryPath))
                {
                    Directory.CreateDirectory(ProposerdirectryPath);
                }
                string Proposerfilepath = Path.Combine(ProposerdirectryPath, Proposerfilename);
                System.IO.File.WriteAllBytes(Proposerfilepath, objProspect.NotePadByteArray);
                objProspect.objNeedAnalysis.NotePadPath = Path.Combine("\\Policy", "ContactID_" + objProspect.ContactID, Proposerfilename);
            }
            Prospect.GetByteArray(objProspect);
            if (!string.IsNullOrEmpty(objProspect.objNeedAnalysis.ByteArraygraph))
            {
                objProspect.ByteArrayGraph = Convert.FromBase64String(objProspect.objNeedAnalysis.ByteArraygraph);
                objProspect.ByteArrayGraph = Prospect.Appgeneratepdf(objProspect.ByteArrayGraph, objProspect);
            }
            AIA.Life.Business.Prospect.ProspectBusiness objProspectBusiness = new AIA.Life.Business.Prospect.ProspectBusiness();
            objProspect = objProspectBusiness.SaveProspect(objProspect);
            if (objProspect.ProspectStage == 4)
            {
                AIA.Life.Business.Quote.QuoteBusiness QuoteBusiness = new AIA.Life.Business.Quote.QuoteBusiness();
                objProspect = QuoteBusiness.SendEmailAndSMSNotificationOnSAveProspect(objProspect);
            }

            tpServiceLog.ServiceResponse = Newtonsoft.Json.JsonConvert.SerializeObject(objProspect);
            commonBusiness.CreateServiceLog(tpServiceLog);
            return(objProspect);
        }
Exemplo n.º 7
0
        public void SMSReminder()
        {
            AIA.Life.Models.Opportunity.SMSReminder objSMSReminder   = new Life.Models.Opportunity.SMSReminder();
            AIA.Life.Business.Quote.QuoteBusiness   objQuoteBusiness = new AIA.Life.Business.Quote.QuoteBusiness();
            AVOAIALifeEntities Context = new AVOAIALifeEntities();
            var objLst   = Context.Usp_GetOutStandingDocList().ToList();
            var NoOfDays = 0;
            var PolicyID = "";

            foreach (var item in objLst)
            {
                objSMSReminder.NoOfDays = Convert.ToInt32(item.NoOfDays);
                objSMSReminder.PolicyID = Convert.ToString(item.PolicyId);
                //}
                //if (objLst.Count>0)
                //{
                objQuoteBusiness.SMSReminder(objSMSReminder);
            }
        }
Exemplo n.º 8
0
 public AIA.Life.Models.Opportunity.LifeQuote SendEmailAndSMSNotificationOnQuoteCreation(AIA.Life.Models.Opportunity.LifeQuote ObjQuote)
 {
     AIA.Life.Business.Quote.QuoteBusiness objQuoteBusiness = new AIA.Life.Business.Quote.QuoteBusiness();
     return(objQuoteBusiness.SendEmailAndSMSNotificationOnQuoteCreation(ObjQuote));
 }
Exemplo n.º 9
0
 public AIA.Life.Models.Opportunity.LifeQuote SaveQuote(AIA.Life.Models.Opportunity.LifeQuote ObjQuote)
 {
     AIA.Life.Business.Quote.QuoteBusiness objQuoteBusiness = new AIA.Life.Business.Quote.QuoteBusiness();
     return(objQuoteBusiness.SaveQuote(ObjQuote));
 }
Exemplo n.º 10
0
 public AIA.Life.Models.Policy.Policy LoadProposalBenefits(AIA.Life.Models.Policy.Policy objProposal)
 {
     AIA.Life.Business.Quote.QuoteBusiness objQuoteBusiness = new AIA.Life.Business.Quote.QuoteBusiness();
     return(objQuoteBusiness.LoadProposalBenefits(objProposal));
 }
Exemplo n.º 11
0
 public AIA.Life.Models.Opportunity.LifeQuote LoadBenefits(AIA.Life.Models.Opportunity.LifeQuote objQuote)
 {
     AIA.Life.Business.Quote.QuoteBusiness objQuoteBusiness = new AIA.Life.Business.Quote.QuoteBusiness();
     return(objQuoteBusiness.LoadBenefits(objQuote));
 }
Exemplo n.º 12
0
 public LifeQuote LoadQuotationPoolData(LifeQuote objPolicyData)
 {
     AIA.Life.Business.Quote.QuoteBusiness objQuoteBusiness = new AIA.Life.Business.Quote.QuoteBusiness();
     objPolicyData = objQuoteBusiness.LoadQuotationPool(objPolicyData);
     return(objPolicyData);
 }
Exemplo n.º 13
0
 public AIA.Life.Models.Opportunity.LifeQuote FetchQuoteData(AIA.Life.Models.Opportunity.LifeQuote objLifeQuote)
 {
     AIA.Life.Business.Quote.QuoteBusiness objQuoteBusiness = new AIA.Life.Business.Quote.QuoteBusiness();
     return(objQuoteBusiness.FetchQuoteData(objLifeQuote));
 }
Exemplo n.º 14
0
        public AIA.Life.Models.Opportunity.LifeQuote SaveQuote(AIA.Life.Models.Opportunity.LifeQuote ObjQuote)
        {
            TpServiceLog tpServiceLog = new TpServiceLog();

            tpServiceLog.ServiceRequest = Newtonsoft.Json.JsonConvert.SerializeObject(ObjQuote);
            TransactLog transactLog = new TransactLog();

            transactLog.SerivceTraceID = tpServiceLog.ServiceTraceID = ObjQuote.ServiceTraceID;
            transactLog.UserName       = ObjQuote.UserName;
            string Message = ValidateUserAuth(transactLog);

            if (Message != "" && Message != null)
            {
                ObjQuote.Message = Message;
                return(ObjQuote);
            }
            string ObjSuspect = Newtonsoft.Json.JsonConvert.SerializeObject(ObjQuote);

            #region Proposer Signature
            if (ObjQuote.Signature != null)
            {
                ObjQuote.ProspectSign = Convert.FromBase64String(ObjQuote.Signature);
                string Proposerfilename     = "Proposersignature.png";
                string ProposerdirectryPath = "";
                ProposerdirectryPath = System.Web.Hosting.HostingEnvironment.MapPath("~/Policy/ContactID_" + ObjQuote.objProspect.ContactID);
                //ProposerdirectryPath = HttpContext.Current.Server.MapPath("ContactID_" + ObjQuote.objProspect.ContactID);
                if (!Directory.Exists(ProposerdirectryPath))
                {
                    Directory.CreateDirectory(ProposerdirectryPath);
                }
                string Proposerfilepath = Path.Combine(ProposerdirectryPath, Proposerfilename);
                System.IO.File.WriteAllBytes(Proposerfilepath, ObjQuote.ProspectSign);
                ObjQuote.ProposerSignPath = Path.Combine("\\Policy", "ContactID_" + ObjQuote.objProspect.ContactID, Proposerfilename);
            }
            #endregion
            #region Spouse Signature
            if (ObjQuote.WPProposerSignature != null)
            {
                ObjQuote.WPSignature = Convert.FromBase64String(ObjQuote.WPProposerSignature);
                string WPfilename     = "WPProposersignature.png";
                string WPdirectryPath = "";
                //WPdirectryPath = HttpContext.Current.Server.MapPath("ContactID_" + ObjQuote.objProspect.ContactID);
                WPdirectryPath = System.Web.Hosting.HostingEnvironment.MapPath("~/Policy/ContactID_" + ObjQuote.objProspect.ContactID);
                if (!Directory.Exists(WPdirectryPath))
                {
                    Directory.CreateDirectory(WPdirectryPath);
                }
                string WPfilepath = Path.Combine(WPdirectryPath, WPfilename);
                System.IO.File.WriteAllBytes(WPfilepath, ObjQuote.WPSignature);
                ObjQuote.WPProposerSignPath = Path.Combine("\\Policy", "ContactID_" + ObjQuote.objProspect.ContactID, WPfilename);
            }
            #endregion
            AIA.Life.Business.Quote.QuoteBusiness objQuoteBusiness = new AIA.Life.Business.Quote.QuoteBusiness();
            ObjQuote = objQuoteBusiness.SaveQuote(ObjQuote);
            string QuoteFilePath = ConfigurationManager.AppSettings["QuoteFilePath"];
            if (ObjQuote.Message == "Success")
            {
                try
                {
                    ReportsController objReportController = new ReportsController();
                    var byteArray = objReportController.ReportQuotation(ObjQuote.QuoteNo, ObjQuote.objProductDetials.PlanCode, ObjQuote.objProductDetials.PreferredLangauage);

                    ObjQuote.QuotePDFPath = QuoteFilePath + ObjQuote.QuoteNo + "_Quote.pdf";
                    System.IO.File.WriteAllBytes(ObjQuote.QuotePDFPath, byteArray);
                    ObjQuote.ByteArray = byteArray;
                    objQuoteBusiness.SendEmailAndSMSNotificationOnQuoteCreation(ObjQuote);
                }
                catch (Exception e)
                {
                    log4net.GlobalContext.Properties["ErrorCode"] = ObjQuote.Error.ErrorCode = Codes.GetErrorCode();
                    Logger.Error(e);
                    ObjQuote.Error.ErrorMessage = "Please inform the IT HelpDesk on this application issue. Error Code is " + ObjQuote.Error.ErrorCode + ". Sorry for the inconvenience caused";
                }
            }

            tpServiceLog.ServiceResponse = Newtonsoft.Json.JsonConvert.SerializeObject(ObjQuote);
            commonBusiness.CreateServiceLog(tpServiceLog);
            return(ObjQuote);
        }
Exemplo n.º 15
0
 public AIA.Life.Models.Opportunity.LifeQuote LoadPreviousInsuranceGrid(AIA.Life.Models.Opportunity.LifeQuote objLifeQuote)
 {
     AIA.Life.Business.Quote.QuoteBusiness objQuoteBusiness = new AIA.Life.Business.Quote.QuoteBusiness();
     return(objQuoteBusiness.LoadPreviousInsuranceGrid(objLifeQuote));
 }
Exemplo n.º 16
0
 public AIA.Life.Models.Opportunity.LifeQuote LoadMastersForQuote(AIA.Life.Models.Opportunity.LifeQuote objLifeQuote)
 {
     AIA.Life.Business.Quote.QuoteBusiness objQuoteBusiness = new AIA.Life.Business.Quote.QuoteBusiness();
     return(objQuoteBusiness.LoadMastersForQuote(objLifeQuote));
 }
Exemplo n.º 17
0
 public AIA.Life.Models.Policy.Policy LoadMastersForProposalDetails(AIA.Life.Models.Policy.Policy objProposal)
 {
     AIA.Life.Business.Quote.QuoteBusiness objQuoteBusiness = new AIA.Life.Business.Quote.QuoteBusiness();
     return(objQuoteBusiness.LoadMastersForProposalDetails(objProposal));
 }