Exemple #1
0
        public void DataBind(string key = "")
        {
            DataTable dt = pubBll.SelByType(2);

            if (!badmin.GetAdminLogin().RoleList.Contains(",1,"))
            {
                GetTable(dt, B_Role.GetPowerInfoByIDs(badmin.GetAdminLogin().RoleList));
            }
            Egv.DataSource = dt;
            Egv.DataBind();
        }
        protected void MyBind(string key = "")
        {
            M_AdminInfo adminMod = B_Admin.GetLogin();
            DataTable   pubtable = pubBll.SelByType();

            if (!B_Admin.IsSuperManage(adminMod.AdminId))
            {
                GetTable(pubtable, B_Role.GetPowerInfoByIDs(adminMod.RoleList));
            }
            Egv.DataSource = pubtable;
            Egv.DataBind();
        }
Exemple #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        function.AccessRulo();
        B_Admin badmin = new B_Admin();

        badmin.CheckIsLogin();
        if (!this.Page.IsPostBack)
        {
            string Pubid = string.IsNullOrEmpty(Request.QueryString["Pubid"].ToString()) ? "0" : Request.QueryString["Pubid"].ToString();
            pubMod = pubBll.SelReturnModel(DataConverter.CLng(Pubid));
            string prowinfo = B_Role.GetPowerInfoByIDs(badmin.GetAdminLogin().RoleList);
            if (!badmin.GetAdminLogin().RoleList.Contains(",1,") && !prowinfo.Contains("," + pubMod.PubTableName + ","))
            {
                function.WriteErrMsg("无权限管理该互动模型!!");
            }
            string ModelID = bpub.GetSelect(DataConverter.CLng(Pubid)).PubModelID.ToString();
            //  int ModelID = string.IsNullOrEmpty(Request.QueryString["ModelID"]) ? 0 : DataConverter.CLng(Request.QueryString["ModelID"]);
            this.HiddenPubid.Value = Pubid;
            if (DataConverter.CLng(ModelID) <= 0)
            {
                function.WriteErrMsg("缺少用户模型ID参数!");
            }
            //jc:查找相应模版实体
            //    M_ModelInfo model = bmodel.GetModelById(ModelID);
            string small = string.IsNullOrEmpty(Request.QueryString["small"]) ? "0" : Request.QueryString["small"].ToString();
            this.HiddenSmall.Value = small;
            this.HdnModelID.Value  = ModelID;
            M_ModelInfo model = bmodel.GetModelById(DataConverter.CLng(ModelID));
            int         ID    = string.IsNullOrEmpty(Request.QueryString["ID"]) ? 0 : DataConverter.CLng(Request.QueryString["ID"]);
            this.HiddenID.Value = ID.ToString();
            ViewState["ID"]     = ID.ToString();
            if (ID < 0)
            {
                function.WriteErrMsg("缺少ID参数!");
            }


            DataTable UserData = new DataTable();
            DataTable aas      = ShowGrid();
            int       zong     = aas.Rows.Count;


            UserData = buser.GetUserModeInfo(model.TableName, ID, 18);

            this.ptit.Text = UserData.Rows[0]["PubTitle"].ToString();

            DetailsView1.DataSource = UserData.DefaultView;
            DetailsView1.DataBind();
            Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='pubmanage.aspx'>互动管理</a></li> <li><a href='Pubsinfo.aspx?Pubid=" + Pubid + "&type=0'>互动信息管理</a></li><li>互动信息</li>");
        }
    }
        protected void Page_Load(object sender, EventArgs e)
        {
            ZoomLa.Common.function.AccessRulo();
            B_Admin badmin = new B_Admin();

            if (!this.Page.IsPostBack)
            {
                string Pubid = string.IsNullOrEmpty(Request.QueryString["Pubid"]) ? "0" : Request.QueryString["Pubid"].ToString();
                pubMod = bpub.SelReturnModel(DataConverter.CLng(Pubid));
                string prowinfo = B_Role.GetPowerInfoByIDs(badmin.GetAdminLogin().RoleList);
                if (!badmin.GetAdminLogin().RoleList.Contains(",1,") && !prowinfo.Contains("," + pubMod.PubTableName + ","))
                {
                    function.WriteErrMsg("无权限管理该互动信息!!");
                }
                string Parentid = string.IsNullOrEmpty(Request.QueryString["Parentid"]) ? "0" : Request.QueryString["Parentid"].ToString();
                int    ModelID  = DataConverter.CLng(bpub.GetSelect(DataConverter.CLng(Pubid)).PubModelID.ToString());
                this.HdnType.Value = string.IsNullOrEmpty(Request.QueryString["small"]) ? null : Request.QueryString["small"].ToString();
                if (DataConverter.CLng(Pubid) <= 0 || DataConverter.CLng(Parentid) <= 0)
                {
                    function.WriteErrMsg("缺少用户参数!");
                }
                //jc:查找相应模版实体
                M_ModelInfo model = bmodel.GetModelById(ModelID);
                this.HdnPubid.Value       = Pubid;
                this.HiddenParentid.Value = Parentid;
                this.HdnModel.Value       = ModelID.ToString();
                int ID = string.IsNullOrEmpty(Request.QueryString["ID"]) ? 0 : DataConverter.CLng(Request.QueryString["ID"]);
                this.HdnID.Value       = ID.ToString();
                this.LblModelName.Text = "回复" + model.ItemName;
                string Html = bfield.InputallHtml(ModelID, 0, new ModelConfig());
                //GetPubModelHtmlall
                ModelHtml.Text = Html;



                ///////////
                DataTable UserData = new DataTable();
                DataTable aas      = ShowGrid();

                int zong = aas == null ? 0 : aas.Rows.Count;
                int sID  = string.IsNullOrEmpty(Request.QueryString["Parentid"]) ? 0 : DataConverter.CLng(Request.QueryString["Parentid"]);
                UserData = buser.GetUserModeInfo(model.TableName, sID, 18);
                DetailsView1.DataSource = UserData.DefaultView;
                DetailsView1.DataBind();
                //////////////
                Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='pubmanage.aspx'>互动管理</a></li><li>添加信息</li>");
            }
        }
