示例#1
0
        /// <summary>
        /// 新增抽奖次数配置
        /// </summary>
        /// <param name="LotteryNumber"></param>
        /// <returns></returns>
        public bool UpdateWebAwardLotteryNumber(WebLotteryNumberDetail LotteryNumber)
        {
            var req = Mapper.Map <WebLotteryNumberDetail, UpdateWebAwardLotteryNumberRequest>(LotteryNumber);
            var res = MKMSClient.Send <UpdateWebAwardLotteryNumberResponse>(req);

            return(res.DoFlag);
        }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id">次数配置主键</param>
        /// /// <param name="tagsId">用户标签组主键</param>
        /// <param name="tagsName">用户标签组名</param>
        /// <returns></returns>
        public ActionResult WebLotteryNumberDetail(int?id, int?tagsId, string tagsName)
        {
            var result = new WebLotteryNumberDetail();

            result.IntNumId = id;

            if (result.IntNumId > 0)
            {
                result = WebAwardClient.Instance.QueryWebAwardLotteryNumberById(result);
            }
            ViewBag.TagsId      = tagsId;
            ViewBag.vchTagsName = tagsName;

            return(View(result));
        }
示例#3
0
        /// <summary>
        /// 根据抽奖次数配置Id查询单条信息
        /// </summary>
        /// <param name="lotteryNumber"></param>
        /// <returns></returns>
        public WebLotteryNumberDetail QueryWebAwardLotteryNumberById(WebLotteryNumberDetail lotteryNumber)
        {
            var result = new WebLotteryNumberDetail();
            var req    = new QueryWebAwardLotteryNumberByIdRequest();

            req.IntNumId = lotteryNumber.IntNumId;

            var res = MKMSClient.Send <QueryWebAwardLotteryNumberByIdResponse>(req);

            if (res.DoFlag)
            {
                result = Mapper.Map <Web_Award_LotteryNumberExt, WebLotteryNumberDetail>(res.LotteryNumberDos);
            }
            return(result);
        }
示例#4
0
        public JsonResult SaveWebLotteryNumber(WebLotteryNumberDetail lotteryNumber)
        {
            var result = new BaseResponse();

            try
            {
                if (lotteryNumber.IntNumId > 0)
                {
                    //修改
                    lotteryNumber.IntUpdateUserId = UserInfo.UserSysNo;
                    lotteryNumber.DtUpdateTime    = DateTime.Now;
                    var res = WebAwardClient.Instance.UpdateWebAwardLotteryNumber(lotteryNumber);
                    if (res)
                    {
                        result.DoFlag = true;
                    }
                    else
                    {
                        result.DoResult = "修改失败,请稍后重试... ...";
                    }
                }
                else
                {
                    //新增
                    lotteryNumber.DtCreateTime    = DateTime.Now;
                    lotteryNumber.IntCreateUserId = UserInfo.UserSysNo;
                    lotteryNumber.IntStatus       = 1;
                    var res = WebAwardClient.Instance.AddWebAwardLotteryNumber(lotteryNumber);
                    if (res)
                    {
                        result.DoFlag = true;
                    }
                    else
                    {
                        result.DoResult = "新增失败,请稍后重试... ...";
                    }
                }
            }
            catch (Exception ex)
            {
                result.DoResult = "修改异常,请稍后重试... ...";
            }
            return(Json(result, JsonRequestBehavior.AllowGet));
        }