コード例 #1
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Android.OS.Bundle savedInstanceState)
        {
            View   ignored  = base.OnCreateView(inflater, container, savedInstanceState);
            View   view     = inflater.Inflate(Resource.Layout.page_resto_menu_mrrecommend, null);
            string resto_id = "1";
            //string resto_name = "Mr Recommend";
            //string resto_address = "Mr Go";
            //string resto_url_image = "";
            RestoService service = new RestoService(this);

            service.Execute("GetRestoByID", resto_id);

            MenuRestoService mnService = new MenuRestoService(this);

            mnService.Execute("GetMenuByRestoID", resto_id);

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

            buttonPesan = view.FindViewById <Button>(Resource.Id.buttonPesan);

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

            return(view);
        }
コード例 #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;
        }
コード例 #3
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");

            menu_foodtype = Intent.GetStringExtra("menu_foodtype");
            menuId        = Intent.GetStringExtra("menuId");
            menuJumlah    = Intent.GetStringExtra("menuJumlah");
            RestoService service = new RestoService(this);

            service.Execute("GetRestoByID", resto_id);
            MenuRestoService mnService = new MenuRestoService(this);

            if (menu_foodtype == "MAKANAN")
            {
                mnService.Execute("GetMenuMakananByRestoID", resto_id);
            }
            else
            {
                mnService.Execute("GetMenuMinumanByRestoID", resto_id);
            }
            resto_name = string.IsNullOrWhiteSpace(resto_name) ? "Resto" : resto_name;
            this.Title = resto_name;
            this.FindViewById <TextView>(Resource.Id.textViewJenis).Text = menu_foodtype == "MAKANAN" ? "Menu Makanan" : "Menu Minuman";

            m_menuGridSpesial = FindViewById <GridView>(Resource.Id.gridMenuMakanan);
            //m_menuGridMinuman = FindViewById<GridView>(Resource.Id.gridMenuMinuman);
            // grid.Adapter = new MonkeyAdapter(this, _friends);
            m_menuGridSpesial.ItemClick += GridOnItemClick;
            //m_menuGridMinuman.ItemClick += GridOnItemClick;
            //set title here
            SupportActionBar.Title = Title;
        }
コード例 #4
0
ファイル: RestoController.cs プロジェクト: Lucillers/skiworld
 public RestoController()
 {
     rs = new RestoService();
 }
コード例 #5
0
        //private void M_etSearch_EditorAction(object sender, EditorActionEventArgs e)
        //{
        //    if (e.ActionId == Android.Views.InputMethods.ImeAction.Search)
        //    {
        //        loadAllRestoBackgroudSearch();
        //    }
        //}
        //private void loadAllRestoBackgroudSearch()
        //{
        //    RestoService service = new RestoService(this);
        //    service.Execute("GetAllSearch", m_etSearch.Text);
        //}
        private void loadAllRestoBackgroud()
        {
            RestoService service = new RestoService(this);

            service.Execute("GetAllCategory");
        }
コード例 #6
0
        private void loadAllRestoBackgroud()
        {
            RestoService service = new RestoService(this);

            service.Execute("GetAllByCategory", restocategory_id.ToString());
        }