コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                autoId = Request["AutoId"];
                if (!string.IsNullOrEmpty(autoId))
                {
                    reviewInfo = bll.Get <BLLJIMP.Model.ReviewInfo>(string.Format(" AutoId={0}", autoId));
                    if (reviewInfo != null)
                    {
                        reviewInfo.Pv++;
                        bll.Update(reviewInfo);
                    }
                }

                ForwardingRecord record = bll.Get <BLLJIMP.Model.ForwardingRecord>(string.Format(" FUserID='{0}' AND RUserID='{1}' AND WebsiteOwner='{2}' AND TypeName='话题赞'", bll.GetCurrentUserInfo().UserID, autoId, bll.WebsiteOwner));
                if (record != null)
                {
                    isPraise = true;
                }
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
                Response.End();
            }
        }
コード例 #2
0
ファイル: ExamRecordDetail.aspx.cs プロジェクト: uvbs/mmp
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!bll.IsLogin)
            {
                Response.Write("请用微信打开");
                Response.End();
                return;
            }
            string id = Request["id"];

            currUserInfo = bllUser.GetUserInfo(Request["uid"], bll.WebsiteOwner);
            record       = bll.Get <QuestionnaireRecord>(string.Format("UserId='{0}' And QuestionnaireID={1}", currUserInfo.UserID, id));
            if (record != null)
            {
                isSubmit = true;
            }

            if (string.IsNullOrEmpty(id))
            {
                Response.Write("无参数");
                Response.End();
                return;
            }

            QuestionnaireModel = bll.Get <BLLJIMP.Model.Questionnaire>(string.Format("QuestionnaireID={0}", id));
            if (QuestionnaireModel == null)
            {
                Response.Write("试卷不存在");
                Response.End();
                return;
            }
        }
コード例 #3
0
 /// <summary>
 /// 获取五伴会详情
 /// </summary>
 /// <param name="AutoId"></param>
 private void GetPartnerInfo(string AutoId)
 {
     PInfo = bll.Get <BLLJIMP.Model.WBHPartnerInfo>(string.Format(" WebsiteOwner='{0}' AND AutoId='{1}'", bll.WebsiteOwner, AutoId));
     if (PInfo != null)
     {
         GetPartnerStr(PInfo);
         PInfo.PartnerPv++;
         bll.Update(PInfo);
     }
 }
コード例 #4
0
 private BLLJIMP.Model.JuActivityInfo GetActivity(string id)
 {
     model = bll.Get <BLLJIMP.Model.JuActivityInfo>(string.Format(" JuActivityID='{0}'", id));
     if (model != null)
     {
         if (model.ActivityEndDate != null)
         {
             if (DateTime.Now >= (DateTime)model.ActivityEndDate)
             {
                 model.IsHide = 1;
             }
         }
         model.PV = model.PV + 1;
         bll.Update(model);
         txtTitle.Text = model.ActivityName;
         txtStart.Text = model.IsHide == 0 ? "进行中" : "已结束";
         if (model.IsHide == -1)
         {
             txtStart.Text = "待开始";
         }
         if ((model.MaxSignUpTotalCount > 0) && (model.SignUpTotalCount >= model.MaxSignUpTotalCount) && (model.IsHide == 0))
         {
             txtStart.Text = "已满员";
         }
         classStr = model.IsHide == 0 ? "listbox" : "listbox partyover";
         if (model.IsHide == -1)
         {
             classStr = "listbox";
         }
         if (model.MaxSignUpTotalCount > 0 && (model.SignUpTotalCount >= model.MaxSignUpTotalCount))
         {
             classStr = "listbox partyfull";
         }
         txtTime.Text    = model.ActivityStartDate.ToString();
         txtAddress.Text = model.ActivityAddress;
         if ((!string.IsNullOrEmpty(model.CategoryId)) && (!model.CategoryId.Equals("0")))
         {
             txtType.Text = bll.Get <BLLJIMP.Model.ArticleCategory>(string.Format(" AutoID={0}", model.CategoryId)).CategoryName;
         }
         txtContent.Text          = model.ActivityDescription;
         txtNum.Text              = model.SignUpTotalCount.ToString();
         txtActivityIntegral.Text = model.ActivityIntegral.ToString();
         if (bll.GetCount <ActivityDataInfo>(string.Format("ActivityID={0} And WeixinOpenID='{1}' And IsDelete=0 ", model.SignUpActivityID, UserInfo.WXOpenId)) > 0)
         {
             IsSubmit = true;
         }
     }
     return(model);
 }
