예제 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         iAssetRule = ServiceAgent.getInstance().GetMaintainObjectByName<IAssetRule>(WebConstant.MaintainAssetRuleObject);
         iDefectStation = ServiceAgent.getInstance().GetMaintainObjectByName<IDefectStation>(WebConstant.MaintainDefectStationObject);
         pmtMessage1 = this.GetLocalResourceObject(Pre + "_pmtMessage1").ToString();
         pmtMessage2 = this.GetLocalResourceObject(Pre + "_pmtMessage2").ToString();
         pmtMessage3 = this.GetLocalResourceObject(Pre + "_pmtMessage3").ToString();
         pmtMessage4 = this.GetLocalResourceObject(Pre + "_pmtMessage4").ToString();
         pmtMessage5 = this.GetLocalResourceObject(Pre + "_pmtMessage5").ToString();
         pmtMessage6 = this.GetLocalResourceObject(Pre + "_pmtMessage6").ToString();
         pmtMessage7 = this.GetLocalResourceObject(Pre + "_pmtMessage7").ToString();
         if (!this.IsPostBack)
         {
             userName = Master.userInfo.UserId; 
             this.HiddenUserName.Value = userName;
             initLabel();
             ShowList();
             InitTp();
         }
         ScriptManager.RegisterStartupScript(this.updatePanelAll, typeof(System.Object), "InitControl", "initControls();", true);
     }
     catch (FisException ex)
     {            
         showErrorMessage(ex.mErrmsg);
     }
     catch (Exception ex)
     {
         showErrorMessage(ex.Message);
     }
 }
예제 #2
0
 protected void btnAstTypeChange_ServerClick(Object sender, EventArgs e)
 {
     iAssetRule = ServiceAgent.getInstance().GetMaintainObjectByName<IAssetRule>(WebConstant.MaintainAssetRuleObject);
     InitCheckItems();
     InitAVPart();
     if (this.dCheckItemValue.Value != "")
     {
         ListItem selectedValue = this.cmbMaintainAssetRuleCheckItem.Items.FindByValue(this.dCheckItemValue.Value);
         if (selectedValue != null) 
         { 
             selectedValue.Selected = true;
         }
     }
     this.updatePanel2.Update();
     ScriptManager.RegisterStartupScript(this.updatePanelAll, typeof(System.Object), "ComBoxAssetRuleAstTypeChange", "DealHideWait();", true);            
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            iAssetRule = ServiceAgent.getInstance().GetMaintainObjectByName<IAssetRule>(WebConstant.MaintainAssetRuleObject);
            iDefectStation = ServiceAgent.getInstance().GetMaintainObjectByName<IDefectStation>(WebConstant.MaintainDefectStationObject);
            if (!this.IsPostBack)
            {
                if (isPercentage)
                {
                    if (Convert.ToInt32(width) > 100)
                    {
                        drpMaintainAssetRuleCheckStation.Width = Unit.Percentage(100);
                    }
                    else
                    {
                        drpMaintainAssetRuleCheckStation.Width = Unit.Percentage(Convert.ToDouble(width));
                    }
                }
                else
                {
                    drpMaintainAssetRuleCheckStation.Width = Unit.Parse(width);
                }

                this.drpMaintainAssetRuleCheckStation.CssClass = cssClass;
                this.drpMaintainAssetRuleCheckStation.Enabled = enabled;

                if (enabled)
                {
                    initMaintainAssetRuleCheckStation();
                }
                else
                {
                    this.drpMaintainAssetRuleCheckStation.Items.Add(new ListItem("", ""));
                }
            }
        }
        catch (FisException ex)
        {
            showCmbErrorMessage(ex.mErrmsg);
        }
        catch (Exception ex)
        {
            showCmbErrorMessage(ex.Message);
        }
    }