protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            iPartTypeAttribute = ServiceAgent.getInstance().GetMaintainObjectByName<IPartTypeAttribute>(WebConstant.PartTypeAttributeObjet);

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

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

                if (enabled)
                {
                    initPartTypeAttributeList();
                }
                else
                {
                    this.drpPartTypeAttributeList.Items.Add(new ListItem("", ""));
                }
            }
        }
        catch (FisException ex)
        {
            showCmbErrorMessage(ex.mErrmsg);
        }
        catch (Exception ex)
        {
            showCmbErrorMessage(ex.Message);
        }
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {

        try
        {
            isPartTypeLoad = false;
            isSiteLoad = false;
            isCustLoad = false;
            this.cmbMaintainPartType.InnerDropDownList.Load += new EventHandler(cmbPartType_Load);
            this.CmbMaintainPartTypeSite.InnerDropDownList.Load += new EventHandler(cmbPartTypeSite_Load);
            this.CmbMaintainPartTypeCust.InnerDropDownList.Load += new EventHandler(cmbPartTypeCust_Load);
            iPartTypeAttribute = ServiceAgent.getInstance().GetMaintainObjectByName<IPartTypeAttribute>(WebConstant.PartTypeAttributeObjet);

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

            if (!this.IsPostBack)
            {
                userName = Master.userInfo.UserId;
                this.HiddenUserName.Value = userName;
                initLabel();
                ShowListByPartType();
            }
            ScriptManager.RegisterStartupScript(this.updatePanelAll, typeof(System.Object), "InitControl", "initControls();", true);
        }
        catch (FisException ex)
        {
            showErrorMessage(ex.mErrmsg);
        }
        catch (Exception ex)
        {
            showErrorMessage(ex.Message);
        }
    }