Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            UserId = Master.userInfo.UserId;   //
            if (!this.IsPostBack)
            {
                initLabel();
                bindTable(null, DEFAULT_ROWS);
                setColumnWidth();
            }

            iSMTLineSpeed = ServiceAgent.getInstance().GetMaintainObjectByName<SMTLineSpeed>(WebConstant.SMTLineSpeed);
        }
        catch (FisException ex)
        {
            showErrorMessage(ex.mErrmsg);
            bindTable(null, DEFAULT_ROWS);
            //this.hidRecordCount.Value = "0";
        }
        catch (Exception ex)
        {
            showErrorMessage(ex.Message);
            bindTable(null, DEFAULT_ROWS);
            //this.hidRecordCount.Value = "0";
        }
        ScriptManager.RegisterStartupScript(this.updatePanel, typeof(System.Object), "InitControl", "initContorls();", true);
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            iSMTLineSpeed = ServiceAgent.getInstance().GetMaintainObjectByName<SMTLineSpeed>(WebConstant.SMTLineSpeed);

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

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

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