public JsonResult UpdateImageAd(long id, string pic, string url)
        {
            ImageAdInfo imageAd = this._iSlideAdsService.GetImageAd(0L, id);

            if (!string.IsNullOrWhiteSpace(pic) && !imageAd.ImageUrl.Equals(pic))
            {
                if (pic.Contains("/temp/"))
                {
                    string path = pic.Substring(pic.LastIndexOf("/temp"));
                    string str2 = "/Storage/Plat/ImageAd/";
                    pic = Path.Combine(str2, Path.GetFileName(path));
                    HimallIO.CopyFile(path, pic, true);
                }
                else if (pic.Contains("/Storage/"))
                {
                    pic = pic.Substring(pic.LastIndexOf("/Storage"));
                }
            }
            ImageAdInfo model = new ImageAdInfo
            {
                ShopId   = 0L,
                Url      = url,
                ImageUrl = pic,
                Id       = id
            };

            this._iSlideAdsService.UpdateImageAd(model);
            BaseController.Result data = new BaseController.Result
            {
                success = true
            };
            return(base.Json(data));
        }
 public JsonResult UpdateName(string name, long id, int depth)
 {
     try
     {
         this._iCategoryService.UpdateCategoryName(id, name);
         CategoryInfo temp = new CategoryInfo
         {
             Id    = id,
             Name  = name,
             Depth = depth
         };
         Task.Factory.StartNew(delegate
         {
             this._iSearchProductService.UpdateCategory(temp);
         });
     }
     catch (Exception exception)
     {
         BaseController.Result result = new BaseController.Result
         {
             success = false,
             msg     = exception.Message
         };
         return(base.Json(result, JsonRequestBehavior.AllowGet));
     }
     BaseController.Result data = new BaseController.Result
     {
         success = true
     };
     return(base.Json(data, JsonRequestBehavior.AllowGet));
 }
示例#3
0
        public JsonResult Delete(long id)
        {
            JsonResult jsonResult;

            //   this._iPrivilegesService.GetPlatformRole(id);
            if (this._iManagerService.GetPlatformManagerByRoleId(id).Count <ManagerInfo>() <= 0)
            {
                this._iPrivilegesService.DeletePlatformRole(id);
                BaseController.Result result = new BaseController.Result()
                {
                    success = true,
                    msg     = "删除成功!"
                };
                jsonResult = base.Json(result);
            }
            else
            {
                BaseController.Result result1 = new BaseController.Result()
                {
                    success = false,
                    msg     = "该角色下还有管理员,不允许删除!"
                };
                jsonResult = base.Json(result1);
            }
            return(jsonResult);
        }
示例#4
0
 public JsonResult DeleteSlideImage(string id)
 {
     BaseController.Result data = new BaseController.Result();
     this._iSlideAdsService.DeleteSlidAd(0L, Convert.ToInt64(id));
     data.success = true;
     return(base.Json(data));
 }
示例#5
0
        /// <summary>
        /// 添加底部菜单
        /// </summary>
        /// <param name="id"></param>
        /// <param name="description"></param>
        /// <param name="imageUrl"></param>
        /// <param name="url"></param>
        /// <returns></returns>
        public JsonResult AddFootMenu(string id, string description, string imageUrl, string url)
        {
            BaseController.Result result   = new BaseController.Result();
            MobileFootMenuInfo    footmenu = new MobileFootMenuInfo();
            long num = 0L;

            if (!string.IsNullOrEmpty(id))
            {
                num = Convert.ToInt64(id);
            }
            footmenu.Id       = Convert.ToInt64(num);
            footmenu.MenuIcon = imageUrl;
            footmenu.Url      = url.ToLower();
            footmenu.Name     = HttpUtility.UrlDecode(description);
            if (footmenu.Id > 0L)
            {
                this._iWeixinMenuService.UpdateMobileFootMenu(footmenu);
            }
            else
            {
                this._iWeixinMenuService.AddMobileFootMenu(footmenu);
            }
            result.success = true;
            if (result.success)
            {
                return(this.Json((object)new
                {
                    status = "0"
                }));
            }
            return(this.Json((object)new
            {
                status = "1"
            }));
        }
