Esempio n. 1
0
        private void bindCurrencyAll( KeyCurrency c, IList currencyAll )
        {
            set( "c.Name", c.Name );
            set( "c.Unit", c.Unit );
            set( "c.InitValue", c.InitValue );
            set( "c.EditUrl", to( EditKeyCurrency ) );
            set( "c.IsShow", (c.IsShow == 1) ? "√" : "×" );
            set( "c.CanRate", (c.CanRate == 1) ? "√" : "×" );

            IBlock block = getBlock( "list" );
            foreach (Currency currency in currencyAll) {
                block.Set( "s.Name", currency.Name );
                block.Set( "s.Unit", currency.Unit );
                block.Set( "s.ExchangeRate", currency.ExchangeRate );
                block.Set( "s.InitValue", currency.InitValue );
                block.Set( "s.IsShow", (currency.IsShow == 1) ? "√" : "×" );
                block.Set( "s.CanDeal", (currency.CanDeal == 1) ? "√" : "×" );
                block.Set( "s.CanRate", (currency.CanRate == 1) ? "√" : "×" );
                block.Set( "s.SetActionUrl", to( EditCurrency, currency.Id ) );

                String deleteLink = "";
                if (currency.CanDelete == 1) {
                    deleteLink = string.Format( "<a href=\"{0}\" class=\"deleteCmd\">" + lang( "delete" ) + "</a>", to( Delete, currency.Id ) );
                }
                block.Set( "s.DeleteUrl", deleteLink );
                block.Next();
            }
        }
 private void bindKeyCurrencyEdit( KeyCurrency c ) {
     set( "c.Name", c.Name );
     set( "c.Unit", c.Unit );
     set( "c.InitValue", c.InitValue );
     set( "c.IsShow", (c.IsShow == 1) ? "checked='checked'" : "" );
     set( "c.CanRate", (c.CanRate == 1) ? "checked='checked'" : "" );
 }