Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            iVendorCode = ServiceAgent.getInstance().GetMaintainObjectByName<IVendorCode>(WebConstant.MaintainVendorCodeObject);

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

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

                if (enabled)
                {
                    initMaintainVendor();
                }
                else
                {
                    this.drpVendor.Items.Add(new ListItem("", ""));
                }
            }
        }
        catch (FisException ex)
        {
            //showCmbErrorMessage(ex.mErrmsg);
        }
        catch (Exception ex)
        {
            //showCmbErrorMessage(ex.Message);
        }
    }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            iVendorCode = ServiceAgent.getInstance().GetMaintainObjectByName<IVendorCode>(WebConstant.MaintainVendorCodeObject);

            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();
            pmtMessage8 = this.GetLocalResourceObject(Pre + "_pmtMessage8").ToString();
            pmtMessage9 = this.GetLocalResourceObject(Pre + "_pmtMessage9").ToString();
            pmtMessage10 = this.GetLocalResourceObject(Pre + "_pmtMessage10").ToString();

            if (!this.IsPostBack)
            {
                userName = Master.userInfo.UserId;
                this.HiddenUserName.Value = userName;
                initLabel();

                IList<VendorCodeDef> dataList = iVendorCode.GetAllVendorCodeList();
                bindTable(dataList, DEFAULT_ROWS);
                
            }
            this.cmbMaintainVendor.InnerDropDownList.SelectedIndexChanged += new EventHandler(CmbVendor_Selected);
            this.cmbMaintainVendor.InnerDropDownList.AutoPostBack = true;
            
        }
        catch (FisException ex)
        {
            showErrorMessage(ex.mErrmsg);
        }
        catch (Exception ex)
        {
            showErrorMessage(ex.Message);
        }
    }