Esempio n. 1
0
    public void LoadDate()
    {
        string     strIsAll     = "0";
        int        strType      = 0;
        EntityData entityNotice = RemindDAO.GetNoticeByCode(strNoticeCode);

        if (entityNotice.HasRecord())
        {
            if (entityNotice.GetInt("status").ToString() != "0")
            {
                strType = entityNotice.GetInt("Type");
                if (strType == 99)
                {
                    this.trNotice.Visible = false;
                }
                this.DDLNoticeClass.Value = Server.HtmlEncode(entityNotice.GetString("NoticeClass"));
                this.txtTitle.Value       = Server.HtmlEncode(entityNotice.GetString("Title"));
                this.lbSubmitname.Text    = RmsPM.BLL.SystemRule.GetUserName(entityNotice.GetString("SubmitPerson").ToString()).ToString();
                this.lblSubmitDate.Text   = entityNotice.GetDateTimeOnlyDate("SubmitDate");
                this.taContent.Value      = StringRule.FormartOutput(entityNotice.GetString("Content"));
                strIsAll = entityNotice.GetString("IsAll");
                this.lbLastUpdate.Text = RmsPM.BLL.SystemRule.GetUserName(entityNotice.GetString("UserCode").ToString()).ToString() + " 于 " + entityNotice.GetDateTimeOnlyDate("UpdateDate") + "修改";
            }
            else
            {
                Response.Write(JavaScript.ScriptStart);
                Response.Write("window.alert('通知已删除');");
                Response.Write("window.close();");
                Response.Write(JavaScript.ScriptEnd);
            }
        }
        if (strIsAll == "0") //部分人员
        {
            string strUsers        = "";
            string strUserNames    = "";
            string strStations     = "";
            string strStationNames = "";
            RmsPM.BLL.ResourceRule.GetAccessRange(this.strNoticeCode, "0801", "080104", ref strUsers, ref strUserNames, ref strStations, ref strStationNames);
            this.txtUsers.Value        = RmsPM.BLL.StringRule.CutRepeat(strUsers);
            this.SelectName.InnerText  = RmsPM.BLL.StringRule.CutRepeat(strUserNames);
            this.txtStations.Value     = RmsPM.BLL.StringRule.CutRepeat(strStations);
            this.SelectName.InnerText += "," + RmsPM.BLL.StringRule.CutRepeat(strStationNames);
        }
        else
        {
            this.txtUsers.Value       = this.GetAllUser();
            this.SelectName.InnerText = "全体人员";
        }

        entityNotice.Dispose();


        // this.lblTitle.Text = "修改通知";
        //EntityData entityNotice = RemindDAO.GetNoticeByCode(this.strNoticeCode);
        //this.txtTitle.Value = System.Web.HttpUtility.HtmlEncode(entityNotice.GetString("Title"));
        //this.taContent.Value = StringRule.FormartOutput(entityNotice.GetString("Content"));
        //this.LoadUser(entityNotice.GetString("IsAll"));
    }
