Example #1
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            _alertConst = new AlertConst(this.languageComponent1);
            this.cmdAddUser.Attributes["onclick"] = "document.getElementById('stbUser$ctl02').click();";
            this.cmdSave.Attributes["onclick"]    = "if(document.getElementById('lstUser').innerText != '' && document.getElementById('chbMailNotify').checked == false)"
                                                    + " { return confirm('"
                                                    + this.languageComponent1.GetString("$If_AlertBill_Mail")                                            //"选择了邮件接收人,但没有勾选邮件通知,是否继续?"
                                                    + "');}";
            //_itemcode = Request.QueryString["itemcode"];
            _alerttype = Request.QueryString["alerttype"];
            //_alertitem = Request.QueryString["alertitem"];
            _billId = int.Parse(Request.QueryString["billid"].ToString());

            if (this._alerttype == AlertType_Old.ResourceNG)
            {
                isResourceNG = true;
            }
            //if(isResourceNG)
            //{
            //	_rescode = Request.QueryString["rescode"];
            //	_ecg2ec = Request.QueryString["ecg2ec"];
            //}

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

                this.lblAlertInfo.Text = this._alertConst.GetTemplateHelp(this.languageComponent1);
                LoadData();
            }
        }
Example #2
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";
        }