コード例 #5
0
        /// <summary>
        /// 获取文章评论信息
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string GetArticleReviewlist(HttpContext context)
        {
            string           id        = context.Request["articleid"];
            int              pageIndex = int.Parse(context.Request["pageindex"]);
            int              pageSize  = int.Parse(context.Request["pagesize"]);
            ArticleReviewApi apiResult = new ArticleReviewApi();
            StringBuilder    sbWhere   = new StringBuilder();

            sbWhere.AppendFormat(" ReviewID={0}", id);
            apiResult.totalcount = bll.GetCount <ReplyReviewInfo>(sbWhere.ToString());
            List <ReplyReviewInfo> data       = bll.GetLit <BLLJIMP.Model.ReplyReviewInfo>(pageSize, pageIndex, sbWhere.ToString(), " AutoId desc");
            List <ArticleReview>   jsonResult = new List <ArticleReview>();

            foreach (var item in data)
            {
                ArticleReview review = new ArticleReview();
                //目标评论内容
                if (item.PraentId > 0)
                {
                    var targetReply = bll.Get <ReplyReviewInfo>(string.Format("AutoId={0}", item.PraentId)); if (targetReply != null)
                    {
                        review.reply = new ArticleReplyReview();
                        review.reply.reviewcontent = targetReply.ReplyContent;
                        review.reply.nickname      = targetReply.UserName;
                    }
                }

                //目标评论内容
                var userInfo = bllUser.GetUserInfo(item.UserId);
                if (userInfo != null)
                {
                    review.headimg = userInfo.WXHeadimgurlLocal;
                }
                review.id            = item.AutoId;
                review.nickname      = item.UserName;
                review.time          = bll.GetTimeStamp(item.InsertDate);
                review.reviewcontent = item.ReplyContent;
                if ((bll.IsLogin) && (item.UserId.Equals(currentUserInfo.UserID)))
                {
                    review.deleteflag = true;
                }


                jsonResult.Add(review);
            }
            apiResult.list = jsonResult;
            return(Common.JSONHelper.ObjectToJson(apiResult));
        }
コード例 #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(Request["id"]))
     {
         Response.Write("无参数");
         Response.End();
         return;
     }
     model = bll.Get <WBBaseInfo>(string.Format("AutoID={0}", Request["id"]));
     if (model == null)
     {
         Response.Write("基地不存在");
         Response.End();
         return;
     }
     if (model.IsDisable.Equals(1))
     {
         Response.Write("此基地已经禁用,暂时不能查看");
         Response.End();
         return;
     }
     if (DataLoadTool.CheckWanBangLogin())
     {
         IsLogin = true;
         if (bll.GetCount <WBAttentionInfo>(string.Format("UserId='{0}' And AttentionAutoID={1} And AttentionType={2}", HttpContext.Current.Session[SessionKey.WanBangUserID].ToString(), model.AutoID, 0)) > 0)
         {
             IsAttention = true;
         }
     }
 }
