Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void rgStateTax_PreRender( object sender, EventArgs e )
- {
- if( rgStateTax.MasterTableView.IsItemInserted )
- {
- foreach( GridItem item in rgStateTax.Items )
- {
- item.Visible = false;
- }
- }
- if( rgStateTax.EditItems.Count > 0 )
- {
- foreach( GridDataItem item in rgStateTax.Items )
- {
- if( item != rgStateTax.EditItems[0] )
- {
- item.Visible = false;
- }
- }
- }
- ContentAdministrationServiceClient client = null;
- List<DCTaxRate> taxRate = null;
- try
- {
- client = new ContentAdministrationServiceClient();
- taxRate = client.GetTaxRatesByCountryIdAndLocationTypeName( locationId, "State" );
- client.Close();
- }
- catch( FaultException )
- {
- AbortClient(client);
- throw;
- }
- rgStateTax.DataSource = taxRate;
- rgStateTax.Rebind();
- }
- return taxRates.ToList();
- }
- public void GetByCountryIdAndLoactionTypeName( long countryId, string locationTypeName )
- {
- IBOTaxRateCollection iboTaxRates = new BOTaxRateCollection();
- iboTaxRates.GetByCountryIdAndLocationTypeName( countryId, locationTypeName );
- SetItems( iboTaxRates );
- }
- public void GetByCountryIdAndLocationTypeName( long countryId, string locationTypeName )
- {
- ISingleResult<TaxRate> taxRates = Database.TaxRateReadByCountryIdAndLocationTypeName( countryId, locationTypeName );
- PopulateCollection( taxRates );
- }
- <asp:DropDownList ID="dd_bound" runat="server" AppendDataBoundItems="True">
- <asp:ListItem Value="" Text="Select one..." />
- </asp:DropDownList>
Add Comment
Please, Sign In to add comment