Esempio n. 2
0
        private void LoadData()
        {
            //对通知标题的个性化判断
            if (this.up_sPMNameLower != "tianyangoa")
            {
                this.trNotice.Visible = false;
            }
            else
            {
                if (Request["DocType"].ToString() == "99")
                {
                    this.trNotice.Visible = false;
                }
                else
                {
                    this.trNotice.Visible = true;
                }
                PageFacade.LoadDictionarySelect(this.DDLNoticeClass, "通知类型", "");//通知类别改成通知类型
            }

            switch (strAction.ToUpper())
            {
            case "INSERT":
                this.lblTitle.Text = "新增公告";
                this.htType.Value  = Request["DocType"].ToString();
                break;

            case "MODIFY":
                //标题
                this.lblTitle.Text = "修改公告";
                EntityData entityNotice = RemindDAO.GetNoticeByCode(this.strNoticeCode);
                this.DDLNoticeClass.Value = System.Web.HttpUtility.HtmlEncode(entityNotice.GetString("NoticeClass"));    //测试新增代码
                this.txtTitle.Value       = System.Web.HttpUtility.HtmlEncode(entityNotice.GetString("Title"));
                this.taContent.Value      = StringRule.FormartOutput(entityNotice.GetString("Content"));
                //this.htType.Value = entityNotice.GetString("Type");
                this.LoadUser(entityNotice.GetString("IsAll"));
                break;
            }
        }
    /// ****************************************************************************
    /// <summary>
    /// 数据加载
    /// </summary>
    /// ****************************************************************************
    private void LoadData(bool Flag)
    {
        RmsPM.BLL.BiddingConditionFile cBiddingConditionFile = new RmsPM.BLL.BiddingConditionFile();
        if (this.ApplicationCode != "")
        {
            this.BiddingConditionFileCode = this.ApplicationCode;
        }
        else if (this.BiddingConditionFileCode != "")
        {
            this.ApplicationCode = this.BiddingConditionFileCode;
        }


        if (this.ApplicationCode != "")
        {
            cBiddingConditionFile.BiddingConditionFileCode = this.ApplicationCode;
            EntityData entitydata = RmsPM.BLL.BiddingConditionFile.GetBiddingConditionFileByCode(this.ApplicationCode);

            if (entitydata.HasRecord())
            {
                this.BiddingConditionFileState = entitydata.GetString("state");
                this.BiddingCode = entitydata.GetString("BiddingCode");
                if (Flag)
                {
                    RmsPM.BLL.Bidding cBidding = new RmsPM.BLL.Bidding();
                    cBidding.BiddingCode = this.BiddingCode;
                    string LinkUrl = "<a onclick=OpenLargeWindow('../BiddingManage/biddingmodify.aspx?BiddingCode=" + this.BiddingCode + "&State=edit&ProjectCode=" + cBidding.ProjectCode + "','ZD_BiddingConditionFile3')>" + cBidding.Title + "</a>";
                    //this.tdBiddingTitle.InnerHtml = cBidding.Title;
                    this.txtBiddingTitle.InnerHtml = LinkUrl;
                    this.txtProjectName.InnerHtml  = RmsPM.BLL.ProjectRule.GetProjectName(cBidding.ProjectCode);


                    this.TxtBiddingConditionFileName.Value = entitydata.GetString("name");
                    this.TxtNumber.Value = entitydata.GetString("BiddingConditionFileNumber");
                    this.tdBiddingConditionFileState1.InnerHtml = RmsPM.BLL.BiddingConditionFile.GetBiddingConditionFileStatusName(BiddingConditionFileState);

                    this.TxtZBFW.Text = StringRule.FormartOutput(cBiddingConditionFile.Zbfw);
                    this.TxtJSYQ.Text = StringRule.FormartOutput(cBiddingConditionFile.Jsxq);
                    this.TxtZLBZ.Text = StringRule.FormartOutput(cBiddingConditionFile.Zlbz);
                    this.TxtGQ.Text   = StringRule.FormartOutput(cBiddingConditionFile.Gq);
                    this.TxtRCTJ.Text = StringRule.FormartOutput(cBiddingConditionFile.Rctj);
                    this.TxtSHFW.Text = StringRule.FormartOutput(cBiddingConditionFile.Shfw);
                }
                else
                {
                    RmsPM.BLL.Bidding cBidding = new RmsPM.BLL.Bidding();
                    cBidding.BiddingCode = this.BiddingCode;
                    string LinkUrl = "<a onclick=OpenLargeWindow('../BiddingManage/biddingmodify.aspx?BiddingCode=" + this.BiddingCode + "&State=edit&ProjectCode=" + cBidding.ProjectCode + "','ZD_BiddingConditionFile1')>" + cBidding.Title + "</a>";
                    //this.tdBiddingTitle.InnerHtml = cBidding.Title;
                    this.tdBiddingTitle.InnerHtml = LinkUrl;
                    this.tdProjectName.InnerHtml  = RmsPM.BLL.ProjectRule.GetProjectName(cBidding.ProjectCode);


                    this.TdBiddingConditionFileName.InnerHtml = entitydata.GetString("name");
                    this.TdNumber.InnerHtml = entitydata.GetString("BiddingConditionFileNumber");
                    this.tdBiddingConditionFileState2.InnerHtml = RmsPM.BLL.BiddingConditionFile.GetBiddingConditionFileStatusName(BiddingConditionFileState);

                    this.lblZBFW.Text = StringRule.FormartOutput(cBiddingConditionFile.Zbfw).Replace("\n", "<br />");
                    this.lblJSYQ.Text = StringRule.FormartOutput(cBiddingConditionFile.Jsxq).Replace("\n", "<br />");
                    this.lblZLBZ.Text = StringRule.FormartOutput(cBiddingConditionFile.Zlbz).Replace("\n", "<br />");
                    this.lblGQ.Text   = StringRule.FormartOutput(cBiddingConditionFile.Gq).Replace("\n", "<br />");
                    this.lblRCTJ.Text = StringRule.FormartOutput(cBiddingConditionFile.Rctj).Replace("\n", "<br />");
                    this.lblSHFW.Text = StringRule.FormartOutput(cBiddingConditionFile.Shfw).Replace("\n", "<br />");
                }
            }
            this.ApplicationTitle = cBiddingConditionFile.Name;
            entitydata.Dispose();
        }
        else
        {
            RmsPM.BLL.Bidding cBidding = new RmsPM.BLL.Bidding();
            cBidding.BiddingCode = this.BiddingCode;
            string LinkUrl = "<a onclick=OpenLargeWindow('../BiddingManage/biddingmodify.aspx?BiddingCode=" + this.BiddingCode + "&State=edit&ProjectCode=" + cBidding.ProjectCode + "','ZD_BiddingConditionFile2')>" + cBidding.Title + "</a>";
            //this.tdBiddingTitle.InnerHtml = cBidding.Title;
            this.txtBiddingTitle.InnerHtml = LinkUrl;
            this.txtProjectName.InnerHtml  = RmsPM.BLL.ProjectRule.GetProjectName(cBidding.ProjectCode);
        }
    }