コード例 #7
0
        /// <summary>
        /// 获取当前活动所有转发信息
        /// </summary>
        /// <returns></returns>
        private string GetForwarInfos(HttpContext context)
        {
            int totalCount;
            List <BLLJIMP.Model.MonitorLinkInfo> data;
            int    pageIndex  = Convert.ToInt32(context.Request["page"]);
            int    pageSize   = Convert.ToInt32(context.Request["rows"]);
            string activityId = context.Request["ActivityId"];
            string mid        = context.Request["Mid"];
            string sort       = context.Request["sort"];
            string order      = context.Request["order"];

            System.Text.StringBuilder sbWhere = new StringBuilder(string.Format(" MonitorPlanID='{0}' ", mid));
            string orderBy = "";

            switch (sort)
            {
            case "OpenCount":
                orderBy = " OpenCount " + order;
                break;

            case "ActivitySignUpCount":
                orderBy = " ActivitySignUpCount " + order;
                break;

            case "ippv":
                orderBy = " OpenCount " + order;
                break;

            case "UV":
                orderBy = "  UV " + order;
                break;

            case "PowderCount":
                orderBy = " PowderCount " + order;
                break;

            case "AnswerCount":
                orderBy = " AnswerCount " + order;
                break;

            default:
                orderBy = "  InsertDate DESC ";
                break;
            }
            totalCount = this.bllJuactivity.GetCount <BLLJIMP.Model.MonitorLinkInfo>(sbWhere.ToString());
            data       = this.bllJuactivity.GetLit <BLLJIMP.Model.MonitorLinkInfo>(pageSize, pageIndex, sbWhere.ToString(), orderBy);

            JuActivityInfo juActivityModel = bll.Get <JuActivityInfo>(string.Format(" WebsiteOwner='{0}' AND MonitorPlanID={1} ", bll.WebsiteOwner, mid));

            foreach (var item in data)
            {
                item.JuActivityID = juActivityModel != null ? juActivityModel.JuActivityID : 0;
            }
            return(Common.JSONHelper.ObjectToJson(
                       new
            {
                total = totalCount,
                rows = data
            }));
        }
コード例 #8
0
        public void ProcessRequest(HttpContext context)
        {
            string typeId = context.Request["type_id"];

            if (string.IsNullOrEmpty(typeId))
            {
                apiResp.code = 1;
                apiResp.msg  = "type_id 为必填项,请检查";
                context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(apiResp));
                return;
            }
            ZentCloud.BLLJIMP.Model.TypeInfo model = bll.Get <ZentCloud.BLLJIMP.Model.TypeInfo>(string.Format(" WebSiteOwner='{0}' AND TypeId={1} ", bll.WebsiteOwner, typeId));
            if (model == null)
            {
                apiResp.code = 1;
                apiResp.msg  = "没有找到信息";
                context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(apiResp));
                return;
            }

            apiResp.status = true;
            apiResp.msg    = "ok";
            apiResp.result = new
            {
                type_id   = model.TypeId,
                type_name = model.TypeName
            };



            context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(apiResp));
            return;
        }
コード例 #9
0
ファイル: SignUp.aspx.cs プロジェクト: uvbs/mmp
        private void GetPageActionType()
        {
            //查询是否已经提交资料正在审核中

            string activityId = Common.ConfigHelper.GetConfigString("HfSignUpActivityID");
            string openId     = currUserInfo.WXOpenId;

            //if (DataLoadTool.currIsHFVipUser())
            //{
            //    PageActionType = 2;
            //    return;
            //}

            //if (DataLoadTool.currIsHFTeacher())
            //{
            //    PageActionType = 3;
            //    return;
            //}

            if (bll.Get <BLLJIMP.Model.ActivityDataInfo>(string.Format(" ActivityID = '{0}' and WeixinOpenID = '{1}' and IsDelete = 0 ", activityId, openId)) != null)
            {
                PageActionType = 1;
                return;
            }
        }
コード例 #10
0
ファイル: Get.ashx.cs プロジェクト: uvbs/mmp
        public void ProcessRequest(HttpContext context)
        {
            string componentId = context.Request["component_id"];

            if (string.IsNullOrEmpty(componentId))
            {
                apiResp.msg  = "component_id 为必填项,请检查";
                apiResp.code = (int)BLLJIMP.Enums.APIErrCode.IsNotFound;
                bll.ContextResponse(context, apiResp);
                return;
            }
            BLLJIMP.Model.Component model = bll.Get <BLLJIMP.Model.Component>(string.Format(" WebsiteOwner='{0}' AND AutoId={1}", bll.WebsiteOwner, componentId));
            if (model == null)
            {
                apiResp.msg  = "没有找到组件";
                apiResp.code = (int)BLLJIMP.Enums.APIErrCode.IsNotFound;
                bll.ContextResponse(context, apiResp);
                return;
            }
            apiResp.status = true;
            apiResp.result = new
            {
                component_id        = model.AutoId,
                component_key       = model.ComponentKey,
                component_name      = model.ComponentName,
                component_model_id  = model.ComponentModelId,
                child_component_ids = model.ChildComponentIds,
                component_config    = model.ComponentConfig,
                decription          = model.Decription,
                is_oauth            = model.IsWXSeniorOAuth,
                access_level        = model.AccessLevel
            };
            bll.ContextResponse(context, apiResp);
        }
