Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            isPartTypeLoad = false;
            this.cmbMaintainPartType.InnerDropDownList.Load += new EventHandler(cmbPartType_Load);
            iBomDescrMaintain = ServiceAgent.getInstance().GetMaintainObjectByName<IBomDescrMaintain>(WebConstant.MaintainBomDescrObject);

            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();

            if (!this.IsPostBack)
            {
                userName = Master.userInfo.UserId;
                this.HiddenUserName.Value = userName;
                initLabel();
                bindTable(null, DEFAULT_ROWS);
            }
            ScriptManager.RegisterStartupScript(this.updatePanelAll, typeof(System.Object), "InitControl", "initControls();", true);
        }
        catch (FisException ex)
        {
            showErrorMessage(ex.mErrmsg);
        }
        catch (Exception ex)
        {
            showErrorMessage(ex.Message);
        }
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            iBomDescrMaintain = ServiceAgent.getInstance().GetMaintainObjectByName<IBomDescrMaintain>(WebConstant.MaintainBomDescrObject);

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

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

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