using Newtonsoft.Json; using Newtonsoft.Json.Linq; using PMS.BusinessModels; using PMS.BusinessModels.Account; using PMS.BusinessModels.ComplaintManage; using PMS.BusinessModels.Product; using PMS.BusinessModels.Project; using PMS.BusinessModels.Search; using PMS.EntityModels.ProManager; using PMS.Interface; using PMS.Interface.MedicalRecordManager; using PMS.Interface.ProManager; using PMS.Interface.SysManager; using PMS.Plugins.PluginsModels; using QWPlatform.SystemLibrary; using QWPlatform.SystemLibrary.Utils; using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.IO; using System.Linq; using System.Net.Http; using System.Security.Policy; using System.Text; using System.Web; using System.Web.Helpers; using System.Web.Mvc; using System.Web.Razor.Tokenizer.Symbols; using System.Web.Services.Description; namespace PMS.WebUI.Controllers { /// /// 创建人:王璐 /// 创建日期:2018/12/30 /// 模块功能:项目信息 /// public class ProManagerController : BaseController { /// /// 实例接口 /// IProModule ProModule = InterfaceFactory.CreateBusinessInstance(); IAccount Acount = InterfaceFactory.CreateBusinessInstance(); public static string ZLPMSAPI = ConfigurationManager.AppSettings["ZLPMSAPI"].ToStringEx();//问题管理系统webAPI [HttpGet] public ActionResult Index() { return View(); } /// /// 项目表单主页 /// /// [HttpGet] public ActionResult ProjectForm() { return View(); } #region 信息显示 /// /// 获取全部渠道信息 /// /// /// public ActionResult Datagrid() { string json = ProModule.GetAll_Channel(GetAuthDats().Channel); return Content(json, "application/json"); } /// /// 根据数据权限获取项目 /// /// /// /// public ActionResult BingProData(string ChannelID, string Search) { string json = ProModule.Get_Pro_NoAuthor(ChannelID, Search); return Content(json, "application/json"); } /// /// 根据项目ID获取机构信息 /// /// /// /// [HttpGet] public ActionResult BingStationData(string id, int page, int rows, string Search) { string json = ProModule.Get_Station_ById(id, page, rows, Search); return Content(json, "application/json"); } /// /// 根据项目ID获取服务器信息 /// /// /// /// /// public ActionResult BingServerData(string id, int page, int rows) { string json = ProModule.Get_Server_ById(id, page, rows); return Content(json, "application/json"); } /// /// 根据项目ID获取项目人员信息 /// /// /// /// /// public ActionResult BingWorkerData(string id, int page, int rows) { string json = ProModule.Get_Worker_ById(id, page, rows); return Content(json, "application/json"); } /// /// 根据项目ID获取项目产品信息 /// /// /// /// /// public ActionResult BingProductData(string id) { string json = ProModule.Get_Product_ById(id); return Content(json, "application/json"); } /// /// 返回当前登陆人信息 /// /// [HttpPost] public ActionResult GetFeedbackID() { var user = GetCurrentUser(); var obj = new { jobcode = user.JobCode, nature = user.PersonProperty, id = user.PersonID }; return Content(Strings.ObjectToJson(obj), "application/json"); } #endregion #region 项目添加 /// /// 添加项目的弹窗 /// /// /// public ActionResult ProjectInfo(string id) { ViewBag.id = id; return View(); } /// /// 添加项目 /// /// [HttpPost] public int Add_Project(ProBusinessModel model) { //获取登录者信息 var user = this.GetCurrentUser(); Session["identifyID"] = "null"; //创建项目 string projectID = ProModule.Add_Project(model, user); //判断创建是否成功 if (projectID == "NO") { return -1; } else if (projectID == null || projectID.Length == 0) { return 0; } else { //将创建的项目自动分配给创建者 if (Acount.AuthProjectToAccount(user.ID, user.CompanyID, projectID)) { Session["channel"] = model.id; Session["project"] = projectID; return 1; } } return 0; } /// /// 根据项目ID获取该项目的信息 /// /// /// public ActionResult Get_Pro_ById(string ID) { var dt = ProModule.ProInfo_ById(ID); return this.ResponseJson(System.Net.HttpStatusCode.OK, "读取成功", dt); } /// /// 获取项目性质 /// /// public ActionResult GetNature() { var dt = ProModule.GetNature(); return Content(dt, "application/json"); } /// /// 实施方式 /// /// public ActionResult GetImplementation() { var dt = ProModule.GetImplementation(); return Content(dt, "application/json"); } /// /// 项目状态 /// /// public ActionResult GetState() { var dt = ProModule.GetState(); return Content(dt, "application/json"); } #endregion #region 项目修改 /// /// 修改项目弹窗 /// /// /// public ActionResult UpdateProjectInfo(string id) { ViewBag.id = id; return View(); } /// /// 更新操作 /// /// public int Update_Project(ProBusinessModel model) { Session["channel"] = model.id; Session["project"] = model.PID; int r = ProModule.SaveProject(model); return r; } /// /// 根据项目ID获取项目审核流程信息 /// /// /// public ActionResult GetXMWTLC(string id) { var dt = ProModule.GetXMWTLC(id); return Content(dt, "application/json"); } public ActionResult GetProblem(string XMID, string ID) { var dt = ProModule.GetProblem(XMID, ID); return Content(dt, "application/json"); } public ActionResult GetProInfo(string id) { var dt = ProModule.GetProInfo(id); return this.ResponseJson(System.Net.HttpStatusCode.OK, "读取成功", dt); } #endregion #region 项目删除 /// /// 根据项目ID删除项目 /// /// /// [HttpPost] public int Del_Project(string id) { int r = ProModule.Del_Project(id); return r; } #endregion #region 机构添加 /// /// 添加机构的弹窗 /// /// /// public ActionResult StationInfo(string id) { ViewBag.id = id; return View(); } /// /// 机构等级 /// /// public ActionResult GetLevel() { var dt = ProModule.GetLevel(); return Content(dt, "application/json"); } /// /// 添加机构 /// /// [HttpPost] public int Add_Station(StationBusinessModel model) { return ProModule.Add_Station(model); } /// /// 工作流分组目录 /// /// public ActionResult GetCatalog(string id) { return Content(ProModule.GetCatalog(id), "application/json"); } #endregion #region 机构修改 /// /// 添加修改弹窗 /// /// /// public ActionResult UpdatStationInfo(string id) { ViewBag.id = id; return View(); } /// /// 接受渠道ID /// /// /// [HttpPost] public void PostChannelId(string id) { TempData["ProjectID"] = id; } /// /// 更新操作 /// /// public int UpdateStation(StationBusinessModel model) { int r = ProModule.SaveStation(model); return r; } /// /// 根据ID获取机构信息 /// /// public ActionResult GetStationInfo(string id) { var dt = ProModule.GetStationInfo(id); return this.ResponseJson(System.Net.HttpStatusCode.OK, "读取成功", dt); } #endregion #region 机构删除 /// /// 根据项目ID删除项目 /// /// /// [HttpPost] public int Del_Station(string id) { int r = ProModule.Del_Station(id); return r; } #endregion #region 服务器添加 /// /// 添加服务器的弹窗 /// /// /// public ActionResult ServerInfo(string id) { ViewBag.id = id; return View(); } /// /// 服务器类型 /// /// public ActionResult GetServerType() { var dt = ProModule.GetServerType(); return Content(dt, "application/json"); } /// /// 安装服务类型 /// /// public ActionResult GetInstallServerType() { var dt = ProModule.GetInstallServerType(); return Content(dt, "application/json"); } /// /// 数据库类型 /// /// public ActionResult GetDataBaseType() { var dt = ProModule.GetDataBaseType(); return Content(dt, "application/json"); } /// /// 预警类型 /// /// public ActionResult GetEarlyWarningType() { var dt = ProModule.GetEarlyWarningType(); return Content(dt, "application/json"); } /// /// 预警处理状态 /// /// public ActionResult GetWarningProcessingStatu() { var dt = ProModule.GetWarningProcessingStatu(); return Content(dt, "application/json"); } /// /// 项目监控状态 /// /// public ActionResult GetProjectMonitoringStatus() { var dt = ProModule.GetProjectMonitoringStatus(); return Content(dt, "application/json"); } /// /// 指标信息类型 /// /// public ActionResult GetIndicatorInformationType() { var dt = ProModule.GetIndicatorInformationType(); return Content(dt, "application/json"); } /// /// 指标信息状态 /// /// public ActionResult GetIndicatorInformationStatu() { var dt = ProModule.GetIndicatorInformationStatu(); return Content(dt, "application/json"); } /// /// 产品 /// /// public ActionResult GetProduct() { var dt = ProModule.GetProduct(); return Content(dt, "application/json"); } /// /// 添加服务器 /// /// [HttpPost] public int Add_Server(ServerBusinessModel model) { return ProModule.Add_Server(model); } #endregion #region 服务器修改 /// /// 服务器修改弹窗 /// /// /// public ActionResult UpdateServerInfo(string id) { ViewBag.id = id; return View(); } /// /// 更新操作 /// /// public int UpdateServer(ServerBusinessModel model) { int r = ProModule.UpdateServer(model); return r; } /// /// 根据ID获取机构信息 /// /// public ActionResult GetServerInfo(string id) { var dt = ProModule.GetServerInfo(id); return this.ResponseJson(System.Net.HttpStatusCode.OK, "读取成功", dt); } #endregion #region 服务器删除 /// /// 根据服务器ID删除服务器 /// /// /// [HttpPost] public int Del_Server(string id) { int r = ProModule.Del_Server(id); return r; } #endregion /// /// 添加服务器数据库的弹窗 /// /// /// public ActionResult ServerDataBaseInfo() { return View(); } #region 项目人员添加 /// /// 添加项目人员的弹窗 /// /// /// public ActionResult WorkerInfo(string id) { ViewBag.id = id; TempData["ProID"] = id; TempData["ProjectID"] = id; return View(); } /// /// 获取渠道对应的人员 /// /// public ActionResult GetWorkerInfo() { string id = TempData["ProID"].ToString(); var dt = ProModule.GetWorkerInfo(id); return Content(dt, "application/json"); } /// /// 获取项目对应的人员 /// /// public ActionResult GetWorker(string id) { var dt = ProModule.GetWorker(id); return Content(dt, "application/json"); } /// /// 添加项目人员 /// /// [HttpPost] public int Add_Worker(WorkerBusinessModel model) { return ProModule.Add_Worker(model); } #endregion #region 项目人员修改 /// ///项目人员修改弹窗 /// /// /// public ActionResult UpdateWorkerInfo(string id) { ViewBag.id = id; return View(); } /// /// 更新操作 /// /// [HttpPost] public int UpdateWorker(string id) { int r = ProModule.UpdateWorker(id); return r; } /// /// 根据ID获取人员信息 /// /// public ActionResult GetWorkerInfoByID(string id) { var user = GetCurrentUser(); var dt = ProModule.GetWorkerInfoByID(user.PersonID); return this.ResponseJson(System.Net.HttpStatusCode.OK, "读取成功", dt); } #endregion #region 项目产品添加 /// /// 添加项目产品的弹窗 /// /// /// public ActionResult ProductInfo(string id) { ViewBag.id = id; return View(); } /// /// 添加项目产品 /// /// /// [HttpPost] public int Add_Product(ProductBusinessModel model) { return ProModule.Add_Product(model); } /// /// 获取产品名称 /// /// public ActionResult GetProductByID() { var dt = ProModule.GetProductByID(); return Content(dt, "application/json"); } /// /// 根据产品ID获取版本号 /// /// public ActionResult GetEditionByID(string id) { var json = ProModule.GetEditionByID(id); return Content(json, "text/json"); } #endregion #region 项目产品修改 /// /// 项目产品修改弹窗 /// /// /// /// public ActionResult UpdateProductInfo(string id, string xmid) { ViewBag.id = id; ViewBag.xmid = xmid; return View(); } /// /// 变更产品状态 /// /// /// /// /// 1新增2修改 /// public ActionResult UpdateProductStatusChange(string id, string xmid, string qdid,int type) { ViewBag.id = id; ViewBag.xmid = xmid; ViewBag.qdid = qdid; ViewBag.type = type; return View(); } /// /// 调整服务时间 /// /// /// public int AdjustServiceTime(ProjectMainRecordsModel model) { var user = GetCurrentUser(); model.DJR= user.Name; model.DJRID = user.PersonID; int r = ProModule.AdjustServiceTime(model); return r; } /// /// 修改产品服务时间 /// /// /// public int UpdateAdjustServiceTime(ProjectMainRecordsModel model) { var user = GetCurrentUser(); model.DJR = user.Name; model.DJRID = user.PersonID; int r = ProModule.UpdateAdjustServiceTime(model); return r; } /// /// 删除产品服务记录 /// /// /// public int DeleteAdjustServiceTime(string ID) { ProjectMainRecordsModel model= new ProjectMainRecordsModel(); var user = GetCurrentUser(); model.ID=ID; model.DJR = user.Name; model.DJRID = user.PersonID; int r = ProModule.DeleteAdjustServiceTime(model); return r; } /// /// 查询单条维保记录 /// /// /// public ActionResult Get_SingleServiceRecord(string id) { var json = ProModule.Get_SingleServiceRecord(id); return Content(json, "text/json"); } /// /// 根据产品ID获取服务时间 /// /// /// /// /// public ActionResult Get_ProductAdjustService(string QDID, string XMID, string CPID) { string json = ProModule.Get_ProductAdjustService(QDID, XMID, CPID).ToJson(); return Content(json, "application/json"); } /// /// 获取BH客户信息 /// /// public ActionResult GetBHCustomer(string q) { var url = ZLPMSAPI+"/api/ProblemManagSystem/GetBHCustomer"; string data = "{\"name\": \"" + q + "\"}"; var client = new HttpClient(); var content = new StringContent(data, Encoding.UTF8, "application/json"); var statereslut = client.PostAsync(url, content).Result.Content.ReadAsStringAsync().Result; JObject jResult = JObject.Parse(statereslut); var Result = jResult["data"]; string strResult = Result.ToString(); return Content(strResult, "application/json"); } /// /// 更新操作 /// /// public int UpdateProduct(ProductBusinessModel model) { int r = ProModule.UpdateProduct(model); return r; } /// /// 产品ID根据ID获取产品名称 /// /// public ActionResult GetProductInfo(string id) { var json = ProModule.GetProductInfo(id); //return this.ResponseJson(System.Net.HttpStatusCode.OK, "读取成功", dt); return Content(json, "text/json"); } //根据项目产品模块ID获取版本和说明 [HttpPost] public ActionResult GetProjectProducct(string id) { var json = ProModule.GetProjectProducct(id); return Content(json, "text/json"); } #endregion #region 项目产品删除 /// /// 根据项目产品ID删除项目产品 /// /// /// [HttpPost] public int Del_Product(string id) { int r = ProModule.Del_Product(id); return r; } #endregion #region 批量导入 public ActionResult Itemupload(string ItemInfoId) { ViewBag.id = ItemInfoId; Session["ProjectID"] = ItemInfoId; return View(); } [HttpPost] public string ItemSiteBatch() { var itemInfoId = Session["ProjectID"].ToString();// Request.Form["itemInfoId"]; try { if (Request.Files.Count > 0) { var inputstream = Request.Files[0].InputStream; byte[] b = new byte[inputstream.Length]; inputstream.Read(b, 0, (int)inputstream.Length); string inputstr = Encoding.Default.GetString(b); var rstr = ProModule.ItemSiteBatch(itemInfoId, inputstr); return rstr; } else { return "{\"code\":0,\"msg\":\"未获取上传文件\"}"; } } catch (Exception) { return "{\"code\":0,\"msg\":\"调用人员批量录入时发生异常错误,请查看日志!\"}"; } } #endregion #region 工具上传 public ActionResult toolupload() { return View(); } //上传操作 [HttpPost] public string tool() { var files = this.Request.Files; if (this.Request.Files.Count > 0) { using (BinaryReader br = new BinaryReader(files[0].InputStream)) { byte[] byteData = br.ReadBytes((int)files[0].InputStream.Length); var uploadFile = files[0]; var fileName = uploadFile.FileName; var fileLen = uploadFile.ContentLength; var fileType = uploadFile.ContentType; string _tp = System.IO.Path.GetExtension(fileName); var r = UploadFile(byteData, fileName, fileType); } } return "1"; } #endregion #region 附件上传/下载/删除 //项目上传附件 [HttpPost] public ActionResult FileUpload() { var result = false; var files = this.Request.Files; if (this.Request.Files.Count > 0) { using (BinaryReader br = new BinaryReader(files[0].InputStream)) { byte[] byteData = br.ReadBytes((int)files[0].InputStream.Length); var uploadFile = files[0]; var fileName = uploadFile.FileName; var fileLen = uploadFile.ContentLength; var fileType = uploadFile.ContentType; string _tp = System.IO.Path.GetExtension(fileName); var r = UploadFile(byteData, fileName, fileType); if (r.code == 100) { ///数据库存储附件ID result = ProModule.FileUpload(Session["project"].ToString(), r.data, GetCurrentUser().Name, fileType, Session["identifyID"]==null?"":Session["identifyID"].ToString(), Session["interfaceID"] == null ? "" : Session["interfaceID"].ToString()); Session["identifyID"] = null; Session["interfaceID"] = null; } } } return Content(new PmsJsonResoult(result).ToString(), "application/json"); } //获取项目附件 [HttpPost] public ActionResult Attachment(string id, string type) { DataTable dt = ProModule.GetAttachment(id, type); List list = new List(); for (int i = 0; i < dt.Rows.Count; i++) { var filetype = (dt.Rows[i]["类型"].ToString() == "image/png" || dt.Rows[i]["类型"].ToString() == "image/jpeg") ? 1 : 0; var ID = dt.Rows[i]["附件ID"].ToString(); FtpDownloadResult model = DownloadFileBase64(ID, "o"); FTPFileModel ftpmodel = new FTPFileModel(); if (model != null) { ftpmodel.id = ID; ftpmodel.format = model.format; ftpmodel.fileName = model.fileName; ftpmodel.base64 = model.base64; ftpmodel.type = filetype; list.Add(ftpmodel); } } return Content(Strings.ObjectToJson(list), "application/json"); } //删除项目附件 [HttpPost] public int Delete_Attachment(string id) { return ProModule.Delete_Img(id); } #endregion #region 远程方式 /// /// 根据项目ID获取远程方式 /// /// /// [HttpPost] public ActionResult BingRemote(string id) { string json = ProModule.BingRemote(id); return Content(json, "application/json"); } /// /// 弹窗 /// /// /// public ActionResult Remote_Window(string id, int type) { ViewBag.type = type; ViewBag.id = id; return View(); } /// /// 添加 /// /// [HttpPost] public int Add_Remote(RemoteBusinessModel model) { return ProModule.Add_Remote(model); } /// /// 编辑 /// /// [HttpPost] public int Edit_Remote(RemoteBusinessModel model) { return ProModule.Edit_Remote(model); } /// /// 删除 /// /// [HttpPost] public bool Del_Remote(RemoteBusinessModel model) { return ProModule.Del_Remote(model) != 0; } #endregion #region 个性化修改 /// /// 根据项目ID获取个性化修改 /// /// /// [HttpPost] public ActionResult BingIdentify(string id) { string json = ProModule.BingIdentify(id); return Content(json, "application/json"); } /// /// 编辑获取数据 /// /// /// public ActionResult GetDataById(string id) { return Content(ProModule.GetDataById(id), "application/json"); } /// /// 弹窗 /// /// /// public ActionResult Identify_Window(string id, int type) { ViewBag.type = type; ViewBag.id = id; return View(); } /// /// 添加 /// /// [HttpPost] public string Add_Identify(Identify_Model model) { model.XGSM = HttpUtility.UrlDecode(model.XGSM); var result = ProModule.Add_Identify(model); if (result.Length == 36) { Session["identifyID"] = result; Session["project"] = model.XMID; } else { Session["identifyID"] = "null"; } return result; } /// /// 编辑 /// /// [HttpPost] public string Edit_Identify(Identify_Model model) { model.XGSM =HttpUtility.UrlDecode( model.XGSM); var result = ProModule.Edit_Identify(model); if (result.Length == 36) { Session["identifyID"] = result; Session["project"] = model.XMID; } else { Session["identifyID"] = "null"; } return result; } /// /// 删除 /// /// [HttpPost] public int Del_Identify(string id, string type) { if (type == "1") { return ProModule.Del_Identify(id); } else { return ProModule.Giveup_Identify(id); } } #endregion #region 验收仪器 /// /// 根据项目ID获取验收仪器 /// /// /// [HttpPost] public ActionResult Binginstrument(string id) { string json = ProModule.Binginstrument(id); return Content(json, "application/json"); } /// /// 添加验收仪器的弹窗 /// /// /// public ActionResult Instrument_Window(string id) { ViewBag.id = id; return View(); } /// /// 添加验收仪器 /// /// [HttpPost] public int Add_instrument(CheckinstrumentBusinessModel model) { return ProModule.Add_instrument(model); } /// /// 删除验收仪器 /// /// [HttpPost] public int Del_instrument(string id) { return ProModule.Del_instrument(id); } #endregion #region 验收模块 /// /// 根据项目ID获取验收模块 /// /// /// [HttpPost] public ActionResult Bingmodual(string id) { string json = ProModule.Bingmodual(id); return Content(json, "application/json"); } /// /// 添加验收模块的弹窗 /// /// /// public ActionResult Modual_Window(string id) { ViewBag.id = id; return View(); } /// /// 添加验收模块 /// /// [HttpPost] public int Add_modual(CheckModualBusinessModel model) { return ProModule.Add_modual(model); } /// /// 删除验收模块 /// /// [HttpPost] public int Del_modual(string id) { return ProModule.Del_modual(id); } #endregion #region 接口信息 #region 渠道 /// /// 根据项目ID获取接口信息 /// /// /// [HttpPost] public ActionResult BingInterface(GlobalInte req) { string json = ProModule.BingInterface(req); return Content(json, "application/json"); } /// /// 添加接口信息的弹窗 /// /// /// public ActionResult Interface_Window(string id, int type, string state) { ViewBag.type = type; ViewBag.id = id; ViewBag.state = state; return View(); } /// /// 添加接口信息 /// /// [HttpPost] public int Add_Interface(InterfaceBusinessModel model) { model.ID = Guid.NewGuid().ToString(); var result=ProModule.Add_Interface(model,GetCurrentUser().PersonID); if(result==1) { Session["project"] = model.XMID; Session["interfaceID"] = model.ID; } return result; } /// /// 编辑接口信息 /// /// [HttpPost] public int Edit_Interface(InterfaceBusinessModel model) { var result = ProModule.Edit_Interface(model); if (result == 1) { Session["project"] = model.XMID; Session["interfaceID"] = model.ID; } return result; } /// /// 删除接口信息 /// /// [HttpPost] public int Del_Interface(string id) { return ProModule.Del_Interface(id); } /// /// 根据ID获取接口信息 /// /// /// [HttpPost] public ActionResult GetInterface(string id) { string json = ProModule.GetInterface(id).ToJson(); return Content(json, "application/json"); } #endregion #region 总部 public ActionResult GolbalInte() { ViewBag.userInfo = GetCurrentUser().PersonProperty; return View(); } /// /// 添加接口信息的弹窗 /// /// /// public ActionResult GlobalInteWindow(int type, string id, string state) { ViewBag.type = type; ViewBag.state = state; ViewBag.id = id; return View(); } /// /// 变更接口状态的弹窗 /// /// /// public ActionResult DealWindow(string id) { ViewBag.id = id; return View(); } /// /// 根据ID获取接口过程 /// /// /// [HttpPost] public int DealInte(InterfaceBusinessModel model) { var result = ProModule.DealInte(model, GetCurrentUser().PersonID); if (result == 1) { Session["project"] = model.XMID; Session["interfaceID"] = model.ID; } return result; } /// /// 根据ID获取接口过程 /// /// /// [HttpPost] public ActionResult GetInteProcess(string id) { string json = ProModule.GetInteProcess(id); return Content(json, "application/json"); } /// /// 获取性质除了客户的人员信息 /// /// /// public ActionResult GetinfoBynature(int type) { string json = ProModule.GetinfoBynature(type); return Content(json, "application/json"); } #endregion #endregion #region 查询字典表 /// /// 查询字典表 /// /// /// public ActionResult SelectNature(string ID) { var list = account_obj.SelectNature(ID); var json = Strings.ObjectToJson(list); return Content(json, "application/json"); } #endregion #region 迁移机构数据变成项目 /// /// 迁移渠道项目【将机构变成项目】 /// /// 项目ID /// 机构ID /// public ActionResult MigrationOrganization(string ProjectID, string SiteID) { var msg = ""; var state = ProModule.MigrationOrganization( ProjectID, SiteID, GetCurrentUser(), out msg); return Content(new PmsJsonResoult(true, msg, null).ToString(), "text/json"); } #endregion } }