コード例 #11
0
        public void ProcessRequest(HttpContext context)
        {
            string componentId = context.Request["component_id"];

            if (string.IsNullOrEmpty(componentId))
            {
                apiResp.msg  = "component_id 为必填项,请检查";
                apiResp.code = (int)BLLJIMP.Enums.APIErrCode.IsNotFound;
                bll.ContextResponse(context, apiResp);
                return;
            }
            BLLJIMP.Model.Component model = bll.Get <BLLJIMP.Model.Component>(string.Format(" WebsiteOwner='{0}' AND AutoId={1}", bll.WebsiteOwner, componentId));
            if (model == null)
            {
                apiResp.msg  = "没有找到组件";
                apiResp.code = (int)BLLJIMP.Enums.APIErrCode.IsNotFound;
                bll.ContextResponse(context, apiResp);
                return;
            }
            apiResp.status = true;
            if (!string.IsNullOrWhiteSpace(model.ComponentConfig))
            {
                apiResp.result = JToken.Parse(model.ComponentConfig);
                //apiResp.result = ZentCloud.Common.JSONHelper.ObjectToJson(model.ComponentConfig);
            }
            bll.ContextResponse(context, apiResp);
        }
コード例 #12
0
        private void GetTheVoteInfo(string autoId)
        {
            StringBuilder str = new StringBuilder();

            tvInfo = bll.Get <BLLJIMP.Model.TheVoteInfo>(" autoId=" + autoId);
            if (tvInfo != null)
            {
                needList.InnerHtml = ToHtml(tvInfo);
            }
            else
            {
                str.AppendFormat("<li>");
                str.AppendFormat("<div>{0}</div>", "没有数据");
                str.AppendFormat("</li>");
                needList.InnerHtml = str.ToString();
            }
        }
コード例 #13
0
        /// <summary>
        /// 微信分享完成触发
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string WXShareComlete(HttpContext context)
        {
            int id    = int.Parse(context.Request["id"]);
            var model = bllBase.Get <CrowdFundInfo>(string.Format(" AutoID={0}", id));

            model.ShareCount++;
            bllBase.Update(model);
            return(Common.JSONHelper.ObjectToJson(resp));
        }
コード例 #14
0
        /// <summary>
        /// 修改
        /// </summary>
        public static string Edit(HttpContext context)
        {
            var model = GetModel(context);

            if (model.IsEnable == 1)
            {
                if (model.RemindTime <= DateTime.Now)
                {
                    return("提醒时间须晚于当前时间");
                }
            }
            model.RemindID = Convert.ToInt32(context.Request["RemindID"]);
            model.IsRemind = 0;
            var remindinfo = bll.Get <UserRemind>(string.Format("RemindID='{0}' And UserID='{1}'", model.RemindID, Comm.DataLoadTool.GetCurrUserID()));

            if (remindinfo == null)
            {
                return("false");
            }
            return(bll.Update(model).ToString().ToLower());
        }
コード例 #15
0
ファイル: DoPayment.aspx.cs プロジェクト: uvbs/mmp
 protected void Page_Load(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(Request["id"]))
     {
         Response.End();
     }
     model = bllBase.Get <CrowdFundInfo>(string.Format(" AutoID={0}", Request["id"]));
     if (model == null)
     {
         Response.End();
     }
 }