示例#6
0
 public JsonResult DeleteSlideImage(string id)
 {
     BaseController.Result result = new BaseController.Result();
     this._iSlideAdsService.DeleteSlidAd(0L, Convert.ToInt64(id));
     result.success = true;
     return(this.Json((object)result));
 }
示例#7
0
 public JsonResult RequestToWeixin()
 {
     BaseController.Result result = new BaseController.Result();
     this._iWeixinMenuService.ConsistentToWeixin(this.CurrentManager.ShopId);
     result.success = true;
     return(this.Json((object)result));
 }
示例#8
0
        public JsonResult ConfirmOrder(long orderId)
        {
            int num = OrderApplication.ConfirmOrder(orderId, base.CurrentUser.Id, base.CurrentUser.UserName);

            BaseController.Result data = new BaseController.Result
            {
                status = num
            };
            switch (num)
            {
            case 0:
                data.success = true;
                data.msg     = "操作成功";
                break;

            case 1:
                data.success = false;
                data.msg     = "该预约单已经确认过!";
                break;

            case 2:
                data.success = false;
                data.msg     = "预约单状态发生改变,请重新刷页面操作!";
                break;
            }
            return(base.Json(data));
        }
示例#9
0
 public JsonResult DeleteMenu(int menuId)
 {
     BaseController.Result result = new BaseController.Result();
     this._iWeixinMenuService.DeleteMenu((long)menuId);
     result.success = true;
     return(this.Json((object)result));
 }
示例#10
0
        public JsonResult APPGuidePages(List <string> pics)
        {
            List <Himall.DTO.SlideAdModel> list = new List <Himall.DTO.SlideAdModel>();

            foreach (string str in pics)
            {
                if (!string.IsNullOrWhiteSpace(str))
                {
                    Himall.DTO.SlideAdModel item = new Himall.DTO.SlideAdModel
                    {
                        ImageUrl = str
                    };
                    list.Add(item);
                }
            }
            if (list.Count == 0)
            {
                throw new HimallException("至少上传一张引导页图");
            }
            SlideApplication.AddGuidePages(list);
            BaseController.Result data = new BaseController.Result
            {
                success = true
            };
            return(base.Json(data));
        }
示例#11
0
        public JsonResult UpdateAgreement(int agreementType, string agreementContent)
        {
            JsonResult jsonResult;
            ISystemAgreementService systemAgreementService = this._iSystemAgreementService;
            AgreementInfo           agreement = systemAgreementService.GetAgreement((AgreementInfo.AgreementTypes)agreementType);

            agreement.AgreementType    = agreementType;
            agreement.AgreementContent = agreementContent;
            if (!systemAgreementService.UpdateAgreement(agreement))
            {
                BaseController.Result result = new BaseController.Result()
                {
                    success = false,
                    msg     = "更新协议失败!"
                };
                jsonResult = base.Json(result);
            }
            else
            {
                BaseController.Result result1 = new BaseController.Result()
                {
                    success = true,
                    msg     = "更新协议成功!"
                };
                jsonResult = base.Json(result1);
            }
            return(jsonResult);
        }
示例#12
0
 /// <summary>
 /// 删除自动回复
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 public JsonResult DelAutoReplay(AutoReplyInfo item)
 {
     BaseController.Result result = new BaseController.Result();
     WeixinAutoReplyApplication.DeleteAutoReply(item);
     result.success = true;
     result.msg     = "规则删除成功!";
     return(this.Json((object)result));
 }
示例#13
0
        public JsonResult GetAutoReplayById(int Id)
        {
            BaseController.Result result        = new BaseController.Result();
            AutoReplyInfo         autoReplyById = WeixinAutoReplyApplication.GetAutoReplyById(Id);

            result.success = true;
            result.Data    = (object)autoReplyById;
            return(this.Json((object)result));
        }
示例#14
0
 public JsonResult NSBIconChangeSequence(int oriRowNumber, int newRowNumber)
 {
     this._iSlideAdsService.UpdateWeixinSlideSequence(0L, (long)oriRowNumber, (long)newRowNumber, SlideAdInfo.SlideAdType.NearShopBranchIcon);
     BaseController.Result data = new BaseController.Result
     {
         success = true
     };
     return(base.Json(data));
 }
示例#15
0
        public JsonResult UpdateOrder(long order, long id)
        {
            this._iCategoryService.UpdateCategoryDisplaySequence(id, order);
            Result data = new BaseController.Result
            {
                success = true
            };

            return(base.Json(data, JsonRequestBehavior.AllowGet));
        }
