Пример #1
0
        public ActionResult Apply(ProjectApplyModel model)
        {
            var shopProjectList = _iShopProjectService.GetById(model.ProjectId);
            var jsonResult      = new JsonResult();

            if (shopProjectList != null)
            {
                var applyActivity = new ApplyActivity
                {
                    Name            = model.ApplyName,
                    Phone           = model.ApplyPhone,
                    Type            = model.GroupType,
                    GrouppurchaseId = model.GrouppurchaseId,
                    UpdateDate      = DateTime.Now,
                    Status          = 1,
                    Grouppurchase   = shopProjectList.Grouppurchases.OrderBy(m => m.Addtime).FirstOrDefault(m => (m.Status == 0 && m.Begintime <DateTime.Now && m.Endtime> DateTime.Now))
                };
                var apply = this._iApplyActiviteService.GetByPhone(model.ApplyPhone);
                if (apply.Count() == 0)
                {
                    _iApplyActiviteService.Insert(applyActivity);
                    jsonResult.Data = "true";
                }
                else
                {
                    jsonResult.Data = "0";
                }
            }
            jsonResult.JsonRequestBehavior = JsonRequestBehavior.DenyGet;
            return(jsonResult);
        }
Пример #2
0
        /// <summary>
        /// 获取我管理的所有社团的活动申请结果
        /// </summary>
        /// <returns></returns>
        public ApplyActivity getInfo()
        {
            int userID   = Common.User.GetUserID(Session["Username"].ToString());
            var clubList = new BLL.clubManager().GetModels(p => p.userID == userID);
            var info     = new ApplyActivity();

            info.Activities = new List <string>();
            foreach (var item in clubList)
            {
                //获取社团名称
                info.Activities.Add(Common.Club.getClubName(item.cludID));
            }
            return(info);
        }
Пример #3
0
        protected override void InitialPipes()
        {
            ApplyActivity
            .Append(AuditActivity)

            .Append(PayActivity)
            .Append(PayGateway);

            // 网关分支 - 发送邮件分支
            PayGateway
            .Append(EmailConnector)
            .Append(EmailActivity)
            .Append(_endNode);

            // 网关分支- 入库分支
            PayGateway
            .Append(StockConnector)
            .Append(StockActivity)
            .Append(_endNode);
        }