コード例 #16
0
ファイル: WXDiscussInfo.aspx.cs プロジェクト: uvbs/mmp
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                autoId = Request["AutoId"];
                if (!string.IsNullOrEmpty(autoId))
                {
                    reviewInfo = bll.Get <BLLJIMP.Model.ReviewInfo>(string.Format(" AutoId={0}", autoId));
                    if (reviewInfo != null)
                    {
                        reviewInfo.Pv++;
                        bll.Update(reviewInfo);
                        //txtStepNum.Text = rInfo.StepNum.ToString();
                        //txtPraiseNum.Text = reviewInfo.PraiseNum.ToString();
                        //TiWenUserInfo=bllUser.GetUserInfo(rInfo.UserId);
                        //var tutorInfo=bll.Get<BLLJIMP.Model.TutorInfo>(string.Format(" UserId='{0}'", TiWenUserInfo.UserID));
                        //if (tutorInfo != null)
                        //{
                        //    TiWenUserInfo.TrueName = tutorInfo.TutorName;
                        //    TiWenUserInfo.WXHeadimgurl = tutorInfo.TutorImg;
                        //}
                        //else
                        //{
                        //    TiWenUserInfo.WXHeadimgurl = TiWenUserInfo.WXHeadimgurlLocal;
                        //}
                    }
                }

                ForwardingRecord record = bll.Get <BLLJIMP.Model.ForwardingRecord>(string.Format(" FUserID='{0}' AND RUserID='{1}' AND WebsiteOwner='{2}' AND TypeName='话题赞'", bll.GetCurrentUserInfo().UserID, autoId, bll.WebsiteOwner));
                if (record != null)
                {
                    isPraise = true;
                }
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
                Response.End();
            }
        }
コード例 #17
0
ファイル: ProjectDetail.aspx.cs プロジェクト: uvbs/mmp
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(Request["id"]))
                {
                    Response.Write("无参数");
                    Response.End();
                    return;
                }
                model = bll.Get <WBProjectInfo>(string.Format("AutoId={0}", Request["id"]));
                if (model == null)
                {
                    Response.Write("项目不存在");
                    Response.End();
                    return;
                }
                if (model.Status.Equals(0))
                {
                    Response.Write("项目正在审核中,暂时不能查看");
                    Response.End();
                    return;
                }

                companymodel = bll.Get <WBCompanyInfo>(string.Format("UserId='{0}'", model.UserId));
                if (DataLoadTool.CheckWanBangLogin())
                {
                    IsLogin = true;
                    if (bll.GetCount <WBAttentionInfo>(string.Format("UserId='{0}' And AttentionAutoID={1} And AttentionType={2}", HttpContext.Current.Session[SessionKey.WanBangUserID].ToString(), model.AutoID, 2)) > 0)
                    {
                        IsAttention = true;
                    }
                }
            }
            catch (Exception)
            {
                Response.End();
            }
        }
コード例 #18
0
        /// <summary>
        /// 添加
        /// </summary>
        private static string Add(HttpContext context)
        {
            //if (!_isedit)
            //{
            //    return null;
            //}

            var userid = Comm.DataLoadTool.GetCurrUserID();

            if (string.IsNullOrEmpty(userid))
            {
                return("请重新登录");
            }
            var            flowid = int.Parse(context.Request["FlowID"]);
            WXFlowStepInfo model  = new WXFlowStepInfo();

            model.FlowID = flowid;
            var stepinfo = bll.Get <WXFlowStepInfo>(string.Format("FlowID='{0}' order by StepID DESC", flowid));//取最后一条记录

            if (stepinfo != null)
            {
                model.StepID = stepinfo.StepID + 1;
            }
            else
            {
                model.StepID = 1;
            }

            model.FlowField        = context.Request["FlowField"];
            model.FieldDescription = context.Request["FieldDescription"];
            model.SendMsg          = context.Request["SendMsg"];
            model.ErrorMsg         = context.Request["ErrorMsg"];
            model.AuthFunc         = context.Request["AuthFunc"];
            if (model.AuthFunc.Equals("phone"))
            {
                model.IsVerifyCode = int.Parse(context.Request["IsVerifyCode"]);
            }
            return(bll.Add(model).ToString().ToLower());
        }