示例#16
0
 public JsonResult Delete(long id)
 {
     this._iManagerService.DeletePlatformManager(id);
     BaseController.Result result = new BaseController.Result()
     {
         success = true,
         msg     = "删除成功!"
     };
     return(base.Json(result));
 }
示例#17
0
        /// <summary>
        /// 管理页面修改分成
        /// </summary>
        /// <param name="commis"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        public JsonResult UpdateCommis(decimal commis, long id)
        {
            this._iCategoryService.UpdateCategoryCommis(id, commis);
            Result data = new BaseController.Result
            {
                success = true
            };

            return(base.Json(data, JsonRequestBehavior.AllowGet));
        }
示例#18
0
 public JsonResult Audit(int id)
 {
     this._iBrandService.AuditBrand((long)id, ShopBrandApplysInfo.BrandAuditStatus.Audited);
     BaseController.Result result = new BaseController.Result()
     {
         success = true,
         msg     = "审核成功!"
     };
     return(base.Json(result));
 }
示例#19
0
 public JsonResult UnLock(long id)
 {
     this._iMemberService.UnLockMember(id);
     BaseController.Result result = new BaseController.Result()
     {
         success = true,
         msg     = "解冻成功!"
     };
     return(base.Json(result));
 }
示例#20
0
 public JsonResult DeleteApply(int id)
 {
     this._iBrandService.DeleteApply(id);
     BaseController.Result result = new BaseController.Result()
     {
         success = true,
         msg     = "删除成功!"
     };
     return(base.Json(result));
 }
示例#21
0
 public JsonResult DeleteInvoiceTitle(long id)
 {
     OrderApplication.DeleteInvoiceTitle(id, base.CurrentUser.Id);
     BaseController.Result data = new BaseController.Result
     {
         success = true,
         msg     = "删除发票成功"
     };
     return(base.Json(data));
 }
示例#22
0
 public JsonResult ChangePassWord(long id, string password)
 {
     this._iMemberService.ChangePassWord(id, password);
     BaseController.Result result = new BaseController.Result()
     {
         success = true,
         msg     = "修改成功!"
     };
     return(base.Json(result));
 }
示例#23
0
        public JsonResult ResetShopBranchRecommend(long id)
        {
            bool flag = ShopBranchApplication.ResetShopBranchRecommend(id);

            BaseController.Result data = new BaseController.Result
            {
                success = flag,
                msg     = flag ? "" : "未知错误,请重试"
            };
            return(base.Json(data, JsonRequestBehavior.AllowGet));
        }
示例#24
0
        public JsonResult RecommendChangeSequence(long oriShopBranchId, long newShopBranchId)
        {
            bool flag = ShopBranchApplication.RecommendChangeSequence(oriShopBranchId, newShopBranchId);

            BaseController.Result data = new BaseController.Result
            {
                success = flag,
                msg     = flag ? "" : "未知错误,请重新排序"
            };
            return(base.Json(data, JsonRequestBehavior.AllowGet));
        }
示例#25
0
 public ActionResult Edit(ShopBranch shopBranch)
 {
     try
     {
         if (!string.Equals(shopBranch.PasswordOne, shopBranch.PasswordTwo))
         {
             throw new HimallException("两次密码输入不一致!");
         }
         if (shopBranch.ShopBranchName.Length > 15)
         {
             throw new HimallException("门店名称不能超过15个字!");
         }
         if (shopBranch.AddressDetail.Length > 50)
         {
             throw new HimallException("详细地址不能超过50个字!");
         }
         if ((shopBranch.Latitude <= 0f) || (shopBranch.Longitude <= 0f))
         {
             throw new HimallException("请搜索地址地图定位!");
         }
         shopBranch.ShopId = base.CurrentSellerManager.ShopId;
         ShopBranch shopBranchById = ShopBranchApplication.GetShopBranchById(shopBranch.Id);
         if ((shopBranchById != null) && (shopBranchById.ShopId != shopBranch.ShopId))
         {
             throw new HimallException("不能修改其他商家的门店!");
         }
         try
         {
             string[] strs      = new string[] { shopBranch.Id.ToString() };
             string[] strArray2 = (shopBranch.ShopBranchTagId == null) ? new string[0] : shopBranch.ShopBranchTagId.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
             ShopBranchApplication.SetShopBrandTagInfos(this.convertLongs(strs), this.convertLongs(strArray2));
         }
         catch
         {
         }
         ShopBranchApplication.UpdateShopBranch(shopBranch);
     }
     catch (Exception exception)
     {
         BaseController.Result result = new BaseController.Result
         {
             success = false,
             msg     = exception.Message
         };
         return(base.Json(result));
     }
     BaseController.Result data = new BaseController.Result
     {
         success = true
     };
     return(base.Json(data));
 }
