Beispiel #1
0
 void loadRestoInfo()
 {
     m_ImageLoader = new ImageLoaderMrGo(Activity, 800, 0);
     m_ImageLoader.DisplayImageLinearLayOut(m_resto.resto_url_image, this.View.FindViewById <LinearLayout>(Resource.Id.ll_background), -1);
     this.View.FindViewById <TextView>(Resource.Id.resto_name).Text    = m_resto.resto_name;
     this.View.FindViewById <TextView>(Resource.Id.resto_address).Text = m_resto.resto_address;
 }
Beispiel #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            // var act = Intent.GetSerializableExtra("resto");
            m_ImageLoader = new ImageLoaderMrGo(this, 800, 0);
            string resto_id        = Intent.GetStringExtra("resto_id");
            string resto_name      = Intent.GetStringExtra("resto_name");
            string resto_address   = Intent.GetStringExtra("resto_address");
            string resto_url_image = Intent.GetStringExtra("resto_url_image");

            m_member_id = Convert.ToInt32(Intent.GetStringExtra("member_id"));
            RestoService service = new RestoService(this);

            service.Execute("GetRestoByID", resto_id);

            MenuRestoService mnService = new MenuRestoService(this);

            mnService.Execute("GetMenuByRestoID", resto_id);

            //_friends = Util.GenerateFriends();
            //_friends.RemoveRange(0, _friends.Count - 2);
            //string title = Intent.GetStringExtra("Title");
            //string image = Intent.GetStringExtra("Image");

            resto_name = string.IsNullOrWhiteSpace(resto_name) ? "Resto" : resto_name;
            this.Title = resto_name;

            //if (string.IsNullOrWhiteSpace(resto_url_image))
            //    image = _friends[0].Image;


            m_ImageLoader.DisplayImageLinearLayOut(resto_url_image, this.FindViewById <LinearLayout>(Resource.Id.ll_background), -1);
            this.FindViewById <TextView>(Resource.Id.resto_name).Text    = resto_name;
            this.FindViewById <TextView>(Resource.Id.resto_address).Text = resto_address;

            m_menuGridSpesial = FindViewById <GridView>(Resource.Id.gridMenuSpesial);
            m_menuGridMinuman = FindViewById <GridView>(Resource.Id.gridMenuMinuman);
            m_menuGridMakanan = FindViewById <GridView>(Resource.Id.gridMenuMakanan);


            // grid.Adapter = new MonkeyAdapter(this, _friends);
            //m_menuGridSpesial.ItemClick += GridOnItemClick;
            //m_menuGridMinuman.ItemClick += GridOnItemClick;

            //set title here
            SupportActionBar.Title = Title;

            //   mBtnMenuMakanan = FindViewById<Button>(Resource.Id.btnMenuMakanan);
            //   mBtnMenuMinuman = FindViewById<Button>(Resource.Id.btnMenuMinuman);
            buttonPesan = FindViewById <Button>(Resource.Id.buttonPesan);

            buttonPesan.Text = m_member_id > 0 ? "PESAN" : "SILAHKAN LOGIN / SIGN UP UNTUK PESAN";
            // mBtnMenuMakanan.Click += MBtnMenuMakanan_Click;
            //  mBtnMenuMinuman.Click += MBtnMenuMinuman_Click;
            buttonPesan.Click += ButtonPesan_Click;
        }