Exemple #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            function.AccessRulo();
            B_Admin badmin = new B_Admin();

            if (!this.IsPostBack)
            {
                int pubid = DataConverter.CLng(Request.QueryString["Pubid"]);
                ViewState["pubid"] = pubid.ToString();
                M_Pub  pubinfo  = pub.GetSelect(pubid);
                string prowinfo = B_Role.GetPowerInfoByIDs(badmin.GetAdminLogin().RoleList);
                if (!badmin.GetAdminLogin().RoleList.Contains(",1,") && !prowinfo.Contains("," + pubinfo.PubTableName + ","))
                {
                    function.WriteErrMsg("无权限管理该互动模型!!");
                }
                string ModelID = (pubinfo.PubModelID == 0) ? "0" : pubinfo.PubModelID.ToString();
                if (DataConverter.CLng(ModelID) <= 0)
                {
                    function.WriteErrMsg("无模块信息");
                }
                int ID = string.IsNullOrEmpty(Request.QueryString["ID"]) ? 0 : DataConverter.CLng(Request.QueryString["ID"]);
                this.HdnID.Value = ID.ToString();
                string      type  = (Request.QueryString["type"] == null) ? "0" : Request.QueryString["type"].ToString();
                M_ModelInfo model = bmodel.GetModelById(DataConverter.CLng(ModelID));
                this.HdnModelID.Value     = ModelID.ToString();
                this.HiddenType.Value     = type;
                this.HiddenPubid.Value    = pubid.ToString();
                this.ViewState["ModelID"] = ModelID.ToString();
                this.ViewState["cType"]   = "1";
                RepNodeBind();
                int nodeid = (Request.QueryString["nodeid"] == null) ? 0 : DataConverter.CLng(Request.QueryString["nodeid"]);
                this.HiddenNode.Value = "";
                if (nodeid == 0)
                {
                    Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='pubmanage.aspx'>互动管理</a></li><li><a href='AddPub.aspx?Parentid=" + this.HdnID.Value + "&Pubid=" + this.HiddenPubid.Value + "' style='color:red;'>[添加回复]</a></li>");
                }
                else
                {
                    B_Node bbn = new B_Node();
                    M_Node nn  = bbn.GetNodeXML(nodeid);
                    Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='pubmanage.aspx'>互动管理</a></li><li><a href='Pubsinfo.aspx?nodeid=" + nodeid + "&Pubid=" + this.HiddenPubid.Value + "' style='color:red;'>" + nn.NodeName + "</a></li>");
                    this.HiddenNode.Value = "&nodeid=" + nodeid;
                }
                //this.Label1.Text = "<a href='AddPub.aspx?Parentid=" + this.HdnID.Value + "&Pubid=" + this.HiddenPubid.Value + "'>[&nbsp;&nbsp;&nbsp;添加回复&nbsp;&nbsp;]</a>";
            }
        }
