public ActionResult AjaxDelete(string channelNo) { SWfsChannelService service = new SWfsChannelService(); int i = service.DeleteChannel(channelNo); if (i >= 0) { #region 日志信息 SWfsSubjectService channelService = new SWfsSubjectService(); SWfsSubjectOrChannelLog log = new SWfsSubjectOrChannelLog(); log.SubjectOrChannelNo = channelNo; log.TypeValue = 1; //1频道 log.DateOperator = DateTime.Now; log.OperatorContent = "删除频道"; log.OperatorUserId = PresentationHelper.GetPassport().UserName; log.OperatorActionType = LogActionType.Delete.GetHashCode(); channelService.InsertSubjectOrChannelLog(log); #endregion return(Json(new { result = "1", message = "删除成功!" })); } else { return(Json(new { result = "0", message = "删除失败!" })); } }
/// <summary> /// 生成微码 /// </summary> /// <param name="passport"></param> /// <param name="request"></param> /// <returns></returns> public ActionResult CreateVCode(SWfsVActivityCodesRef obj) { //ServiceResult result = new ServiceResult(); string activityId = Request.Form["ActivityId"]; int count = int.Parse(Request.Form["CreateCount"]); //V码类型,1:独享 2:共享 short vcodeType = short.Parse(Request.Form["VCodeType"]); var dapp = DapperUtil.Query <SWfsVActivity>("ComBeziWfs_SWfsVActivity_ID", new { ActivityId = activityId }); string code = string.Empty; for (int i = 0; i < count; i++) { code = dapp.FirstOrDefault().ActivityCode + GetRandomCodeII(6); //obj.ActivityCodesId = int.Parse(Request.QueryString["ActivityCodesId"]); obj.ActivityId = activityId; obj.VCode = code; obj.VCodeType = vcodeType; obj.Source = "系统生成"; obj.DateCreate = DateTime.Now; obj.OperatorId = PresentationHelper.GetPassport().UserName; Vcode.CreateCrode(obj); } return(Redirect("VCodeManagement.html?activityId=" + activityId)); }
public ActionResult MobileADStatusModify(string id, string status, string channel) { SWfsMobileAdService service = new SWfsMobileAdService(); string userid = PresentationHelper.GetPassport().UserName; DateTime date = DateTime.Now; string s = status == "0" ? "1" : "0"; if (s == "1") { IList <SWfsMobileAd> list = service.GetListBySort(s, channel); if (list.Count > 0) { return(Json(new { reslut = "0", message = "此位置已经存在已开启的广告!" })); } } try { bool flag = service.MobileAdModify(id, s, userid, date); if (flag) { return(Json(new { result = "1", message = "状态修改成功!" })); } else { return(Json(new { result = "0", message = "状态修改失败!" })); } } catch (Exception e) { return(Json(new { result = "0", message = "状态修改失败!" })); } }
public ActionResult AjaxUpdateStatus(string channelNo, string status) { SWfsChannelService service = new SWfsChannelService(); SWfsChannel channel = service.GetChannelInfo(channelNo); channel.Status = Convert.ToInt16(status == "1" ? "0" : "1"); try { service.UpdateStatus(channel); #region 日志信息 SWfsSubjectService channelService = new SWfsSubjectService(); SWfsSubjectOrChannelLog log = new SWfsSubjectOrChannelLog(); log.SubjectOrChannelNo = channelNo; log.TypeValue = 1; //1频道 log.DateOperator = DateTime.Now; log.OperatorContent = (status.Equals("1") ? "关闭频道" : "开启频道"); log.OperatorUserId = PresentationHelper.GetPassport().UserName; log.OperatorActionType = LogActionType.Edit.GetHashCode(); channelService.InsertSubjectOrChannelLog(log); #endregion string str = status == "0" ? "开启成功!" : "关闭成功!"; return(Json(new { result = "1", message = str })); } catch (Exception ex) { return(Json(new { result = "0", message = ex.Message })); } }
//添加商品编辑块内容 public int AddProductRefContent(SWfsProductRef obj) { if (obj.ProductNO == null) { return(0); } obj.CreateDate = DateTime.Now; obj.EditeDate = DateTime.Now; Passport passport = PresentationHelper.GetPassport(); obj.PublishTime = DateTime.Now; obj.EditePeople = (passport != null ? passport.UserName : ""); obj.PublishPeople = ""; obj.ProductTitle = ""; obj.TemplateNO = ""; obj.PublishHTML = ""; if (obj.HTMLCode == null) { obj.HTMLCode = ""; } if (obj.HTMLCodeMobile == null) { obj.HTMLCodeMobile = ""; } return(DapperUtil.Insert <SWfsProductRef>(obj, true)); }
/// <summary> /// ajax操作上新时间 /// </summary> /// <param name="NewArrivalId"></param> /// <param name="BrandNo"></param> /// <param name="NewShelfDate"></param> /// <returns></returns> public ActionResult OperationNewShelf(string NewArrivalId, string BrandNo, string NewShelfDate) { Passport passport = PresentationHelper.GetPassport();//用户 SwfsFlagShipNewArrival arrival = new SwfsFlagShipNewArrival(); NewArrivalId = NewArrivalId == null || NewArrivalId == "" ? "0" : NewArrivalId; SwfsFlagShipNewArrivalProductService service = new SwfsFlagShipNewArrivalProductService(); SwfsFlagShipNewArrival selectarrival = service.SelectBrandNoNewShelfDate(BrandNo, NewShelfDate);//查找某个品牌下的当前上新时间是否有数据 if (selectarrival != null) { return(Json(new { message = "该上新时间已经存在" })); } arrival.UpdateOperateUserId = passport.UserName; arrival.BrandNo = BrandNo; arrival.NewShelfDate = Convert.ToDateTime(NewShelfDate); try { service.OperationNewShelf(arrival, Convert.ToInt32(NewArrivalId), passport.UserName); return(Json(new { message = "操作成功" })); } catch (Exception e) { return(Json(new { message = "操作失败" })); } }
public JsonResult AddPromotionChannel() { if (string.IsNullOrWhiteSpace(Request.Form["name"])) { return(Json(new { rs = "error", msg = "参数错误" })); } string name = Request.Form["name"].Trim(); MarketOptionService service = new MarketOptionService(); SWfsSubjectPromotionChannel model = service.SelectPromotionChannel(name); if (model == null) { model = new SWfsSubjectPromotionChannel { ChannelName = name, CreateDateTime = DateTime.Now, CreateUserId = PresentationHelper.GetPassport().UserName }; try { int id = service.AddPromotionChannel(model); return(Json(new { rs = "ok", id = id, msg = "添加成功" })); } catch (Exception) { return(Json(new { rs = "error", msg = "添加失败" })); } } else { return(Json(new { rs = "error", msg = "添加成功" })); } }
public ActionResult CreateChannel() { SWfsChannelService service = new SWfsChannelService(); string channelName = Request.Params["ChannelName"]; SWfsChannel channel = service.GetChannelByName(channelName); if (channel != null) { return(Json(new { result = "0", message = "频道名称已存在!" })); } CommonService cs = new CommonService(); string channelNo = DateTime.Now.ToString("yyyyMMdd"); string channelId = cs.GetNextCounterId("ChannelNo").ToString("000"); channelNo += channelId.Substring(channelId.Length - 3, 3); string sordNos = Request.Params["SordNo"]; short status = Convert.ToInt16(Request.Params["Status"]); if (!string.IsNullOrEmpty(sordNos)) { SWfsChannelSordRef sordRef = new SWfsChannelSordRef(); string[] sordNoList = sordNos.Split(','); foreach (string sordNo in sordNoList) { sordRef.SordNo = sordNo; sordRef.ChannelNo = channelNo; try { service.InsertChannelSordRef(sordRef); } catch (Exception ex) { return(Json(new { result = "0", message = ex.Message })); } } } channel = new SWfsChannel(); channel.ChannelNo = channelNo; channel.ChannelName = channelName; channel.Status = status; channel.SiteNo = 2; channel.CreateUserId = PresentationHelper.GetPassport().UserName; channel.DateCreate = DateTime.Now; channel.SortNo = 0; channel.DeleteFlag = 0; channel.Description = ""; channel.HtmlContent = ""; channel.BackgroundPic = ""; channel.HolidayMode = 0;//是否开启假日模式(0:未开启,1:开启) try { service.InsertChannel(channel); return(Json(new { result = "1", message = "添加成功!" }, "text/plain", Encoding.UTF8)); } catch (Exception ex) { return(Json(new { result = "0", message = ex.Message }, "text/plain", Encoding.UTF8)); } }
//插入新的咨询关联 public int InsertSWfsQuestAnswerRef(SWfsQuestAnswerRef QAR) { if (UpdateSWfsQuestAnswerOperateUserId(QAR.QuestAnswerId, PresentationHelper.GetPassport().UserName)) { return(DapperUtil.Insert <SWfsQuestAnswerRef>(QAR, false)); } return(-1); }
/// <summary> /// 用于频道页逻辑 /// </summary> /// <param name="recommendBrand"></param> /// <returns></returns> public int InsertSWfsSpChannelRecommendBrandChannel(SWfsSpHomeRecommendBrand recommendBrand) { if (UpdateSWfsSpChannelRecommendBrandChannel(recommendBrand, PresentationHelper.GetPassport().UserName)) { return(DapperUtil.Insert <SWfsSpHomeRecommendBrand>(recommendBrand, true)); } return(-1); }
//删除咨询表 public int DeleteSWfsQuestAnswer(string questAnswerId) { if (DeleteSWfsQuestAnswerRef(questAnswerId) > 0 || GetSWfsSWfsQuestAnswerRefListByQuestAnswerId(questAnswerId).Count() == 0) { UpdateSWfsQuestAnswerOperateUserId(Convert.ToInt32(questAnswerId), PresentationHelper.GetPassport().UserName); return(DapperUtil.Execute("ComBeziWfs_SWfsProductQuestAnswer_DeleteSWfsProductQuestAnswer_Delete", new { QuestAnswerId = questAnswerId })); } return(0); }
//清除历史 public void ClearSortHistory() { Passport passport = PresentationHelper.GetPassport(); if (passport != null) { new SWfsSortHistoryService().ClearHistory(passport.UserName); } }
public void ClearLabelHistory() { Passport passport = PresentationHelper.GetPassport(); if (passport != null) { productLabelService.ClearLabelHistory(passport.UserName); } }
public ActionResult SubjectStatusModify(string subjectNo) { SWfsSubjectService service = new SWfsSubjectService(); SubjectInfo subject = service.GetSubjectInfo(subjectNo); //没有获取到活动信息 if (subject == null) { return(Json(new { result = "0", message = "信息获取错误" })); } string tempStatue = subject.Status == 0 ? "1" : "0"; //如果状态是关闭活动 点击后开启 if (subject.Status == 0) { IList <string> list = service.GetProductListBySubjectNo(subjectNo, "0"); //存在商品 if (list != null && list.Count > 0) { if (string.IsNullOrEmpty(subject.BelongsSubjectPic) || string.IsNullOrEmpty(subject.TitlePic2) || string.IsNullOrEmpty(subject.IPhonePic)) { return(Json(new { result = "0", message = "由于此活动的图片上传不完全,所以不能开启该活动!" })); } if (subject.SubjectPreStartTemplateType != 1 && string.IsNullOrEmpty(subject.BackgroundPic)) { return(Json(new { result = "0", message = "由于此活动的图片上传不完全,所以不能开启该活动!" })); } } else { return(Json(new { result = "0", message = "此活动中没有符合前台网站售卖条件的商品,不能开启!" })); } } try { service.SubjectStatusModify(subjectNo, tempStatue); #region 修改活动状态日志 SWfsSubjectOrChannelLog log = new SWfsSubjectOrChannelLog(); log.SubjectOrChannelNo = subjectNo; log.TypeValue = 0; log.DateOperator = DateTime.Now; log.OperatorContent = "修改活动状态"; log.OperatorUserId = PresentationHelper.GetPassport().UserName; service.InsertSubjectOrChannelLog(log); #endregion return(Json(new { result = "1", message = "活动状态修改成功!" })); } catch (Exception ex) { return(Json(new { result = "0", message = "活动状态修改失败!" })); } }
/// <summary> /// 返回空楼层内容对象 /// </summary> /// <returns></returns> public SwfsFlagShipModule CreateEmptySwfsFlagShipModule() { return(new SwfsFlagShipModule { DataCreate = DateTime.Now, State = 1, OperatorUserId = PresentationHelper.GetPassport().UserName, DataState = 1, ModuleName = "", BrandNo = "", }); }
//添加历史记录 public int AddSearchHistory(SWfsProductLabelSearchHistory obj) { Passport passport = PresentationHelper.GetPassport(); if (passport != null && !string.IsNullOrEmpty(passport.UserName)) { obj.CreateDate = DateTime.Now; obj.SearchUser = passport.UserName; return(DapperUtil.Insert <SWfsProductLabelSearchHistory>(obj, true)); } return(0); }
/// <summary> /// ajax调用的添加上新商品的方法 /// </summary> /// <param name="brandNo"></param> /// <param name="ProductNoStr"></param> /// <returns></returns> public ActionResult AddShelfProduct(string brandNo, string ProductNoStr, string DateShelf) { DateShelf = DateShelf == null || DateShelf == "" ? System.DateTime.Now.ToString("yyyy-MM-dd HH") : DateShelf; ProductNoStr = ProductNoStr.Trim().TrimEnd(','); NewShelfBrandProductService service = new NewShelfBrandProductService(); int WeekDays = (int)Convert.ToDateTime(DateShelf).DayOfWeek; WeekDays = WeekDays == 0 ? 7 : WeekDays; Passport passport = PresentationHelper.GetPassport(); service.AddShelfProduct(brandNo.ToUpper(), ProductNoStr, passport.UserName, 1, Convert.ToDateTime(DateShelf), WeekDays);//还为添加用户ID return(Json(new { message = "添加成功" })); }
//发布产品编辑内容 public int PublishProductContent(int publishID) { if (publishID == 0) { return(0); } Passport passport = PresentationHelper.GetPassport(); return(DapperUtil.Execute("ComBeziWfs_SWfsProductRef_PublishProductRefHtmlCodeByRefID", new { RefID = publishID, PublishTime = DateTime.Now, PublishPeople = (passport != null?passport.UserName:"") })); }
/// <summary> /// 获取楼层模型 /// </summary> /// <returns></returns> public SWfsIndexModule GetEmptySWfsIndexModuleModel() { SWfsIndexModule ClassfiedFloor = new SWfsIndexModule(); DateTime now = DateTime.Now; ClassfiedFloor.Stutas = 1; ClassfiedFloor.UpdateDate = MinTime; ClassfiedFloor.DateCreate = DateTime.Now; ClassfiedFloor.OperateUserId = PresentationHelper.GetPassport().UserName; ClassfiedFloor.ModuleName = ""; ClassfiedFloor.DataState = 1; ClassfiedFloor.UpdateDate = MinTime; ClassfiedFloor.ADShowTypeChangeDate = MinTime; return(ClassfiedFloor); }
/// <summary> /// 获取链接模型 /// </summary> /// <returns></returns> public SWfsIndexModuleLink GetEmptySWfsIndexModuleLinkModel() { SWfsIndexModuleLink link = new SWfsIndexModuleLink(); link.CategoryNo = string.Empty; link.DateCreate = DateTime.Now; link.UpdateDate = MinTime; link.OperateUserId = PresentationHelper.GetPassport().UserName; link.UpdateDate = MinTime; link.UpdateDate = Convert.ToDateTime("1991/02/10 01:01:00"); link.UpdateOperateUserId = PresentationHelper.GetPassport().UserName; link.Stutas = 1; link.DataState = 1; return(link); }
/// <summary> /// 获取图片模型 /// </summary> /// <returns></returns> public SWfsOperationPicture GetEmptySWfsOperationPictureModel() { SWfsOperationPicture pic = new SWfsOperationPicture(); pic.PictureName = ""; pic.LinkAddress = ""; pic.DataState = (short)1; pic.Status = 1; pic.OperatorUserId = PresentationHelper.GetPassport().UserName; pic.DateCreate = DateTime.Now; pic.LinkAddress = ""; pic.PagePositionName = ""; pic.DateBegin = MinTime; pic.DateEnd = MinTime; return(pic); }
/// <summary> /// 保存活动(使用新的活动lxy) /// </summary> /// <param name="activityId"></param> /// <returns></returns> public ActionResult TopicRefCreate(SWfsVActivityTopicsRef obj, string activityId) { if (Request.Form["cb_KeyID"] != null) { obj.ActivityId = Request.Form["activityIds"]; obj.OperatorId = PresentationHelper.GetPassport().UserName; obj.DateCreate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd").Replace("/", "")); string[] arry = Request.Form["cb_KeyID"].Split(','); for (int i = 0; i < arry.Length; i++) { obj.TopicNo = arry[i]; Vcode.TopicsRefCreate(obj); } } return(Content("<script>alert('关联成功'); window.location.href='/Shangpin/VCode/RelatedTopicsListV.html?activityId=" + obj.ActivityId + "'</script>")); }
//获取历史记录 public IEnumerable <SWfsProductSearchHistory> GetSearchHistory(int count) { IEnumerable <SWfsProductSearchHistory> list = new List <SWfsProductSearchHistory>(); Passport passport = PresentationHelper.GetPassport(); if (passport != null) { if (!string.IsNullOrEmpty(passport.UserName)) { //查询历史记录 Dictionary <string, object> dic = new Dictionary <string, object>(); dic.Add("getCount", count); list = DapperUtil.Query <SWfsProductSearchHistory>("ComBeziWfs_SWfsProductSearchHistory_GetProductSearchHistory", dic, new { SearchUser = passport.UserName }); } } return(list); }
//编辑商品推荐内容 public int EditeProductRefContent(SWfsProductRef obj) { if (obj.TemplateNO == null) { obj.TemplateNO = ""; } Passport passport = PresentationHelper.GetPassport(); return(DapperUtil.UpdatePartialColumns <SWfsProductRef>(new { RefID = obj.RefID, EditeDate = DateTime.Now, EditePeople = (passport == null?"":passport.UserName), HTMLCode = obj.HTMLCode, HTMLCodeMobile = obj.HTMLCodeMobile, }) ? 1 : 0); }
/// <summary> /// ajax添加商品 /// </summary> /// <param name="ProductNoStr"></param> /// <param name="NewArrivalId"></param> /// <param name="IsOneRow"></param> /// <returns></returns> public ActionResult AddShelfProduct(string ProductNoStr, string ArrivalId, string IsOneRow) { SwfsFlagShipNewArrivalProductService service = new SwfsFlagShipNewArrivalProductService(); Passport passport = PresentationHelper.GetPassport();//用户 try { service.AddShelfProduct(ProductNoStr, passport.UserName, ArrivalId, IsOneRow); return(Json(new { message = "添加成功" })); } catch (Exception) { return(Json(new { message = "添加失败" })); throw; } }
//把商品加入推荐池 public ActionResult AddProductToAppRecommondAjax() { string productNO = Request.Form["productNo"]; if (string.IsNullOrEmpty(productNO)) { TempData["tip"] = "<script>alert('添加失败')</script>"; return(Redirect("/Shangpin/AppRecommendProductManger/Index?categoryNO=" + Request.QueryString["categoryNO"] + "&ProductNo=" + Request.QueryString["ProductNo"] + "&ProductName=" + Request.QueryString["ProductName"] + "&brandNO=" + Request.QueryString["brandNO"] + "&colorId=" + Request.QueryString["colorId"] + "&shelfType=" + Request.QueryString["shelfType"] + "&ShelfDate=" + Request.QueryString["ShelfDate"] + "&MinPrice=" + Request.QueryString["MinPrice"] + "&MaxPrice=" + Request.QueryString["MaxPrice"] + "&MinStock=" + Request.QueryString["MinStock"] + "&MaxStock=" + Request.QueryString["MaxStock"] + "&MinDiscountRate=" + Request.QueryString["MinDiscountRate"] + "&MaxDiscountRate=" + Request.QueryString["MaxDiscountRate"] + "&hot=" + Request.QueryString["hot"] + "&sevenHot=" + Request.QueryString["sevenHot"])); } SWfsSortHistoryService sshsDal = new SWfsSortHistoryService(); Passport passport = PresentationHelper.GetPassport(); AppRecommendService zhao = new AppRecommendService(); List <AppRecommendProductModle> saveProductList = zhao.GetAppRecommendProductList(); if ((saveProductList.Count + productNO.Split(',').Length) > 50) { int remoteIndex = 0; remoteIndex = (saveProductList.Count + productNO.Split(',').Length) - 50; for (int i = 0; i < saveProductList.Count; i++) { if (i < remoteIndex) { zhao.DelAppRecommendProductById(saveProductList[i].ProductNo); } } } int result = 0; for (int i = 0; i < productNO.Split(',').Length; i++) { AppRecommendProductModle DTO = new AppRecommendProductModle() { ProductNo = productNO.Split(',')[i], Creator = passport.UserName }; result = zhao.AddAppRecommendProduct(DTO); } sshsDal = null; TempData["tip"] = "<script>alert('添加成功')</script>"; return(Redirect("/Shangpin/AppRecommendProductManger/Index?categoryNO=" + Request.QueryString["categoryNO"] + "&ProductNo=" + Request.QueryString["ProductNo"] + "&ProductName=" + Request.QueryString["ProductName"] + "&brandNO=" + Request.QueryString["brandNO"] + "&colorId=" + Request.QueryString["colorId"] + "&shelfType=" + Request.QueryString["shelfType"] + "&ShelfDate=" + Request.QueryString["ShelfDate"] + "&MinPrice=" + Request.QueryString["MinPrice"] + "&MaxPrice=" + Request.QueryString["MaxPrice"] + "&MinStock=" + Request.QueryString["MinStock"] + "&MaxStock=" + Request.QueryString["MaxStock"] + "&MinDiscountRate=" + Request.QueryString["MinDiscountRate"] + "&MaxDiscountRate=" + Request.QueryString["MaxDiscountRate"] + "&hot=" + Request.QueryString["hot"] + "&sevenHot=" + Request.QueryString["sevenHot"])); }
public bool UpdateASWfsProductCommentStatus(int verify, int commentId, int status) { if (status == 0) { //隐藏状态,已经审核通过,某种原因把它隐藏了。所以修改为审核通过显示状态 return(DapperUtil.UpdatePartialColumns <SWfsProductComment>(new { CommentId = commentId, Status = 1 })); } else if (status == 1) { //显示状态,只能隐藏 return(DapperUtil.UpdatePartialColumns <SWfsProductComment>(new { CommentId = commentId, Status = 0 })); } else {//待审核状态:审核通过修改为审核通过并显示状态,如果不通过状态不变(待审核) if (verify == 1) { return(DapperUtil.UpdatePartialColumns <SWfsProductComment>(new { CommentId = commentId, Status = 1 })); } } UpdateSWfsProductCommentOperateUserId(commentId, PresentationHelper.GetPassport().UserName); //return DapperUtil.UpdatePartialColumns<SWfsProductComment>(new { CommentId = commentId, Status = status }); return(false); }
public ActionResult AddNewGoodsListByNewComming() { //要追加的商品编号 string goodsidlist = Request.Form["GoodsNo"].ToString(); //要追加的商品所属的上新编号 string newcommingid = Request.Form["NewCommingId"].ToString(); string[] arr = goodsidlist.Split(','); int sort = 30; int num = 0; for (int i = 0; i < arr.Length - 1; i++) { var arr1 = arr[i].Split('-'); int count = sWfsIndexNewArrivalProductListService.AddSWfsIndexNewArrivalProductListGoods(arr1[0], newcommingid); if (count <= 0) { SWfsIndexNewArrivalProductList sWfsIndexNewArrivalProductList = new SWfsIndexNewArrivalProductList(); sWfsIndexNewArrivalProductList.ProductNo = arr1[0]; sWfsIndexNewArrivalProductList.NewArrivalId = int.Parse(newcommingid); sWfsIndexNewArrivalProductList.SortValue = sort--; //获取当前用户 Passport passport = PresentationHelper.GetPassport(); sWfsIndexNewArrivalProductList.OperateUserId = passport.UserName; num += sWfsIndexNewArrivalProductListService.AddSWfsIndexNewArrivalProductList(sWfsIndexNewArrivalProductList); } } if (num > 0) { EnyimMemcachedClient.Instance.Remove("ComBeziWfs_NewArrivalProductInfo_GetNewArrivalProductInfoByStartDate_getNewArrivalInfo"); return(Content("添加成功!")); } else { return(Content("添加失败!")); } }
public ActionResult TopicRefDeleById(string SubjectNo, string ActivityId, int Status) { int count = 0; string mess = string.Empty; if (Status > 0) { //是否已经关联,如果关联不执行添加方法,直接count=1成功 SWfsVActivityTopicsRef obj = Vcode.SelectSingleBySubjectNoRef(SubjectNo, ActivityId); if (obj == null) { obj = new SWfsVActivityTopicsRef(); obj.ActivityId = ActivityId; obj.OperatorId = PresentationHelper.GetPassport().UserName; obj.DateCreate = DateTime.Now; obj.TopicNo = SubjectNo; count = Vcode.TopicsRefCreate(obj); } else { count = 1; } mess = "关联成功"; } else { count = Vcode.TopicRefDelete(SubjectNo, ActivityId); mess = "取消关联"; } if (count > 0) { return(Json(new { result = "1", message = mess })); } else { return(Json(new { result = "0", message = "修改失败!" })); } }
public ActionResult SignIn(string flag = "", string msg = "") { Passport model = PresentationHelper.GetPassport(); if (model.IsAuthenticate()) { //return Redirect("/Login/Phoneverification"); return(Redirect("/Shangpin/Brand/AIIBrandsSelect")); } ViewBag.Flag = flag; ViewBag.Msg = msg; ViewBag.Checked = "0"; ViewBag.UserName = string.Empty; string userName = PresentationHelper.GetCookie("RemberOCSUser"); if (!string.IsNullOrEmpty(userName)) { ViewBag.Checked = "1"; ViewBag.UserName = userName; } return(View()); }