Пример #1
0
	public static Sybase.PowerBuilder.PBDecimal f_getquote(Sybase.PowerBuilder.PBString as_symbol)
	{
		#line hidden
		c__n_logger l_logger = null;
		Sybase.PowerBuilder.PBDecimal ldc_price = new Sybase.PowerBuilder.PBDecimal(0m);
		Sybase.PowerBuilder.PBException e = null;
		try
		{
			try
			{
				#line 7
				ldc_price.AssignFrom(c__stocktrader.GetCurrentApplication().gn_controller.of_get_current_price(as_symbol));
				#line hidden
				#line 8
				return ldc_price;
				#line hidden
			}
			catch (System.DivideByZeroException)
			{
				Sybase.PowerBuilder.PBRuntimeError.Throw(Sybase.PowerBuilder.RuntimeErrorCode.RT_R0001);
				throw new System.Exception();
			}
			catch (System.NullReferenceException)
			{
				Sybase.PowerBuilder.PBRuntimeError.Throw(Sybase.PowerBuilder.RuntimeErrorCode.RT_R0002);
				throw new System.Exception();
			}
			catch (System.IndexOutOfRangeException)
			{
				Sybase.PowerBuilder.PBRuntimeError.Throw(Sybase.PowerBuilder.RuntimeErrorCode.RT_R0003);
				throw new System.Exception();
			}
		}
		#line 9
		catch (Sybase.PowerBuilder.PBExceptionE __PB_TEMP_e__temp)
		#line hidden
		{
			e = __PB_TEMP_e__temp.E;
			#line 10
			l_logger = (c__n_logger)Sybase.PowerBuilder.WPF.PBSession.CurrentSession.CreateInstance(typeof(c__n_logger), 0);
			#line hidden
			#line 11
			l_logger.of_log(Sybase.PowerBuilder.PBFunction_Object.ClassName_FO(), e.GetMessage());
			#line hidden
			#line 12
			Sybase.PowerBuilder.WPF.PBSession.CurrentSession.DestroyObject(l_logger);
			#line hidden
		}
		return Sybase.PowerBuilder.PBDecimal.DefaultValue;
	}
Пример #2
0
	public override void ue_setstate()
	{
		#line hidden
		Sybase.PowerBuilder.PBLong lrows = Sybase.PowerBuilder.PBLong.DefaultValue;
		Sybase.PowerBuilder.PBLong i = Sybase.PowerBuilder.PBLong.DefaultValue;
		Sybase.PowerBuilder.PBLong j = Sybase.PowerBuilder.PBLong.DefaultValue;
		Sybase.PowerBuilder.PBDecimal ldc_price = new Sybase.PowerBuilder.PBDecimal(0m);
		#line 1
		base.ue_setstate();
		#line hidden
		#line 1
		iu_portfolio_piechart.Visible = new Sybase.PowerBuilder.PBBoolean(false);
		#line hidden
		#line 5
		dw_1.SetWSObject(c__stocktrader.GetCurrentApplication().gn_controller.of_get_wsconn());
		#line hidden
		#line 7
		lrows = dw_1.Retrieve((Sybase.PowerBuilder.PBAny)(((Sybase.PowerBuilder.PBAny)(c__stocktrader.GetCurrentApplication().gn_controller.of_get_profile_id()))));
		#line hidden
		#line 9
		for (i = ((Sybase.PowerBuilder.PBLong)(new Sybase.PowerBuilder.PBInt(1)));i <= lrows;i = i + 1)
		#line hidden
		{
				#line 10
				ldc_price.AssignFrom(c__stocktrader.GetCurrentApplication().gn_controller.of_get_current_price(dw_1.GetItemString(i, new Sybase.PowerBuilder.PBString("quoteid"))));
				#line hidden
				#line 11
				dw_1.SetItem(i, new Sybase.PowerBuilder.PBString("current_price_x"), (Sybase.PowerBuilder.PBAny)(((Sybase.PowerBuilder.PBAny)(ldc_price))));
				#line hidden
		}
		#line 14
		iu_portfolio_piechart.of_share((Sybase.PowerBuilder.Web.PBDataWindow)(dw_1), new Sybase.PowerBuilder.PBBoolean(true));
		#line hidden
	}
