Exemplo n.º 1
0
 public ActionResult CreateLead(Lead lead)
 {
     try
       {
     _leadService.Create(lead);
     return null;
       }
       catch
       {
     return View("Create", lead);
       }
 }
Exemplo n.º 2
0
 public ActionResult EditLead(Lead lead)
 {
     try
       {
     _leadService.Update(lead);
     return null;
       }
       catch
       {
     return View("Edit", _leadService.Get(lead.Id));
       }
 }
Exemplo n.º 3
0
 //
 // GET: /Leads/Create
 public ActionResult Create()
 {
     Lead lead = new Lead();
       return View("Create", lead);
 }
Exemplo n.º 4
0
        public void SerializeLead()
        {
            Lead lead = new Lead
              {
            BestTimeToContact = new List<DateTime?> {DateTime.UtcNow, DateTime.UtcNow.AddDays(1)},
            City = "Hyderabad",
            ClientStatus = ClientStatus.Inactive,
            FirstName = "Goli",
            ExpectedDateOfJoin = DateTime.UtcNow,
            Description = "Description",
            DemoDateTime = DateTime.UtcNow,
            Courses = new List<CourseRequested>
            {
              new CourseRequested
              {
            AmountQuoted = 999,
            CourseId = "5347aec0a7981519889f235e",
            ServiceRequired = ServiceRequired.Consulting
              },
              new CourseRequested
              {
            AmountQuoted = 99,
            CourseId = "5347b7b2a7981519889f2360",
            ServiceRequired = ServiceRequired.Consulting
              }
            },
            CommunicationDetails = new List<CommunicationDetail>
            {
              new CommunicationDetail
              {
            CommunicationType = CommunicationType.Email,
            IsPreferred = false,
            Uri = "*****@*****.**"
              },
              new CommunicationDetail
              {
            CommunicationType = CommunicationType.Skype,
            IsPreferred = true,
            Uri = "shanmukhi.goli"
              }
            },
            Country = "India",
            LastName = "Shanmukhi",
            LeadSource = LeadSource.Campaign,
            LeadType = LeadType.Individual,
            Salutation = Salutation.Mr,
            Status = Status.Active
              };

              string serializeObject = JsonConvert.SerializeObject(lead);
        }