public ActionResult CreateCard(Web.ViewModel.CardStackViewModel csvm) { try { csvm.card.CreatorId = csvm.user.UserId; csvm.card.CallBackDate = Convert.ToDateTime(csvm.card.CallBackDate); if (csvm.card.CreatorName == null) { csvm.card.CreatorName = csvm.user.UserName; } csvm.card.LastUpdated = DateTime.Now; //When creator creates a card, the boolean value is set to false. It can be set to true only by manager/admin when they reassign the lead to someone else csvm.card.Reassigned = false; _service.SaveCard(csvm); var id = csvm.card.ParentLeadId; return(Content("card with ID: " + csvm.card.CardId + " is saved to lead " + csvm.card.ParentLeadId)); } catch { return(Content("This Lead was removed from the system. Please contact your Trinity Manager for details")); } }
public ActionResult ChangeStatus(Web.ViewModel.CardStackViewModel csvm) { Lead lead = _service.GetLeadByLeadId(csvm.card.ParentLeadId); if (lead.Status != "Customer") { lead.Status = "Warm Lead"; } _leadRepos.SaveLead(lead); var leadid = csvm.card.ParentLeadId.ToString(); return(Content(leadid)); //return RedirectToAction("Profile", "Lead", new { leadid }); }