示例#26
0
 public JsonResult BatchDeleteCategory(string Ids)
 {
     foreach (string str in Ids.Split(new char[] { '|' }))
     {
         int num;
         if (!string.IsNullOrWhiteSpace(str) && int.TryParse(str, out num))
         {
             CategoryApplication.DeleteCategory((long)num);
         }
     }
     BaseController.Result data = new BaseController.Result
     {
         success = true
     };
     return(base.Json(data, JsonRequestBehavior.AllowGet));
 }
示例#27
0
        public JsonResult AddMenu(string title, string url, string parentId, int urlType)
        {
            short  num = !(parentId == "0") ? (short)2 : (short)1;
            string str = CurrentUrlHelper.CurrentUrlNoPort();

            switch (urlType)
            {
            case 1:
                url = str + "/m-" + PlatformType.WeiXin.ToString() + "/";
                break;

            case 2:
                url = str + "/m-" + PlatformType.WeiXin.ToString() + "/vshop";
                break;

            case 3:
                url = str + "/m-" + PlatformType.WeiXin.ToString() + "/category/Index";
                break;

            case 4:
                url = str + "/m-" + PlatformType.WeiXin.ToString() + "/member/center";
                break;

            case 5:
                url = str + "/m-" + PlatformType.WeiXin.ToString() + "/cart/cart";
                break;
            }
            if (!string.IsNullOrEmpty(url) && (!url.ToLower().Contains("http://") && !url.ToLower().Contains("https://")))
            {
                throw new HimallException("链接必须以http://开头");
            }
            BaseController.Result result = new BaseController.Result();
            this._iWeixinMenuService.AddMenu(new MenuInfo()
            {
                Title      = title,
                Url        = url,
                ParentId   = Convert.ToInt64(parentId),
                Platform   = PlatformType.WeiXin,
                Depth      = num,
                ShopId     = this.CurrentManager.ShopId,
                FullIdPath = "1",
                Sequence   = (short)1,
                UrlType    = new MenuInfo.UrlTypes?((MenuInfo.UrlTypes)urlType)
            });
            result.success = true;
            return(this.Json((object)result));
        }
示例#28
0
        /// <summary>
        /// 添加用户
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public JsonResult Add(ManagerInfoModel model)
        {
            ManagerInfo managerInfo = new ManagerInfo()
            {
                UserName = model.UserName,
                Password = model.Password,
                RoleId   = model.RoleId
            };

            this._iManagerService.AddPlatformManager(managerInfo);
            BaseController.Result result = new BaseController.Result()
            {
                success = true,
                msg     = "添加成功!"
            };
            return(base.Json(result));
        }
示例#29
0
 public JsonResult CanJoin(long aid, long gpid)
 {
     BaseController.Result data = new BaseController.Result
     {
         success = false,
         msg     = "不可重复参团"
     };
     if (FightGroupApplication.CanJoinGroup(aid, gpid, base.CurrentUser.Id))
     {
         data = new BaseController.Result
         {
             success = true,
             msg     = "yes"
         };
     }
     return(base.Json(data));
 }
示例#30
0
        public JsonResult BatchLock(string ids)
        {
            string[]    strArrays = ids.Split(new char[] { ',' });
            List <long> nums      = new List <long>();

            string[] strArrays1 = strArrays;
            for (int i = 0; i < (int)strArrays1.Length; i++)
            {
                nums.Add(Convert.ToInt64(strArrays1[i]));
            }
            this._iMemberService.BatchLock(nums.ToArray());
            BaseController.Result result = new BaseController.Result()
            {
                success = true,
                msg     = "批量锁定成功!"
            };
            return(base.Json(result));
        }