Exemple #1
0
        public Boolean IsMobile(String Phone)
        {
            DateTime RequestDate = DateTime.Now;
            Guid     SessionID   = Guid.NewGuid();

            EDDY.IS.Core.Logging.PerformanceLog Log = new EDDY.IS.Core.Logging.PerformanceLog();
            Log.StartLog(EDDY.IS.Core.ISApplication.Leadping,
                         MethodBase.GetCurrentMethod().DeclaringType.Namespace
                         + "." + MethodBase.GetCurrentMethod().DeclaringType.Name
                         + "." + MethodBase.GetCurrentMethod().Name
                         , null, Phone);
            Boolean ReturnValue = new Boolean();

            try
            {
                Phone = Regex.Replace(Phone, "[^.0-9]", "");
                return(this.Helper.IsMobilePhone(Phone));
            }
            catch (Exception Ex)
            {
                ISException isEx = new ISException(Ex,
                                                   MethodBase.GetCurrentMethod().DeclaringType.Namespace
                                                   + "." + MethodBase.GetCurrentMethod().DeclaringType.Name
                                                   + "." + MethodBase.GetCurrentMethod().Name, Phone);
                isEx.Save(true);
                return(true);
            }
            finally
            {
                Log.EndLog(ReturnValue);
            }
        }
Exemple #2
0
        public ValidationResponse RetrieveInstitutionValidationErrors(ValidationRequest ValidationRequest, String ServiceKey)
        {
            String SoapUIRequest = "";

            //Call our SOAP UI Message Builder
            SoapUIRequest = GenerateSoapUIRequest(ValidationRequest, ServiceKey);

            DateTime RequestDate = DateTime.Now;
            Guid     SessionID   = Guid.NewGuid();

            EDDY.IS.Core.Logging.PerformanceLog Log = new EDDY.IS.Core.Logging.PerformanceLog();
            Log.StartLog(EDDY.IS.Core.ISApplication.Leadping,
                         MethodBase.GetCurrentMethod().DeclaringType.Namespace
                         + "." + MethodBase.GetCurrentMethod().DeclaringType.Name
                         + "." + MethodBase.GetCurrentMethod().Name
                         , null, ValidationRequest, ServiceKey);
            ValidationResponse ReturnValue = new ValidationResponse();

            ReturnValue.Status        = ServiceCallStatus.Sucess;
            ReturnValue.ServerMessage = "";
            try
            {
                if (System.Configuration.ConfigurationManager.AppSettings["ServiceKey"] != ServiceKey)
                {
                    ReturnValue.ServerMessage = "Invalid Service Key";
                    ReturnValue.Status        = ServiceCallStatus.Failure;
                    return(ReturnValue);
                }

                String ValidationErrorCheck = this.GetValidationErrorMessage(ValidationRequest.ProspectInfo);

                if (ValidationErrorCheck != null)
                {
                    ReturnValue.ServerMessage = ValidationErrorCheck;
                    ReturnValue.Status        = ServiceCallStatus.Failure;
                    return(ReturnValue);
                }


                EDDY.IS.LeadPing.Domain.ProspectInfo ProspectInput = TransLateToInternalProspect(ValidationRequest.ProspectInfo);


                EDDY.IS.LeadPing.Domain.ValidationRequest Request = new LeadPing.Domain.ValidationRequest();
                Request.InsitutionConfigs = new List <Domain.InstitutionConfig>();

                foreach (InstitutionConfig InsitutionConfig in ValidationRequest.InsitutionConfigs)
                {
                    EDDY.IS.LeadPing.Domain.InstitutionConfig Biz_InsitutionConfig = new Domain.InstitutionConfig();
                    Biz_InsitutionConfig.InstitutionID        = InsitutionConfig.InstitutionID;
                    Biz_InsitutionConfig.ClientRelationshipID = InsitutionConfig.ClientrelationshipID;
                    Biz_InsitutionConfig.BachelorsAvailable   = InsitutionConfig.BachelorsAvailable;
                    Biz_InsitutionConfig.CampusConfigs        = new List <Domain.CampusConfig>();
                    foreach (CampusConfig CampusConfig in InsitutionConfig.CampusConfigs)
                    {
                        EDDY.IS.LeadPing.Domain.CampusConfig Biz_CampusConfig = new Domain.CampusConfig();
                        Biz_CampusConfig.Address       = CampusConfig.Address;
                        Biz_CampusConfig.CampusID      = CampusConfig.CampusID;
                        Biz_CampusConfig.City          = CampusConfig.City;
                        Biz_CampusConfig.IsOnline      = CampusConfig.IsOnline;
                        Biz_CampusConfig.MilesFromUser = CampusConfig.MilesFromUser;
                        Biz_CampusConfig.State         = CampusConfig.State;
                        Biz_CampusConfig.ZipCode       = CampusConfig.ZipCode;
                        Biz_InsitutionConfig.CampusConfigs.Add(Biz_CampusConfig);
                    }


                    Request.InsitutionConfigs.Add(Biz_InsitutionConfig);
                }


                Request.ProspectInfo = ProspectInput;


                EDDY.IS.LeadPing.Domain.ValidationResponse Response = this.Helper.ProcessValidation(Request, SoapUIRequest);
                ReturnValue = this.TranslateValidationResponse(Response, SoapUIRequest);
            }
            catch (Exception Ex)
            {
                ISException isEx = new ISException(Ex,
                                                   MethodBase.GetCurrentMethod().DeclaringType.Namespace
                                                   + "." + MethodBase.GetCurrentMethod().DeclaringType.Name
                                                   + "." + MethodBase.GetCurrentMethod().Name, ValidationRequest, ServiceKey, SoapUIRequest);
                ReturnValue.ServerMessage = GetaAllMessages(Ex);
                ReturnValue.Status        = ServiceCallStatus.Failure;

                isEx.Save(true);
                return(ReturnValue);
            }
            finally
            {
                Log.EndLog(ReturnValue);
            }

            return(ReturnValue);
        }