コード例 #19
0
ファイル: BaseInfoEdit.aspx.cs プロジェクト: uvbs/mmp
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!DataLoadTool.CheckWanBangLogin())
     {
         Response.Redirect(string.Format("/App/WanBang/Wap/Login.aspx?redirecturl={0}", Request.Url.PathAndQuery));
     }
     if (HttpContext.Current.Session[SessionKey.WanBangUserType].ToString().Equals("1"))
     {
         Response.Write("<script>alert('只有基地用户可以访问');window.location.href='Index.aspx';</script>");
         Response.End();//只有基地能访问
     }
     model = bll.Get <WBBaseInfo>(string.Format("UserId='{0}'", HttpContext.Current.Session[SessionKey.WanBangUserID].ToString()));
 }
コード例 #20
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string activityId = context.Request["activity_id"];
            string fieldIndex = context.Request["field_index"];

            if (string.IsNullOrEmpty(activityId))
            {
                resp.errmsg  = "activity_id 为必填,请检查";
                resp.errcode = (int)BLLJIMP.Enums.APIErrCode.IsNotFound;
                context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(resp));
                return;
            }
            if (string.IsNullOrEmpty(fieldIndex))
            {
                resp.errmsg  = "field_index 为必填,请检查";
                resp.errcode = (int)BLLJIMP.Enums.APIErrCode.IsNotFound;
                context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(resp));
                return;
            }
            JuActivityInfo juActivity = bllJuActivity.GetJuActivity(int.Parse(activityId), false);

            if (juActivity == null)
            {
                resp.errcode = (int)BLLJIMP.Enums.APIErrCode.IsNotFound;
                resp.errmsg  = "没有找到该活动";
                context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(resp));
                return;
            }
            ActivityFieldMappingInfo fieldMap = bll.Get <ActivityFieldMappingInfo>(string.Format(" ActivityID={0} AND ExFieldIndex={1}", juActivity.SignUpActivityID, fieldIndex));

            if (fieldMap == null)
            {
                resp.errcode = (int)BLLJIMP.Enums.APIErrCode.IsNotFound;
                resp.errmsg  = "没有找到该条记录";
                context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(resp));
                return;
            }
            if (bll.Delete(new ActivityFieldMappingInfo(), string.Format(" ActivityID={0} AND ExFieldIndex={1}", juActivity.SignUpActivityID, fieldIndex)) > 0)
            {
                resp.isSuccess = true;
                resp.errmsg    = "ok";
            }
            else
            {
                resp.errmsg  = "删除出错";
                resp.errcode = (int)BLLJIMP.Enums.APIErrCode.OperateFail;
            }
            context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(resp));
        }
コード例 #21
0
ファイル: PositionInfoAddU.aspx.cs プロジェクト: uvbs/mmp
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         AutoId = Request["AutoId"];
         if (!string.IsNullOrEmpty(AutoId))
         {
             model = bll.Get <PositionInfo>(string.Format("AutoId={0}", AutoId));
         }
         List <ArticleCategory> CategoryList = bll.GetList <ArticleCategory>(string.Format("WebsiteOwner='{0}' And CategoryType in ('trade','Professional')", bll.WebsiteOwner));
         TradeList        = CategoryList.Where(p => p.CategoryType.Equals("trade")).ToList();
         ProfessionalList = CategoryList.Where(p => p.CategoryType.Equals("Professional")).ToList();
     }
 }
