public LeadAssembler(Contact contact, LeadPersonal leadPersonal, Telesale telesale, LeadFactory factory)
 {
     Contact = contact;
     LeadPersonal = leadPersonal;
     Telesale = telesale;
     LeadFactory = factory;
 }
Exemple #2
0
        public override ScriptActionResult Update(Site site, Contact contact, LeadPersonal person, Telesale telesale)
        {
            if (contact == null || contact.ContactPerson == null)
                return ScriptActionResult.InCompeleted;

            contact.ContactPerson.Email = Email;
            return ScriptActionResult.Completed;
        }
 public override ScriptActionResult Update(Site site, Contact contact, LeadPersonal person, Telesale telesale)
 {
     LeadAssembler.Contact = contact;
     LeadAssembler.LeadPersonal = person;
     LeadAssembler.Telesale = telesale;
     contact.Leads.Add(LeadAssembler.Assemble(BusinessTypes.Cleaning));
     return ScriptActionResult.Completed | ScriptActionResult.EmailRequired;
 }
        public override ScriptActionResult Update(Site site, Contact contact, LeadPersonal person, Telesale telesale)
        {
            if (contact == null || contact.Site == null)
                return ScriptActionResult.InCompeleted;

            contact.Site.Qualification = Number;
            return ScriptActionResult.Completed;
        }
        public override ScriptActionResult Update(Site site, Contact contact, LeadPersonal person, Telesale telesale)
        {
            if (contact.CallLines == null)
                return ScriptActionResult.InCompeleted;

            var callLine = contact.CallLines.Last();
            callLine.EmailInfo = true;
            return ScriptActionResult.Completed;
        }
        public override ScriptActionResult Update(Site site, Contact contact, LeadPersonal person, Telesale telesale)
        {
            if (string.IsNullOrEmpty(Firstname) && string.IsNullOrEmpty(Lastname))
                return ScriptActionResult.InCompeleted;

            if (contact == null || contact.ContactPerson == null)
                return ScriptActionResult.InCompeleted;

            contact.ContactPerson.Firstname = Firstname;
            contact.ContactPerson.Lastname = Lastname;
            return ScriptActionResult.Completed;
        }
        public override ScriptActionResult Update(Site site, Contact contact, LeadPersonal person, Telesale telesale)
        {
            if (contact == null || !contact.CallFrequency.HasValue)
                return ScriptActionResult.InCompeleted;

            if (UpdateInMonth)
                contact.NextCall = DateTime.Today.AddMonths(contact.CallFrequency.Value);
            else
                contact.NextCall = DateTime.Today.AddDays(3*7);

            return ScriptActionResult.Completed;
        }
        public override ScriptActionResult Update(Site site, Contact contact, LeadPersonal person, Telesale telesale)
        {
            var group = contact.Site.Groups.SingleOrDefault(x => x.Type == "Building");
            if (group == null)
                throw new Exception("No property manager building found for this site");

            throw new NotImplementedException();
            //todo need to re-do on this
            /*if (!string.IsNullOrEmpty(Firstname) || !string.IsNullOrEmpty(Lastname))
            {
                group.Firstname = Firstname;
                group.Lastname = Lastname;
            }

            if (!string.IsNullOrEmpty(Phone))
                group.Phone = Phone;

            if (!string.IsNullOrEmpty(Company))
                group.AgentComp = Company;*/
        }
Exemple #9
0
        public override ScriptActionResult Update(Site site, Contact contact, LeadPersonal person, Telesale telesale)
        {
            Lead lead;

            LeadAssembler.Contact = contact;
            LeadAssembler.LeadPersonal = person;
            LeadAssembler.Telesale = telesale;

            switch (Type)
            {
                case ScriptActionType.CreateMaintenanceLead:
                    lead = LeadAssembler.Assemble(BusinessTypes.Maintenance);
                    break;
                default:
                    lead = LeadAssembler.Assemble(BusinessTypes.Cleaning);
                    break;
            }

            contact.Leads.Add(lead);

            return ScriptActionResult.Completed | ScriptActionResult.EmailRequired;
        }
Exemple #10
0
        protected virtual string GetPhoneNumber(Contact contact)
        {
            if (contact == null)
                return null;

            if (contact.ContactPerson != null)
            {
                if (!string.IsNullOrEmpty(contact.ContactPerson.DirectLine))
                    return contact.ContactPerson.DirectLine;

                if (!string.IsNullOrEmpty(contact.ContactPerson.Mobile))
                    return contact.ContactPerson.Mobile;
            }

            if (contact.Site != null)
            {
                if (!string.IsNullOrEmpty(contact.Site.Phone))
                    return contact.Site.Phone;
            }

            return null;
        }
Exemple #11
0
        public override ScriptActionResult Update(Site site, Contact contact, LeadPersonal person, Telesale telesale)
        {
            if (site == null)
                throw new Exception("This site cant not be changed to OPR, please contact DB admin");

            if (site.Contacts.Any(x=>x.Code == "OPR"))
                throw new Exception("Not a valid tenant, the site already has an OPR contact");

            site.PropertyManaged = false;
            site.TsToCall = true;
            site.Size = Size.Size025.ToString();

            contact.DaToCheck = true;
            contact.DaToCheckInfo = "Need new tenant for PMS";

            site.Contacts.Add(new Contact
            {
                SiteId = site.Id,
                BusinessTypeId = (int)BusinessTypes.Cleaning,
                LastCall = DateTime.Today,
                NextCall = DateTime.Today.AddDays(contact.CallFrequency.GetValueOrDefault() * 7),
                Code = "OPR",
                CallFrequency = 3,
                ContactPerson = new ContactPerson
                {
                    SiteId = site.Id,
                    Lastname = Lastname,
                    Firstname = Firstname,
                    DirectLine = Phone,
                    Mobile = Mobile,
                    CreateDate = DateTime.Today
                }
            });

            return ScriptActionResult.Completed;
        }
 public override ScriptActionResult Update(Site site, Contact contact, LeadPersonal person, Telesale telesale)
 {
     contact.DaToCheck = true;
     contact.DaToCheckInfo = InfoForDa;
     return ScriptActionResult.Completed;
 }
Exemple #13
0
 private static void CopyContact(COMPTEMP origin, ref Contact contact)
 {
     contact.NewManagerDate = origin.NEWMANDATE;
     contact.DaToCheck = origin.DATA_UPDAT;
     contact.DaToCheckInfo = origin.INFO_UPDAT;
     contact.ExtManagement = origin.NEED_INFO;
     contact.ReceptionName = origin.RECP_NAME;
 }
 public TelesaleScriptProvider(Contact contact, Telesale telesale, LeadPersonal leadPerson)
 {
     Contact = contact;
     Telesale = telesale;
     LeadPerson = leadPerson;
 }
 public BdScriptProvider(Contact contact, LeadPersonal leadPerson)
 {
     Contact = contact;
     LeadPerson = leadPerson;
 }
Exemple #16
0
 protected Filter(Contact contact)
 {
     Contact = contact;
 }
 public QualificationFilter(Contact contact)
     : base(contact)
 {
 }
 public override ScriptActionResult Update(Site site, Contact contact, LeadPersonal person, Telesale telesale)
 {
     contact.CallBackDate = CallbackDate;
     return ScriptActionResult.Completed;
 }
Exemple #19
0
 public abstract ScriptActionResult Update(Site site, Contact contact, LeadPersonal person, Telesale telesale);
Exemple #20
0
 public LeadFactory(Contact contact)
 {
     Contact = contact;
 }