public JsonResult ChangeKeyBCAStatus() { string currentuser = Session["CurrentUserID"].ToString(); string currentusername = Session["DomainUserName"].ToString(); string entityType = string.IsNullOrEmpty(Request["EntityType"]) ? "" : Request["EntityType"]; string theId = string.IsNullOrEmpty(Request["TheId"]) ? "" : Request["TheId"]; string oldstatus = string.IsNullOrEmpty(Request["OldStatus"]) ? "" : Request["OldStatus"]; string newstatus = string.IsNullOrEmpty(Request["NewStatus"]) ? "" : Request["NewStatus"]; string reason = string.IsNullOrEmpty(Request["Reason"]) ? "" : Request["Reason"]; Params param = new Params() { Parameter = new Dictionary <string, string>() }; if (entityType == "9") { param.WSDL = "TokenUpdateStatus"; param.RequestTransType = "ChangeTokenStatusByKeyId"; param.Parameter.Add("keyId", theId); } else if (entityType == "11") { param.WSDL = "TokenSMEUpdateStatus"; param.RequestTransType = "ChangeTokenSMEStatusBySnToken"; param.Parameter.Add("snToken", theId); } param.Parameter.Add("oldStatus", oldstatus); param.Parameter.Add("newStatus", newstatus); param.Parameter.Add("desc", reason); param.Parameter.Add("operator", currentusername); string start = DateTime.Now.ToString(); ChangeStatusResult result = StatusUpdate.Token(param); ChangeStatusUpdatedBy updatedby = new ChangeStatusUpdatedBy { ID = currentuser, Name = currentusername }; result.UpdatedBy = updatedby; string stop = DateTime.Now.ToString(); ChangeStatusLog.Write(param, result, start, stop); return(Json(result, JsonRequestBehavior.AllowGet)); }