コード例 #22
0
        /// <summary>
        /// 编辑基地信息
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public string EditBaseInfo(HttpContext context)
        {
            int    autoId       = int.Parse(context.Request["AutoID"]);
            string baseName     = context.Request["BaseName"];
            string thumbnails   = context.Request["Thumbnails"];
            string address      = context.Request["Address"];
            string area         = context.Request["Area"];
            string tel          = context.Request["Tel"];
            string phone        = context.Request["Phone"];
            string qq           = context.Request["QQ"];
            string contacts     = context.Request["Contacts"];
            string acreage      = context.Request["Acreage"];
            string helpCount    = context.Request["HelpCount"];
            string userId       = context.Request["UserId"];
            string password     = context.Request["Password"];
            string isDisable    = context.Request["IsDisable"];
            string introduction = context.Request["Introduction"];

            if (bll.GetCount <WBBaseInfo>(string.Format("UserId='{0}' And AutoID!={1}", userId, autoId)) > 0)
            {
                resp.Status = 0;
                resp.Msg    = "用户名已经存在";
                return(Common.JSONHelper.ObjectToJson(resp));
            }
            if (bll.GetCount <WBCompanyInfo>(string.Format("UserId='{0}'", userId)) > 0)
            {
                resp.Status = 0;
                resp.Msg    = "此用户名在企业列表中已经存在";
                return(Common.JSONHelper.ObjectToJson(resp));
            }
            WBBaseInfo model = bll.Get <WBBaseInfo>(string.Format("AutoID={0}", autoId));

            model.BaseName     = baseName;
            model.Thumbnails   = thumbnails;
            model.Address      = address;
            model.Area         = area;
            model.Tel          = tel;
            model.Phone        = phone;
            model.QQ           = qq;
            model.Contacts     = contacts;
            model.Acreage      = acreage;
            model.HelpCount    = string.IsNullOrEmpty(helpCount) ? 0 : int.Parse(helpCount);
            model.UserId       = userId;
            model.Password     = password;
            model.IsDisable    = int.Parse(isDisable);
            model.Introduction = introduction;
            if (bll.Update(model))
            {
                resp.Status = 1;
                resp.Msg    = "更新基地信息成功";
            }
            else
            {
                resp.Msg = "更新基地信息失败";
            }
            return(Common.JSONHelper.ObjectToJson(resp));
        }
コード例 #23
0
ファイル: WXPositionInfo.aspx.cs プロジェクト: uvbs/mmp
 private void GetPosition()
 {
     pInfo = bll.Get <BLLJIMP.Model.PositionInfo>(string.Format(" WebsiteOwner='{0}' AND AutoId='{1}'", bll.WebsiteOwner, AutoId));
     if (pInfo != null)
     {
         pInfo.Pv = pInfo.Pv + 1;
         bll.Update(pInfo);
         txtTitle.Text           = pInfo.Title;
         txtPersonal.Text        = pInfo.Personal;
         txtTime.Text            = pInfo.InsertDate.ToString();
         txtAddress.Text         = pInfo.Address;
         txtEnterpriseScale.Text = pInfo.EnterpriseScale;
         txtContent.Text         = pInfo.Context;
     }
 }
コード例 #24
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!MemberCenter.checkUser(this.Context))
     {
         return;
     }
     if (Request["id"] != null)
     {
         this.Title = "修改银行卡";
         model      = bll.Get <BindBankCard>(string.Format("AutoID={0} And UserId='{1}'", Request["id"], bll.GetCurrUserID()));
     }
     else
     {
         this.Title = "添加银行卡";
     }
 }
コード例 #25
0
 protected void Page_Load(object sender, EventArgs e)
 {
     webAction = Request["Action"];
     actionStr = webAction == "add" ? "添加" : "编辑";
     if (webAction == "edit")
     {
         model = bll.Get <WBJointProjectInfo>(string.Format("AutoID={0}", Convert.ToInt32(Request["id"])));
         if (model == null)
         {
             Response.End();
         }
         else
         {
         }
     }
 }
コード例 #26
0
ファイル: AdminHandler.ashx.cs プロジェクト: uvbs/mmp
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string DeleteCrowdFundInfo(HttpContext context)
        {
            string        ids = context.Request["ids"];
            CrowdFundInfo model;

            foreach (var item in ids.Split(','))
            {
                model = bllBase.Get <CrowdFundInfo>(string.Format("AutoId={0}", item));
                if (model == null || (!model.WebSiteOwner.Equals(bllBase.WebsiteOwner)))
                {
                    return("无权删除");
                }
            }
            int count = bllBase.Delete(new CrowdFundInfo(), string.Format("AutoId in ({0})", ids));

            return(string.Format("成功删除了 {0} 条数据", count));
        }
