public ActionResult LeadStatusHome() { LeadStatusModel objModel = new LeadStatusModel(); objModel.status = objLeadStatusManager.GetAllStatus(); return(View(objModel)); }
public ActionResult EditStatus(string StatusName, string StatusColour, string StatusID, string template, string TextTemplate) { objResponse Response = new objResponse(); session = new SessionHelper(); LeadStatusModel objModel = new LeadStatusModel(); try { Response = objLeadStatusManager.EditStatus(StatusName, StatusColour, template, TextTemplate, Convert.ToInt64(StatusID), Convert.ToInt64(session.UserSession.UserId)); if (Response.ErrorCode == 0) { objModel.status = objLeadStatusManager.GetAllStatus(); return(View("LeadStatusHome", objModel)); // return Json("Success", JsonRequestBehavior.AllowGet); } else { // objGrpModel.groups = objGroupManager.GetAllGroups(); return(Json("", JsonRequestBehavior.AllowGet)); } } catch (Exception ex) { //objGrpModel.groups = objGroupManager.GetAllGroups(); BAL.Common.LogManager.LogError("EditStatus Post Method", 1, Convert.ToString(ex.Source), Convert.ToString(ex.Message), Convert.ToString(ex.StackTrace)); return(Json("", JsonRequestBehavior.AllowGet)); } }
private Task UpdateTaskStatusAsync(Leads lead) { Task newStatusTask; var leadStatusModel = new LeadStatusModel(); leadStatusModel.LeadId = lead.Id; leadStatusModel.Date = DateTime.UtcNow; leadStatusModel.Status = LeadStatus.FailedBusinessValidation; leadStatusModel.ServiceName = StaticSettings.ServiceName; newStatusTask = _messagingService.PushMessageAsync(TopicNameStatusHistory, new[] { leadStatusModel }); return(newStatusTask); }
public ActionResult DeleteLeadStatus(string StatusID) { string response = ""; LeadStatusModel objModel = new LeadStatusModel(); try { response = objLeadStatusManager.DeleteStatus(Convert.ToInt64(StatusID)); if (response == "1") { objModel.status = objLeadStatusManager.GetAllStatus(); return(View("LeadStatusHome", objModel)); } return(Json(response, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { BAL.Common.LogManager.LogError("DeleteLeadStatus Post Method", 1, Convert.ToString(ex.Source), Convert.ToString(ex.Message), Convert.ToString(ex.StackTrace)); return(Json(response, JsonRequestBehavior.AllowGet)); } }
public ActionResult GetTemplate(string StatusID) { objResponse Response = new objResponse(); LeadStatusModel objModel = new LeadStatusModel(); try { Response = objLeadStatusManager.GetTemplate(Convert.ToInt64(StatusID)); if (Response.ErrorCode == 0) { return(Json(Response.ErrorMessage, JsonRequestBehavior.AllowGet)); } else { return(Json("", JsonRequestBehavior.AllowGet)); } } catch (Exception ex) { BAL.Common.LogManager.LogError("GetTemplate Post Method", 1, Convert.ToString(ex.Source), Convert.ToString(ex.Message), Convert.ToString(ex.StackTrace)); return(Json("", JsonRequestBehavior.AllowGet)); } }