Exemple #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (function.isAjax())
            {
                string action = Request.Form["action"];
                string result = "";
                switch (action)
                {
                case "modelname":
                    result = SeeModelName();
                    break;

                default:
                    break;
                }
                Response.Write(result); Response.Flush(); Response.End();
                return;
            }
            if (!IsPostBack)
            {
                ModelList_DP.DataSource = pubBll.Sel();
                ModelList_DP.DataBind();
                string bread = "<li class='active'>{0}</li>";
                //-------------------------------------------------------------
                if (Mid > 0)
                {
                    M_Pub       pubMod   = pubBll.SelReturnModel(Mid);
                    M_AdminInfo adminMod = B_Admin.GetLogin();
                    string      prowinfo = B_Role.GetPowerInfoByIDs(adminMod.RoleList);
                    if (!adminMod.IsSuperAdmin() && !prowinfo.Contains("," + pubMod.PubTableName + ","))
                    {
                        function.WriteErrMsg("无权限管理该互动模型!!");
                    }
                    ModelList_DP.SelectedValue = pubMod.PubTableName;
                    PubTableName.Enabled       = false;
                    PubLogin.Checked           = pubMod.PubLogin == 1;
                    PubLoginUrls.Visible       = PubLogin.Checked;
                    PubLoginUrl.Text           = pubMod.PubLoginUrl;
                    bread = string.Format(bread, "修改[" + pubMod.PubName + "]");
                    #region Menu操作
                    switch (Menu)
                    {
                    case "edit":
                    {
                        PubType.Enabled        = false;
                        Lbtitle.Text           = "修改模块信息";
                        PubName.Text           = pubMod.PubName;
                        PubClass.SelectedValue = pubMod.PubClass.ToString();
                        PubType.SelectedValue  = pubMod.PubType.ToString();

                        if (pubMod.PubOneOrMore == 2)
                        {
                            PubOneOrMore.SelectedValue = "2";
                            PubOneOrMorenum.Visible    = true;
                            PubOneOrMorenum.Text       = pubMod.PubOneOrMore.ToString();
                        }
                        else
                        {
                            PubIPOneOrMorenum.Visible  = false;
                            PubOneOrMore.SelectedValue = pubMod.PubOneOrMore.ToString();
                        }

                        if (pubMod.PubIPOneOrMore < 2)
                        {
                            PubIPOneOrMorenum.Visible    = false;
                            PubIPOneOrMore.SelectedValue = pubMod.PubIPOneOrMore.ToString();
                        }
                        else
                        {
                            PubIPOneOrMore.SelectedValue = "2";
                            PubIPOneOrMorenum.Visible    = true;
                            PubIPOneOrMorenum.Text       = pubMod.PubIPOneOrMore.ToString();
                        }
                        Interval_T.Text = pubMod.Interval.ToString();
                        if (!string.IsNullOrEmpty(pubMod.PubTableName))
                        {
                            PubTableName.Text = pubMod.PubTableName.Replace("ZL_Pub_", "");
                        }
                        PubTemplate_hid.Value  = pubMod.PubTemplate;
                        PubLoadstr.Text        = pubMod.PubLoadstr;
                        PubIsTrue.Checked      = pubMod.PubIsTrue == 1 ? true : false;
                        PubCode.Checked        = pubMod.PubCode == 1 ? true : false;
                        PubOpenComment.Checked = pubMod.PubOpenComment == 1 ? true : false;
                        //CookieNum_Rad.SelectedValue = (pubinfo.PubTimeSlot < 1 ? 0 : 1).ToString();
                        //CookieNum_T.Text = pubinfo.PubTimeSlot < 1 ? "1" : pubinfo.PubTimeSlot.ToString();
                        RaPublic.Checked = pubMod.Pubid == 1 ? true : false;
                        Pubkeep.Text     = pubMod.Pubkeep.ToString();
                        Puberrmsg.Text   = pubMod.Puberrmsg.ToString();
                        if (pubMod.PubEndTime.ToString() == "9999-12-31 23:59:59")
                        {
                            PubEndTime.Text = "";
                        }
                        else
                        {
                            PubEndTime.Text = pubMod.PubEndTime.ToString().Replace("/", "-");
                        }
                        PubInputTM_hid.Value = pubMod.PubInputTM;
                        PubInputLoadStr.Text = pubMod.PubInputLoadStr;
                        Pubinfo.Text         = pubMod.Pubinfo;
                        PubGourl.Text        = pubMod.PubGourl;
                        pubflag.Checked      = pubMod.PubFlag == 1;
                        if (!string.IsNullOrEmpty(pubMod.PubPermissions))
                        {
                            CheckBox1.Checked = pubMod.PubPermissions.Contains("Look");
                            CheckBox2.Checked = pubMod.PubPermissions.Contains("Edit");
                            CheckBox3.Checked = pubMod.PubPermissions.Contains("Del");
                            CheckBox4.Checked = pubMod.PubPermissions.Contains("Sen");
                        }
                    }
                    break;

                    case "copy":
                    {
                        PubTableName.Enabled = true;
                        PubName.Attributes.Add("onkeyup", "Getpy('PubName','PubTableName','PubLoadstr','PubInputLoadStr')");
                        Lbtitle.Text                 = "复制模块信息";
                        PubName.Text                 = "新建" + pubMod.PubName;
                        PubClass.SelectedValue       = pubMod.PubClass.ToString();
                        PubType.SelectedValue        = pubMod.PubType.ToString();
                        PubOneOrMore.SelectedValue   = pubMod.PubOneOrMore.ToString();
                        PubIPOneOrMore.SelectedValue = pubMod.PubIPOneOrMore.ToString();
                        if (!string.IsNullOrEmpty(pubMod.PubTableName))
                        {
                            PubTableName.Text = pubMod.PubTableName.Replace("ZL_Pub_", "");
                        }
                        PubTemplate_hid.Value  = pubMod.PubTemplate;
                        PubLoadstr.Text        = "XJ" + pubMod.PubLoadstr;
                        PubIsTrue.Checked      = pubMod.PubIsTrue == 1 ? true : false;
                        PubCode.Checked        = pubMod.PubCode == 1 ? true : false;
                        PubOpenComment.Checked = pubMod.PubOpenComment == 1 ? true : false;
                        Pubkeep.Text           = pubMod.Pubkeep.ToString();
                        Puberrmsg.Text         = pubMod.Puberrmsg.ToString();
                        if (pubMod.PubEndTime.ToString() == "9999-12-31 23:59:59")
                        {
                            PubEndTime.Text = "";
                        }
                        else
                        {
                            PubEndTime.Text = pubMod.PubEndTime.ToString().Replace("/", "-");
                        }
                        PubInputTM_hid.Value = pubMod.PubInputTM;
                        PubInputLoadStr.Text = "XJ" + pubMod.PubInputLoadStr;
                        Pubinfo.Text         = pubMod.Pubinfo;
                        PubGourl.Text        = pubMod.PubGourl;

                        if (!string.IsNullOrEmpty(pubMod.PubPermissions))
                        {
                            CheckBox1.Checked = pubMod.PubPermissions.Contains("Look");
                            CheckBox2.Checked = pubMod.PubPermissions.Contains("Edit");
                            CheckBox3.Checked = pubMod.PubPermissions.Contains("Del");
                            CheckBox4.Checked = pubMod.PubPermissions.Contains("Sen");
                        }
                    }
                    break;

                    case "delete":
                    {
                        pubMod.PubIsDel = 1;
                        pubBll.GetUpdate(pubMod);
                        function.WriteErrMsg("存档成功", "PubManage.aspx");
                    }
                    break;

                    case "truedelete":
                    {
                        pubBll.GetDelete(Mid);
                        B_Role.DelPower(pubMod.PubTableName);
                        function.WriteSuccessMsg("删除成功", "PubRecycler.aspx");
                    }
                    break;

                    case "revert":
                    {
                        pubMod.PubIsDel = 0;
                        pubBll.InsertUpdate(pubMod);
                        function.WriteSuccessMsg("还原成功", "PubRecycler.aspx");
                    }
                    break;
                    }
                    #endregion
                }
                else
                {
                    PubName.Attributes.Add("onkeyup", "Getpy('PubName','PubTableName','PubLoadstr','PubInputLoadStr')");
                    ModelList_DP.Items.Insert(0, new ListItem("请选择模型", ""));
                    bread = string.Format(bread, "添加互动");
                }
                Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "Content/ContentManage.aspx'>内容管理</a></li><li><a href='PubManage.aspx'>互动模块</a></li>" + bread);
            }
        }
