public JsonResult Select(int pageSize, int pageNumber, bool?isEnabled, int?visible, string branchName, string batchGuid, int sort) { SerchThirdPartyMallModel serch = new SerchThirdPartyMallModel() { PageNumber = pageNumber, PageSize = pageSize, BatchName = branchName, IsEnabled = isEnabled, Visible = visible, Sort = sort }; if (!string.IsNullOrWhiteSpace(batchGuid)) { serch.BatchGuid = new Guid(batchGuid); } else { serch.BatchGuid = null; } var list = ThirdPartyMallConfigManage.SelectThirdMall(serch); return(Json(list)); }
public JsonResult SelectBatch(string batchId) { ThirdPartyCodeBatch result = new ThirdPartyCodeBatch(); if (!string.IsNullOrWhiteSpace(batchId)) { result = ThirdPartyMallConfigManage.SelectBatch(new Guid(batchId)); } return(Json(result)); }
public ActionResult Detail(int pkid) { var result = ThirdPartyMallConfigManage.SelectThirdMall(pkid); result.ImageUrl = result.ImageUrl; result.ImgUrl = WebConfigurationManager.AppSettings["DoMain_image"] + result.ImageUrl; var result1 = JsonConvert.DeserializeObject <List <DescriptionModal> >(result.Description); return(Json(result)); }
public JsonResult Operate(string type, string branchId, string branchName, bool?isEnabled, int?sort, int?limitQty, int?batchQty, DateTime?startDateTime, DateTime?endDateTime, string description, string ImageUrl, int pkid) { int result = -1; if (ControllerContext.HttpContext.User == null) { return(Json(new { result = "请重新登录!" })); } ThirdPartyMallModel thirdMall = new ThirdPartyMallModel() { PKID = pkid, BatchName = branchName, BatchQty = batchQty, IsEnabled = isEnabled, Sort = sort, LimitQty = limitQty, Description = description, StartDateTime = startDateTime, EndDateTime = endDateTime, ImageUrl = ImageUrl, CreateDateTime = DateTime.Now, UpdateDateTime = DateTime.Now, operater = ControllerContext.HttpContext.User.Identity.Name, BatchGuid = new Guid(branchId) }; switch (type) { case "insert": result = ThirdPartyMallConfigManage.InserThirdMall(thirdMall); if (result > 0) { new OprLogManager().AddOprLog(new OprLog() { Author = HttpContext.User.Identity.Name, AfterValue = JsonConvert.SerializeObject(thirdMall), ChangeDatetime = DateTime.Now, ObjectID = result, ObjectType = "ThirdMall", Operation = "新增三方商城记录", HostName = Request.UserHostName }); } break; case "update": result = ThirdPartyMallConfigManage.EditThirdMall(thirdMall); new OprLogManager().AddOprLog(new OprLog() { Author = HttpContext.User.Identity.Name, AfterValue = JsonConvert.SerializeObject(thirdMall), ChangeDatetime = DateTime.Now, ObjectID = thirdMall.PKID, ObjectType = "ThirdMall", Operation = "编辑三方商城记录", HostName = Request.UserHostName }); break; } return(Json(new { msg = result })); }
public JsonResult SortChange(int sort) { var result = ThirdPartyMallConfigManage.SortChange(sort); return(Json(new { msg = result })); }