Esempio n. 1
0
        private void loading(string resultStringDr1)
        {
            DataSet  ds         = WCFDataRequest.ConvertJSON2DataSet(resultStringDr1);
            TextView textView14 = this.FindViewById <TextView>(Resource.Id.textView14);
            TextView textView15 = this.FindViewById <TextView>(Resource.Id.textView15);

            textView14.Text = FN(double.Parse(ds.Tables[0].Rows[0]["SalePrice"].ToString()).ToString());
            textView15.Text = FN(double.Parse(ds.Tables[0].Rows[0]["BuyPrice"].ToString()).ToString());


            TextView textView17 = this.FindViewById <TextView>(Resource.Id.textView17);
            TextView textView18 = this.FindViewById <TextView>(Resource.Id.textView18);

            textView17.Text = ds.Tables[0].Rows[1]["SalePrice"].ToString();
            textView18.Text = ds.Tables[0].Rows[1]["BuyPrice"].ToString();

            TextView textView23 = this.FindViewById <TextView>(Resource.Id.textView23);
            TextView textView24 = this.FindViewById <TextView>(Resource.Id.textView24);

            textView23.Text = FN(double.Parse(ds.Tables[0].Rows[2]["SalePrice"].ToString()).ToString());
            textView24.Text = FN(double.Parse(ds.Tables[0].Rows[2]["BuyPrice"].ToString()).ToString());

            TextView textView29 = this.FindViewById <TextView>(Resource.Id.textView29);
            TextView textView30 = this.FindViewById <TextView>(Resource.Id.textView30);

            textView29.Text = ds.Tables[0].Rows[3]["SalePrice"].ToString();
            textView30.Text = ds.Tables[0].Rows[3]["BuyPrice"].ToString();

            TextView textView35 = this.FindViewById <TextView>(Resource.Id.textView35);
            TextView textView36 = this.FindViewById <TextView>(Resource.Id.textView36);

            textView35.Text = FN(double.Parse(ds.Tables[0].Rows[4]["SalePrice"].ToString()).ToString());
            textView36.Text = FN(double.Parse(ds.Tables[0].Rows[4]["BuyPrice"].ToString()).ToString());

            TextView textView39 = this.FindViewById <TextView>(Resource.Id.textView39);
            string   strxml     = this.GetString(Resource.String.str8);
            string   HKD        = strxml + ds.Tables[1].Rows[0]["HKD"].ToString();

            textView39.Text = HKD;
        }
        private void loading(string resultStringDr1)
        {
            DataSet ds = WCFDataRequest.ConvertJSON2DataSet(resultStringDr1);

            gpListInfo = new List <GoldPriceInfo>();
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                gpListInfo.Add(new GoldPriceInfo()
                {
                    Id        = ds.Tables[0].Rows[i]["Id"].ToString(),
                    Fineness  = ds.Tables[0].Rows[i]["Fineness"].ToString(),
                    SalePrice = ds.Tables[0].Rows[i]["SalePrice"].ToString(),
                    BuyPrice  = ds.Tables[0].Rows[i]["BuyPrice"].ToString()
                });
            }
            gplistview = FindViewById <ListView>(Resource.Id.gplistview);
            GoldPriceInfoAdapter adapter = new GoldPriceInfoAdapter(this, gpListInfo);

            gplistview.Adapter = adapter;

            string HKD = ds.Tables[1].Rows[0]["HKD"].ToString();
        }