コード例 #1
0
        private void initData()
        {
            var platformValue = Request.QueryString["Platform"];
            var platformType  = (Common.Enums.PlatformType) int.Parse(platformValue);
            var platform      = PlatformBase.GetPlatform(platformType);

            for (var i = 0; i < platform.AutoPayInterfaces.Count(); i++)
            {
                var ddlPayInterface = new DropDownList();
                foreach (var item in platform.AutoPayInterfaces)
                {
                    ddlPayInterface.Items.Add(new ListItem(item.GetDescription(), ((byte)item).ToString()));
                }
                ddlPayInterface.Items.Insert(0, new ListItem("-请选择-", ""));
                ddlPayInterface.ID = "ddlPayInterface_" + i;
                this.divPayInterface.Controls.Add(ddlPayInterface);
            }
            var companies = CompanyService.GetCompanies(CompanyType.Provider | CompanyType.Purchaser | CompanyType.Supplier, true);

            txtProviderCompany.SetCompanyType(CompanyType.Provider);
        }