示例#1
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            _alertConst = new AlertConst(this.languageComponent1);
            this.cmdAddProduct.Attributes["onclick"]   = "document.getElementById('sbProduct$ctl02').click();";
            this.cmdAddItem.Attributes["onclick"]      = "document.getElementById('stbItem$ctl02').click();";
            this.cmdAddUser.Attributes["onclick"]      = "document.getElementById('stbUser$ctl02').click();";
            this.cmdAddResource.Attributes["onclick"]  = "document.getElementById('stbResource$ctl02').click();";
            this.cmdAddErrorCode.Attributes["onclick"] = "document.getElementById('stbErrorCode$ctl02').click();";
            this.cmdSave.Attributes["onclick"]         = "if(document.getElementById('lstUser').innerText != '' && document.getElementById('chbMailNotify').checked == false)"
                                                         + " { return confirm('"
                                                         + languageComponent1.GetString("$If_AlertBill_Mail")                                               //"选择了邮件接收人,但没有勾选邮件通知,是否继续?"
                                                         + "');}";

            if (!IsPostBack)
            {
                // 初始化页面语言
                this.InitPageLanguage(this.languageComponent1, false);

                this.lblAlertInfo.Text = this._alertConst.GetTemplateHelp(this.languageComponent1);
                SetAlertMsg();
                this.dateValidDate.Text = DateTime.Now.ToShortDateString();

                OperatorBuilder.Build(this.drpOperator.Items, BenQGuru.eMES.AlertModel.AlertType_Old.NG, this._alertConst);

                this.rdbRes.Checked = true;
                this.rblAlertItem_SelectedIndexChanged(null, null);
            }
            if (this.rblAlertType.SelectedValue == "ResourceNG")
            {
                this.isResourceNG = true;
                this.ExecuteClientFunction("setResDisplay", "");
            }
            else
            {
                this.ExecuteClientFunction("setResUnDisplay", "");
            }

            //this.stbErrorCode.Tag = "这是测试的tag";
        }
示例#2
0
        //预警项次发发生改变事件
        protected void rblAlertType_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            //起点数,默认为可以输入,只有首件上线时,不可输入
            this.txtStartNum.ReadOnly = false;

            //只有不良率时,资源才有效
            this.rdbRes.Enabled = false;
            if (this.rblAlertType.SelectedValue == "NG")
            {
                if (this.rdbSegment.Checked)
                {
                    this.rdbSegment.Checked  = false;
                    this.rdbItemEdit.Checked = true;
                }
                this.rdbSegment.Enabled = false;

                this.rdbItemEdit.Enabled = true;
                this.rdbModel.Enabled    = true;
                this.rdbSS.Enabled       = true;
                this.rdbRes.Enabled      = true;
            }
            else if (this.rblAlertType.SelectedValue == "PPM" || this.rblAlertType.SelectedValue == "CPK" || this.rblAlertType.SelectedValue == "ResourceNG")
            {
                this.rdbSegment.Checked = false;
                this.rdbSegment.Enabled = false;
                this.rdbModel.Checked   = false;
                this.rdbModel.Enabled   = false;
                this.rdbSS.Checked      = false;
                this.rdbSS.Enabled      = false;

                this.rdbItemEdit.Enabled = true;
                this.rdbItemEdit.Checked = true;
                if (this.rblAlertType.SelectedValue == "ResourceNG")
                {
                    this.txtStartNum.Text     = "";
                    this.txtStartNum.ReadOnly = true;
                }
            }
            else if (this.rblAlertType.SelectedValue == "DirectPass")
            {
                if (this.rdbModel.Checked)
                {
                    this.rdbModel.Checked    = false;
                    this.rdbItemEdit.Checked = true;
                }
                this.rdbSegment.Enabled  = true;
                this.rdbItemEdit.Enabled = true;
                this.rdbModel.Enabled    = false;
                this.rdbSS.Enabled       = true;
            }
            else
            {
                this.rdbSegment.Checked = false;
                this.rdbSegment.Enabled = false;
                this.rdbSS.Checked      = false;
                this.rdbSS.Enabled      = false;
                this.rdbModel.Checked   = false;
                this.rdbModel.Enabled   = false;

                this.rdbItemEdit.Enabled  = true;
                this.rdbItemEdit.Checked  = true;
                this.txtStartNum.Text     = "";
                this.txtStartNum.ReadOnly = true;
            }

            rblAlertItem_SelectedIndexChanged(null, null);           //调用选择更改之后的事件

            OperatorBuilder.Build(this.drpOperator.Items, this.rblAlertType.SelectedValue, this._alertConst);

            this.drpOperator_SelectedIndexChanged(null, null);
        }