Пример #3
0
	public virtual c__n_holding_totals of_getholdingtotals(Sybase.PowerBuilder.PBString as_id)
	{
		#line hidden
		Sybase.PowerBuilder.PBLong lrows = Sybase.PowerBuilder.PBLong.DefaultValue;
		Sybase.PowerBuilder.PBLong i = Sybase.PowerBuilder.PBLong.DefaultValue;
		Sybase.PowerBuilder.PBDecimal ldc_price = new Sybase.PowerBuilder.PBDecimal(0m);
		#line 1
		ids_holdings.DataObject = new Sybase.PowerBuilder.PBString("d_holding_totals");
		#line hidden
		#line 2
		ids_holdings.SetWSObject(this.of_get_wsconn());
		#line hidden
		#line 4
		lrows = ids_holdings.Retrieve((Sybase.PowerBuilder.PBAny)(((Sybase.PowerBuilder.PBAny)(as_id))));
		#line hidden
		#line 10
		for (i = ((Sybase.PowerBuilder.PBLong)(new Sybase.PowerBuilder.PBInt(1)));i <= lrows;i = i + 1)
		#line hidden
		{
				#line 11
				ldc_price.AssignFrom(this.of_get_current_price(ids_holdings.GetItemString(i, new Sybase.PowerBuilder.PBString("quoteid"))));
				#line hidden
				#line 12
				ids_holdings.SetItem(i, new Sybase.PowerBuilder.PBString("current_price_x"), (Sybase.PowerBuilder.PBAny)(((Sybase.PowerBuilder.PBAny)(ldc_price))));
				#line hidden
		}
		#line 15
		i_totals.holding_count = (Sybase.PowerBuilder.PBLong)(ids_holdings.GetItemNumber((Sybase.PowerBuilder.PBLong)(new Sybase.PowerBuilder.PBInt(0)), new Sybase.PowerBuilder.PBString("holding_count")));
		#line hidden
		#line 16
		i_totals.holding_total = ids_holdings.GetItemNumber((Sybase.PowerBuilder.PBLong)(new Sybase.PowerBuilder.PBInt(0)), new Sybase.PowerBuilder.PBString("holding_total"));
		#line hidden
		#line 17
		i_totals.gain_total = ids_holdings.GetItemNumber((Sybase.PowerBuilder.PBLong)(new Sybase.PowerBuilder.PBInt(0)), new Sybase.PowerBuilder.PBString("gain_total"));
		#line hidden
		#line 19
		return i_totals;
		#line hidden
	}
	public virtual c__n_holding_totals of_getholdingtotals(Sybase.PowerBuilder.PBString as_id)
	{
		#line hidden
		Sybase.PowerBuilder.PBLong lrows = Sybase.PowerBuilder.PBLong.DefaultValue;
		Sybase.PowerBuilder.PBLong i = Sybase.PowerBuilder.PBLong.DefaultValue;
		Sybase.PowerBuilder.PBDecimal ldc_price = new Sybase.PowerBuilder.PBDecimal(0m);
		Sybase.PowerBuilder.PBDouble l_current_value = Sybase.PowerBuilder.PBDouble.DefaultValue;
		#line 5
		ids_holdings.DataObject = new Sybase.PowerBuilder.PBString("d_holding_totals");
		#line hidden
		#line 6
		ids_holdings.SetWSObject(this.of_get_wsconn());
		#line hidden
		#line 7
		lrows = ids_holdings.Retrieve((Sybase.PowerBuilder.PBAny)(((Sybase.PowerBuilder.PBAny)(as_id))));
		#line hidden
		#line 9
		for (i = ((Sybase.PowerBuilder.PBLong)(new Sybase.PowerBuilder.PBInt(1)));i <= lrows;i = i + 1)
		#line hidden
		{
				#line 10
				ldc_price.AssignFrom(this.of_get_current_price(ids_holdings.GetItemString(i, new Sybase.PowerBuilder.PBString("quoteid"))));
				#line hidden
				#line 11
				ids_holdings.SetItem(i, new Sybase.PowerBuilder.PBString("current_price"), (Sybase.PowerBuilder.PBAny)(((Sybase.PowerBuilder.PBAny)(ldc_price))));
				#line hidden
				#line 12
				l_current_value += ids_holdings.GetItemNumber(i, new Sybase.PowerBuilder.PBString("current_value"));
				#line hidden
		}
		#line 14
		i_totals.holding_count = lrows;
		#line hidden
		#line 15
		i_totals.holding_total = l_current_value;
		#line hidden
		#line 17
		return i_totals;
		#line hidden
	}