コード例 #1
0
ファイル: PrintInvoice.cs プロジェクト: Samurayi/WaiterApp2
        public List <string> Print(string fileName)
        {
            this.fileName = fileName + " invoice";
            SaveAndLoad.DeleteText(this.fileName);
            itemList = ItemPrice.OrderWiev(fileName).ToList();


            return(itemList);
        }
コード例 #2
0
        protected override void OnResume()
        {
            base.OnResume();
            var createAdd  = FindViewById <Button>(Resource.Id.createAdd);
            var itemList   = FindViewById <ListView>(Resource.Id.orderView);
            var closeOrder = FindViewById <Button>(Resource.Id.closeOrder);
            var viewLast   = FindViewById <Button>(Resource.Id.viewLast);

            string[] order = ItemPrice.OrderWiev(ItemPrice.tableFile + tNumber);

            itemList.Adapter = new ArrayAdapter <string>(this, Android.Resource.Layout.SimpleListItem1, order);
            if (itemList.Adapter.Count == 0)
            {
                createAdd.Text       = "Create new order";
                closeOrder.Clickable = false;
            }
            else
            {
                createAdd.Text       = "Add item";
                closeOrder.Clickable = true;
            }
        }
コード例 #3
0
        protected override void OnResume()
        {
            base.OnResume();
            Button addNew   = FindViewById <Button>(Resource.Id.addNew);
            Button mdItem   = FindViewById <Button>(Resource.Id.mdItem);
            var    listview = FindViewById <ListView>(Resource.Id.itemView);

            listview.Adapter = new ArrayAdapter <String>(this, Android.Resource.Layout.SimpleListItem1, ItemPrice.PriceListLines("priceList.txt"));
        }
コード例 #4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.priceList);


            Button addNew   = FindViewById <Button>(Resource.Id.addNew);
            Button mdItem   = FindViewById <Button>(Resource.Id.mdItem);
            var    listview = FindViewById <ListView>(Resource.Id.itemView);

            //SaveAndLoad.DeleteText("priceList.txt");

            /*ItemPrice kava = new ItemPrice("Kava", 1);
             * ItemPrice kavaMleko = new ItemPrice("Kava z mlekom", 1.2);
             * ItemPrice kavaSmetana = new ItemPrice("Kava s smetano", 1.4);
             * kava.WriteToFile();
             * kavaMleko.WriteToFile();
             * kavaSmetana.WriteToFile();
             */


            listview.Adapter = new ArrayAdapter <String>(this, Android.Resource.Layout.SimpleListItem1, ItemPrice.PriceListLines("priceList.txt"));

            addNew.Click += (object sender, EventArgs e) =>
            {
                var intent = new Intent(this, typeof(addNew));
                StartActivity(intent);
            };

            mdItem.Click += (object sender, EventArgs e) =>
            {
                var intent = new Intent(this, typeof(Modify));
                StartActivity(intent);
            };
        }