Exemple #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            B_Admin badmin = new B_Admin();

            if (!this.Page.IsPostBack)
            {
                string Pubid = string.IsNullOrEmpty(Request.QueryString["Pubid"].ToString()) ? "0" : Request.QueryString["Pubid"].ToString();
                pubMod = bpub.SelReturnModel(DataConverter.CLng(Pubid));
                string prowinfo = B_Role.GetPowerInfoByIDs(badmin.GetAdminLogin().RoleList);
                if (!badmin.GetAdminLogin().RoleList.Contains(",1,") && !prowinfo.Contains("," + pubMod.PubTableName + ","))
                {
                    function.WriteErrMsg("无权限管理该互动信息!!");
                }
                int ModelID = DataConverter.CLng(bpub.GetSelect(DataConverter.CLng(Pubid)).PubModelID.ToString());
                this.HdnPubid.Value = Pubid.ToString();
                this.HdnType.Value  = string.IsNullOrEmpty(Request.QueryString["small"]) ? null : Request.QueryString["small"].ToString();
                if (DataConverter.CLng(Pubid) <= 0)
                {
                    function.WriteErrMsg("缺少用户模型ID参数!");
                }
                M_ModelInfo model = bmodel.GetModelById(ModelID);
                this.HdnModel.Value = ModelID.ToString();
                int ID = string.IsNullOrEmpty(Request.QueryString["ID"]) ? 0 : DataConverter.CLng(Request.QueryString["ID"]);
                this.HdnID.Value = ID.ToString();
                DataTable UserData = new DataTable();
                UserData = buser.GetUserModeInfo(model.TableName, ID, 12);
                DataRow dr;
                if (UserData == null)
                {
                    dr = null;
                }
                else
                {
                    if (UserData.Rows.Count == 0)
                    {
                        dr = null;
                    }
                    else
                    {
                        dr = UserData.Rows[0];
                    }
                }
                if (dr == null)
                {
                    this.LblModelName.Text = "添加" + model.ModelName;
                }
                else
                {
                    this.LblModelName.Text  = "修改" + model.ModelName;
                    this.TextBox1.Text      = dr["PubTitle"].ToString();
                    this.tx_PubContent.Text = dr["PubContent"].ToString();

                    this.HdnID.Value = dr["ID"].ToString();
                }
                string Html = bfield.InputallHtml(ModelID, 0, new ModelConfig()
                {
                    ValueDR = dr
                });
                ModelHtml.Text = Html;
                Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='pubmanage.aspx'>互动管理</a></li><li>修改信息</li>");
            }
        }