public Cart()
 {
     InitializeComponent();
     this.Title       = "Cart";
     cart.ItemsSource = c.GetList();
     total.Text       = c.GetTotal() + "";
 }
        public Cart()
        {
            InitializeComponent();
            this.Title           = "Cart";
            this.BackgroundImage = "background.png";
            CartQuery c = new CartQuery();


            cart.ItemsSource = c.GetList();
            total.Text       = c.GetTotal() + "";
        }
Esempio n. 3
0
        public CartPage()
        {
            InitializeComponent();
            this.BackgroundImage = "background.jpg";
            NavigationPage.SetHasBackButton(this, false);
            this.Title       = "My Cart";
            cart.ItemsSource = null;
            spUserName       = Convert.ToString(Application.Current.Properties["USERNAME"]);
            CartQuery cartQuery = new CartQuery();

            cart.ItemsSource = cartQuery.GetList(spUserName);
            total.Text       = cartQuery.GetTotal(spUserName) + "";
        }
Esempio n. 4
0
        public void delete_btn_Clicked(object sender, EventArgs e)
        {
            CartQuery        c = new CartQuery();
            SQLiteConnection s;

            s = DependencyService.Get <ISQLite>().GetConnection();
            s.Table <CartRecord>();
            s.DeleteAll <CartRecord>();
            cart.ItemsSource = update_Item;
            cart.ItemsSource = c.GetList();
            total.Text       = c.GetTotal() + "";

            TempTbl tbr = new TempTbl();

            //SQLiteConnection s;
            s = DependencyService.Get <ISQLite>().GetConnection();
            s.Table <TempTbl>();
            s.DeleteAll <TempTbl>();

            tablenow.Text = countremove;
        }
Esempio n. 5
0
        public void OnDelete(object sender, EventArgs e)
        {
            // ObservableCollection<CartRecord> MenuItem = new ObservableCollection<CartRecord>();

            CartQuery        c = new CartQuery();
            SQLiteConnection s;

            s = DependencyService.Get <ISQLite>().GetConnection();
            s.Table <CartRecord>();
            var mi = ((MenuItem)sender);

            DisplayAlert("Delete Context Action", mi.CommandParameter + " delete context action", "OK");
            s.Delete <CartRecord>(mi.CommandParameter);
            cart.ItemsSource = update_Item;
            cart.ItemsSource = c.GetList();
            total.Text       = c.GetTotal() + "";
            //Itemlist = new ObservableCollection<CartRecord>();



            //  ObservableCollection<CartQuery> cart;
        }
Esempio n. 6
0
        public Cart()
        {
            InitializeComponent();

            // cart.ItemsSource = update_Item;
            this.Title           = "Cart";
            this.BackgroundImage = "background.png";
            CartQuery c = new CartQuery();

            //cart.ItemsSource = update_Item;
            cart.ItemsSource = c.GetList();
            total.Text       = c.GetTotal() + "";

            var Itemlist = c.GetList();

            TableQuery       p = new TableQuery();
            SQLiteConnection s;

            s = DependencyService.Get <ISQLite>().GetConnection();
            s.Table <TempTbl>();
            // var mi = ((TableQuery)sender);
            //p.GetTblNam<TempTbl>(mi.CommandParameter);
            // TableQuery p = new TableQuery();

            //var pro = (mList.SelectedItem as TempTbl);
            // var tb1 = p.GetTableInfo("TableName1");
            //var count = s.ExecuteScalar<int>("SELECT Count(*) FROM TempTbl");

            // this counts all records in the database, it can be slow depending on the size of the database
            var count = s.ExecuteScalar <string>("SELECT TblName FROM TempTbl");

            // DisplayAlert("Order for Table", count, "OK");
            //x1.GetTblNam(tablenow.Text);
            //x1.GetTablelist() = tablenow.Text;
            //string x2 = tata.tablenume2();
            tablenow.Text = count;
            GC.Collect(1);
        }