Ejemplo n.º 1
0
        //修改模式使用,更改前台页面
        protected void BindText(int gid)
        {
            mcon = bll.GetCommonData(gid);
            if (buser.GetLogin().UserName != mcon.Inputer && !purBll.Auth("OAEdit", buser.GetLogin().UserRole, mcon.NodeID))
            {
                function.WriteErrMsg("非本人添加或无修改权限!!");
            }
            Title_T.Text         = mcon.Title;
            nodeDP.SelectedValue = mcon.NodeID.ToString();
            CreateTime.Text      = mcon.CreateTime.ToString("yyyy年MM月dd日 HH:mm:ss");
            userNameT.Text       = mcon.Inputer;
            userGroupL.Text      = strBll.SelNameByUid(buser.GetLogin().UserID);
            DataRow dr = boa.SelByItemID(mcon.TableName, mcon.ItemID).Rows[0];

            Secret.SelectedValue     = dr["Secret"].ToString();
            Urgency.SelectedValue    = dr["Urgency"].ToString();
            Importance.SelectedValue = dr["Importance"].ToString();
            userGroupL.Text          = dr["userGroupT"].ToString();
            content.Text             = dr["content"].ToString();
            if (!string.IsNullOrEmpty(dr["attach"].ToString()))
            {
                string[] af = dr["attach"].ToString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                string   h  = "";
                for (int i = 0; i < af.Length; i++)
                {
                    h += "<span class='disupFile'>";
                    h += GroupPic.GetShowExtension(GroupPic.GetExtName(af[i]));
                    h += "<a href='" + af[i] + "' title='点击下载'>" + af[i].Split('/')[(af[i].Split('/').Length - 1)] +
                         "<a href='javascript:;' title='删除' onclick='delHasFile(\"" + af[i] + "\",this);' ><img src='/App_Themes/AdminDefaultTheme/images/del.png'/></a></span>";
                }
                hasFileTD.InnerHtml = h;
            }
            hasFileData.Value = dr["attach"].ToString();//便于删除管理
            saveBtn.Text      = "修改";
        }
Ejemplo n.º 2
0
        protected void DataBind(string ID)
        {
            int generealID = Convert.ToInt32(ID);

            mcon             = bcon.GetCommonData(generealID);
            minfo            = buser.GetUserByName(mcon.Inputer);
            Title_T.Text     = mcon.Title;
            LbCreatTime.Text = mcon.CreateTime.ToString("yyyy年MM月dd日 HH:mm:ss");
            userNameL.Text   = mcon.Inputer;
            //function.WriteErrMsg(mcon.TableName + ":" + mcon.ItemID + ":" + generealID);
            DataRow dr = boa.SelByItemID(mcon.TableName, mcon.ItemID).Rows[0];

            SecretL.Text     = dr["Secret"].ToString();
            UrgencyL.Text    = dr["Urgency"].ToString();
            ImportanceL.Text = dr["Importance"].ToString();
            userGroupL.Text  = dr["userGroupT"].ToString();
            ContentHtml.Text = dr["content"].ToString();
            if (!string.IsNullOrEmpty(dr["attach"].ToString()))
            {
                string[] af = dr["attach"].ToString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                string   h  = "";
                for (int i = 0; i < af.Length; i++)
                {
                    h += "<span class='disupFile'>";
                    h += GroupPic.GetShowExtension(GroupPic.GetExtName(af[i]));
                    h += "<a href='" + af[i] + "' title='点击下载'>" + af[i].Split('/')[(af[i].Split('/').Length - 1)] + "</span>";
                }
                publicAttachTD.InnerHtml = h;
            }
        }