コード例 #27
0
ファイル: CrowdFundInfoAddEdit.aspx.cs プロジェクト: uvbs/mmp
 protected void Page_Load(object sender, EventArgs e)
 {
     id = Request["id"];
     if (!string.IsNullOrEmpty(Request["id"]))
     {
         actionStr  = "编辑";
         currAction = "edit";
         model      = bllBase.Get <CrowdFundInfo>(string.Format("WebSiteOwner='{0}' And AutoID={1}", bllBase.WebsiteOwner, id));
         if (model == null)
         {
             Response.End();
         }
         else
         {
         }
     }
 }
コード例 #28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string pageId = Request["pageId"];

            if (string.IsNullOrEmpty(pageId))
            {
                Response.Write("pageId 参数必传");
                Response.End();
            }
            model = bll.Get <PcPage>(string.Format("WebsiteOwner='{0}' And PageId={1}", bll.WebsiteOwner, pageId));
            if (model == null)
            {
                Response.Write("页面不存在");
                Response.End();
            }
            middList = ZentCloud.Common.JSONHelper.JsonToModel <List <ZentCloud.BLLJIMP.ModelGen.PcPage.MiddModel> >(model.MiddContent);
        }
コード例 #29
0
ファイル: Edit.aspx.cs プロジェクト: uvbs/mmp
        protected void Page_Load(object sender, EventArgs e)
        {
            model = bll.Get <PcPage>(string.Format(" WebsiteOwner='{0}' And PageId={1}", bll.WebsiteOwner, Request["pageId"]));

            #region 菜单列表
            string        is_system = this.Request["is_system"];
            string        use_type  = this.Request["use_type"];
            StringBuilder sbWhere   = new StringBuilder();
            StringBuilder sbWhere1  = new StringBuilder();
            sbWhere.AppendFormat(" WebsiteOwner = '{0}'", bll.WebsiteOwner);
            sbWhere1.AppendFormat(" WebsiteOwner Is null");

            sbWhere.AppendFormat(" And  IsPc=1");
            sbWhere1.AppendFormat(" And  IsPc=1");
            if (!string.IsNullOrWhiteSpace(use_type))
            {
                sbWhere.AppendFormat(" And UseType = '{0}'", use_type);
                sbWhere1.AppendFormat(" And UseType = '{0}'", use_type);
            }
            var dataList = bll.GetColList <CompanyWebsite_ToolBar>(int.MaxValue, 1, sbWhere.ToString(), "AutoID,KeyType,BaseID");
            if (is_system != "1")
            {
                List <CompanyWebsite_ToolBar> dataList1 = bll.GetColList <CompanyWebsite_ToolBar>(int.MaxValue, 1, sbWhere1.ToString(), "AutoID,KeyType");
                List <int> nList = dataList.Select(p => p.BaseID).Distinct().ToList();
                foreach (CompanyWebsite_ToolBar item in dataList1.Where(p => !nList.Contains(p.AutoID)))
                {
                    dataList.Add(item);
                }
            }
            MenuList = dataList.OrderBy(p => p.KeyType).Select(p => p.KeyType).Distinct().ToList();

            #endregion

            #region 幻灯片列表
            var slideData = bll.GetList <BLLJIMP.Model.Slide>(string.Format("WebsiteOwner='{0}' And IsPC=1  order by Sort DESC", bll.WebsiteOwner));
            foreach (var item in slideData)
            {
                if (!SlideList.Contains(item.Type))
                {
                    SlideList.Add(item.Type);
                }
            }
            slideListJson = ZentCloud.Common.JSONHelper.ObjectToJson(SlideList);
            #endregion
        }
コード例 #30
0
ファイル: WXTutorInfo.aspx.cs プロジェクト: uvbs/mmp
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         AutoId = Request["AutoId"];
         if (!string.IsNullOrEmpty(AutoId))
         {
             tInfo = bll.Get <BLLJIMP.Model.TutorInfo>(string.Format(" AutoId={0}", AutoId));
             Gettrade();        //获取行业
             GetProfessional(); //获取行业
         }
         else
         {
             Gettrade1();        //获取行业
             GetProfessional1(); //获取行业
         }
     }
 }