Esempio n. 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);
     }
 }
Esempio n. 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            iSelectData = ServiceAgent.getInstance().GetMaintainObjectByName<IDefectStation>(WebConstant.MaintainDefectStationObject);

            if (!this.IsPostBack)
            {
                if (isPercentage)
                {
                    if (Convert.ToInt32(width) > 100)
                    {
                        drpMaintainDefect.Width = Unit.Percentage(100);
                    }
                    else
                    {
                        drpMaintainDefect.Width = Unit.Percentage(Convert.ToDouble(width));
                    }
                }
                else
                {
                    drpMaintainDefect.Width = Unit.Parse(width);
                }

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

                if (enabled)
                {
                    initMaintainStation();
                }
                else
                {
                    this.drpMaintainDefect.Items.Add(new ListItem("", ""));
                }
            }
        }
        catch (FisException ex)
        {
            //showCmbErrorMessage(ex.mErrmsg);
        }
        catch (Exception ex)
        {
            //showCmbErrorMessage(ex.Message);
        }
    }
Esempio n. 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        iSelectData = (IRepairInfoMaintain)ServiceAgent.getInstance().GetMaintainObjectByName<IRepairInfoMaintain>(WebConstant.REPAIRINFOMAINTAIN);
        iDefectStation = (IDefectStation)ServiceAgent.getInstance().GetMaintainObjectByName<IACAdaptor>(WebConstant.MaintainDefectStationObject);
        MsgSelectOne = this.GetLocalResourceObject(Pre + "_MsgSelectOne").ToString();
        MsgDelConfirm = this.GetLocalResourceObject(Pre + "_MsgDelConfirm").ToString();
        MsgPreWC = this.GetLocalResourceObject(Pre + "_MsgPreWC").ToString();
        MsgCurWC = this.GetLocalResourceObject(Pre + "_MsgCurWC").ToString();
        MsgNextWC = this.GetLocalResourceObject(Pre + "_MsgNextWC").ToString();
        MsgDefectSel = this.GetLocalResourceObject(Pre + "_MsgDefectSel").ToString();
        MsgCauseSel = this.GetLocalResourceObject(Pre + "_MsgCauseSel").ToString();
        MsgNotFound = this.GetLocalResourceObject(Pre + "_MsgNotFound").ToString();
        if(!IsPostBack)
        {
            
            
            userName = Master.userInfo.UserId;
            this.HiddenUserName.Value = userName;
            List<DefectCodeStationInfo> defectLst = null;
            initLabel();
            try
            {
                initSelect();
                //defectLst = (List<DefectCodeStationInfo>)iDefectStation.GetDefectList();
            }
            catch (FisException fe)
            {
                showErrorMessage(fe.mErrmsg);
                return;
            }
            catch(Exception ee)
            {
                showErrorMessage(ee.Message);
                return;
            }

            //bindTable(defectLst, DEFAULT_ROWS);
            bindTable(null, DEFAULT_ROWS);
        }

    }