Beispiel #1
0
        private void GetPartnerStr(BLLJIMP.Model.WBHPartnerInfo PInfo)
        {
            try
            {
                List <BLLJIMP.Model.ArticleCategory> actegorys = bll.GetList <BLLJIMP.Model.ArticleCategory>(string.Format("  websiteOwner='{0}' AND CategoryType='Partner'", DataLoadTool.GetWebsiteInfoModel().WebsiteOwner));

                if (actegorys != null)
                {
                    foreach (BLLJIMP.Model.ArticleCategory item in actegorys)
                    {
                        if (PInfo.PartnerType.Contains(item.AutoID.ToString()))
                        {
                            PartnerStr += string.Format("<input type=\"checkbox\" id=\"{0}\" checked=\"checked\"  name=\"Partner\" value=\"{1}\" />", "Partner" + item.AutoID, item.AutoID);
                            PartnerStr += string.Format("<label for=\"{0}\">{1}</label>&nbsp;&nbsp;&nbsp;", "trade" + item.AutoID, item.CategoryName);
                        }
                        else
                        {
                            PartnerStr += string.Format("<input type=\"checkbox\" id=\"{0}\"  name=\"Partner\" value=\"{1}\" />", "Partner" + item.AutoID, item.AutoID);
                            PartnerStr += string.Format("<label for=\"{0}\">{1}</label>&nbsp;&nbsp;&nbsp;", "Partner" + item.AutoID, item.CategoryName);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
Beispiel #2
0
        private void GetPartnerStr(BLLJIMP.Model.WBHPartnerInfo PInfo)
        {
            try
            {
                if (!string.IsNullOrEmpty(PInfo.PartnerType))
                {
                    PInfo.PartnerType = PInfo.PartnerType.TrimEnd(',');
                    foreach (var item in PInfo.PartnerType.Split(','))
                    {
                        var category = bll.Get <ArticleCategory>(string.Format(" AutoID={0}", item));
                        if (category != null)
                        {
                            PartnerStr += " <span class=\"wbtn_tag wbtn_main\">" + category.CategoryName + "</span>";
                        }
                    }
                    //PInfo.Ctype = bll.GetList<BLLJIMP.Model.ArticleCategory>(string.Format("  CategoryType='Partner' AND AutoID in ({0})", PInfo.PartnerType));

                    //foreach (BLLJIMP.Model.ArticleCategory item in PInfo.Ctype)
                    //{
                    //    PartnerStr = " <span class=\"wbtn_tag wbtn_main\">" + item.CategoryName + "</span>";
                    //}
                }
            }
            catch (Exception ex)
            {
            }
        }
        /// <summary>
        /// 添加更新职位
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string AUPartnerInfo(HttpContext context)
        {
            string autoId         = context.Request["AutoId"];
            string partnerName    = context.Request["PartnerName"];
            string partnerContext = context.Request["PartnerContext"];
            string partnerAddress = context.Request["PartnerAddress"];
            string partnerType    = context.Request["PartnerType"];
            string partnerImg     = context.Request["PartnerImg"];

            BLLJIMP.Model.WBHPartnerInfo model = bllJuactivity.Get <BLLJIMP.Model.WBHPartnerInfo>(string.Format(" WebsiteOwner='{0}' AND AutoId='{1}'", bll.WebsiteOwner, autoId));
            if (model != null)
            {
                model.PartnerName    = partnerName;
                model.PartnerContext = partnerContext;
                model.PartnerAddress = partnerAddress;
                model.PartnerType    = partnerType;
                model.PartnerImg     = partnerImg;


                if (bllJuactivity.Update(model))
                {
                    resp.Status = 0;
                    resp.Msg    = "更新成功";
                }
                else
                {
                    resp.Status = 0;
                    resp.Msg    = "更新失败";
                }
            }
            else
            {
                model = new BLLJIMP.Model.WBHPartnerInfo()
                {
                    PartnerName    = partnerName,
                    PartnerContext = partnerContext,
                    PartnerAddress = partnerAddress,
                    PartnerType    = partnerType,
                    PartnerImg     = partnerImg,
                    InsertDate     = DateTime.Now,
                    WebsiteOwner   = bll.WebsiteOwner
                };
                if (bllJuactivity.Add(model))
                {
                    resp.Status = 0;
                    resp.Msg    = "添加成功";
                }
                else
                {
                    resp.Status = 0;
                    resp.Msg    = "添加失败";
                }
            }

            return(Common.JSONHelper.ObjectToJson(resp));
        }
Beispiel #4
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);
     }
 }
Beispiel #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         AutoId = Request["AutoId"];
         if (!string.IsNullOrEmpty(AutoId))
         {
             BLLJIMP.Model.WBHPartnerInfo PInfo = bll.Get <BLLJIMP.Model.WBHPartnerInfo>(string.Format(" AutoId={0}", AutoId));
             GetPartnerStr(PInfo);//获取行业
         }
         else
         {
             GetPartnerStr1();//获取行业
         }
     }
 }
        /// <summary>
        /// 获取职位
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string GetPartnerInfo(HttpContext context)
        {
            string autoId = context.Request["AutoId"];

            if (string.IsNullOrEmpty(autoId))
            {
                resp.Status = -1;
                resp.Msg    = "系统出错,请联系管理员!";
                goto OutF;
            }
            BLLJIMP.Model.WBHPartnerInfo model = bllJuactivity.Get <BLLJIMP.Model.WBHPartnerInfo>(string.Format(" WebsiteOwner='{0}' AND AutoId='{1}'", bll.WebsiteOwner, autoId));
            resp.Status = 0;
            resp.ExObj  = model;

OutF:
            return(Common.JSONHelper.ObjectToJson(resp));
        }