예제 #1
0
        public ActionResult LeadStatusHome()
        {
            LeadStatusModel objModel = new LeadStatusModel();

            objModel.status = objLeadStatusManager.GetAllStatus();
            return(View(objModel));
        }
예제 #2
0
        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));
            }
        }
예제 #3
0
        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);
        }
예제 #4
0
        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));
            }
        }
예제 #5
0
        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));
            }
        }