Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         this.UserInfo = buser.GetLogin();
         DataTable table = cll.SelectByUserName(ull.GetLogin().UserName, this.UserInfo.GroupID);
         if (!bg.CheckNum(UserInfo.UserID))
         {
             function.WriteErrMsg("您所在的用户组限制了您每天最多只能发布" + bg.GetByID(UserInfo.GroupID).CCountPerDay + "条信息!");
         }
         if (string.IsNullOrEmpty(base.Request.QueryString["ModelID"]))
         {
             function.WriteErrMsg("没有指定要添加内容的模型ID!");
         }
         else
         {
             this.ModelID = DataConverter.CLng(base.Request.QueryString["ModelID"]);
         }
         if (string.IsNullOrEmpty(base.Request.QueryString["NodeID"]))
         {
             function.WriteErrMsg("没有指定要添加内容的栏目节点ID!");
         }
         else
         {
             this.NodeID = DataConverter.CLng(base.Request.QueryString["NodeID"]);
         }
         if (bmode.GetModelById(this.ModelID).ModelType == 2)
         {
             Response.Redirect("addproduct.aspx?ModelID=" + this.ModelID + "&NodeID=" + this.NodeID);//跳转到商城
         }
         if (bmode.GetModelById(this.ModelID).ModelType == 5)
         {
             Response.Redirect("../UserShop/ProductAdd.aspx?ModelID=" + this.ModelID + "&NodeID=" + this.NodeID);//跳转到店铺
         }
         this.Label1.Text    = "向" + this.bnode.GetNodeXML(this.NodeID).NodeName + "节点添加" + this.bmode.GetModelById(this.ModelID).ItemName;
         this.Label2.Text    = this.bnode.GetNodeXML(this.NodeID).NodeName;
         this.HdnModel.Value = this.ModelID.ToString();
         string ModelName = this.bmode.GetModelById(this.ModelID).ModelName;
         this.EBtnSubmit.Text = "添加" + this.bmode.GetModelById(this.ModelID).ItemName;
         this.HdnNode.Value   = this.NodeID.ToString();
         this.ModelHtml.Text  = this.bfield.GetInputHtmlUser(this.ModelID, this.NodeID);
         DataSet ds = bfield.GetProModelFieldS(this.ModelID.ToString());
         this.Title_L.Text = GetAlias("Title", ds.Tables[0]);
     }
     #region 权限
     GetNodePreate(this.NodeID);
     #endregion
 }