示例#1
0
        void Edit(Invoice inv)
        {
            //var intent = new Intent (this, typeof(EditInvoice));
            var intent = ActivityManager.GetActivity <EditInvoice>(this.ApplicationContext);

            intent.PutExtra("invoiceno", inv.invno);
            intent.PutExtra("trxtype", inv.trxtype);
            StartActivity(intent);
        }
示例#2
0
        void ListView_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e)
        {
            Invoice item   = listData.ElementAt(e.Position);
            var     intent = ActivityManager.GetActivity <CashItemActivity>(this.ApplicationContext);

            intent.PutExtra("invoiceno", item.invno);
            intent.PutExtra("custcode", item.custcode);
            StartActivity(intent);
        }
示例#3
0
        void OnListItemClick(object sender, AdapterView.ItemClickEventArgs e)
        {
            Invoice item = listData.ElementAt(e.Position);
            //var intent = new Intent(this, typeof(InvItemActivity));
            var intent = ActivityManager.GetActivity <InvItemActivity>(this.ApplicationContext);

            intent.PutExtra("invoiceno", item.invno);
            intent.PutExtra("custcode", item.custcode);
            StartActivity(intent);
        }
示例#4
0
        void ShowItemEntry(DelOrder so, string[] codes)
        {
            //var intent = new Intent (this, typeof(DOEntryActivity));
            var intent = ActivityManager.GetActivity <DOEntryActivity>(this.ApplicationContext);

            intent.PutExtra("invoiceno", so.dono);
            intent.PutExtra("customer", codes [1].Trim());
            intent.PutExtra("itemuid", "-1");
            intent.PutExtra("editmode", "NEW");
            StartActivity(intent);
        }
示例#5
0
        private void BacktoMainMenu()
        {
            if (!IsSave)
            {
                DeleteInv();
            }

            var intent = ActivityManager.GetActivity <MainActivity>(this.ApplicationContext);

            StartActivity(intent);
        }
示例#6
0
		void ShowItemEntry (CNNote inv, string[] codes)
		{
			//var intent = new Intent (this, typeof(CNEntryActivity)); //need to change
			var intent =ActivityManager.GetActivity<CNEntryActivityEx>(this.ApplicationContext);
			intent.PutExtra ("invoiceno", inv.cnno);
			intent.PutExtra ("customer", codes [1].Trim ());
			intent.PutExtra ("custcode",codes [0].Trim ());
			intent.PutExtra ("itemuid", "-1");
			intent.PutExtra ("editmode", "NEW");
			StartActivity (intent);
		}
示例#7
0
        private void NewItem(string sono)
        {
            var intent = ActivityManager.GetActivity <SOEntryActivityEx>(this.ApplicationContext);

            intent.PutExtra("invoiceno", sono);
            intent.PutExtra("itemuid", "-1");
            intent.PutExtra("editmode", "NEW");
            intent.PutExtra("customer", CUSTNAME);
            intent.PutExtra("custcode", CUSTCODE);
            StartActivity(intent);
        }
示例#8
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            if (!((GlobalvarsApp)this.Application).ISLOGON)
            {
                Finish();
            }
            SetTitle(Resource.String.title_doitems);
            pathToDatabase = ((GlobalvarsApp)this.Application).DATABASE_PATH;
            rights         = Utility.GetAccessRights(pathToDatabase);

            SetContentView(Resource.Layout.InvDtlView);
            dono     = Intent.GetStringExtra("invoiceno") ?? "AUTO";
            CUSTCODE = Intent.GetStringExtra("custcode") ?? "AUTO";
            EDITMODE = Intent.GetStringExtra("editmode") ?? "AUTO";

            isNotAllowEditAfterPrinted = DataHelper.GetDelOderPrintStatus(pathToDatabase, dono, rights);
            Button       butNew = FindViewById <Button> (Resource.Id.butnewItem);
            LinearLayout lly    = FindViewById <LinearLayout> (Resource.Id.linearLayoutTitle);

            if (lly != null)
            {
                lly.Visibility = ViewStates.Gone;
            }
            butNew.Click += (object sender, EventArgs e) => {
                NewItem(dono);
            };
            if (isNotAllowEditAfterPrinted)
            {
                butNew.Enabled = false;
            }

            Button butInvBack = FindViewById <Button> (Resource.Id.butInvItmBack);

            butInvBack.Click += (object sender, EventArgs e) => {
                if (EDITMODE.ToLower() == "new")
                {
                    DeleteDOWithEmptyDOitem();
                }
                //StartActivity(typeof(DelOrderActivity));
                var intent = ActivityManager.GetActivity <DelOrderActivity>(this.ApplicationContext);
                StartActivity(intent);
            };


            populate(listData);
            listView            = FindViewById <ListView> (Resource.Id.invitemList);
            listView.ItemClick += OnListItemClick;
            //listView.Adapter = new CusotmItemListAdapter(this, listData);
            SetViewDlg viewdlg = SetViewDelegate;

            listView.Adapter = new GenericListAdapter <DelOrderDtls> (this, listData, Resource.Layout.InvDtlItemView, viewdlg);
        }
示例#9
0
        private void NewItem(string dono)
        {
            //var intent = new Intent(this, typeof(DOEntryActivity));
            var intent = ActivityManager.GetActivity <DOEntryActivity>(this.ApplicationContext);

            intent.PutExtra("invoiceno", dono);
            intent.PutExtra("itemuid", "-1");
            intent.PutExtra("editmode", "NEW");
            intent.PutExtra("customer", CUSTNAME);
            intent.PutExtra("custcode", CUSTCODE);
            StartActivity(intent);
        }
示例#10
0
        void Edit(DelOrderDtls so)
        {
            //var intent = new Intent(this, typeof(DOEntryActivity));
            var intent = ActivityManager.GetActivity <DOEntryActivity>(this.ApplicationContext);

            intent.PutExtra("invoiceno", so.dono);
            intent.PutExtra("itemuid", so.ID.ToString());
            intent.PutExtra("editmode", "EDIT");
            intent.PutExtra("customer", CUSTNAME);
            intent.PutExtra("custcode", CUSTCODE);
            StartActivity(intent);
        }
示例#11
0
        void Edit(CNNoteDtls inv)
        {
            //var intent = new Intent(this, typeof(CNEntryActivity));
            var intent = ActivityManager.GetActivity <CNEntryActivityEx>(this.ApplicationContext);

            intent.PutExtra("invoiceno", inv.cnno);
            intent.PutExtra("itemuid", inv.ID.ToString());
            intent.PutExtra("editmode", "EDIT");
            intent.PutExtra("customer", CUSTNAME);
            intent.PutExtra("custcode", CUSTCODE);
            StartActivity(intent);
        }
示例#12
0
        void ShowItemEntry(Invoice inv, string[] codes)
        {
            string COMPCODE = ((GlobalvarsApp)this.Application).COMPANY_CODE;
            var    intent   = ActivityManager.GetActivity <EntryActivityEx>(this.ApplicationContext);

            //var intent = new Intent (this, typeof(EntryActivity));

            intent.PutExtra("trxtype", inv.trxtype);
            intent.PutExtra("invoiceno", inv.invno);
            intent.PutExtra("customer", codes [1].Trim());
            intent.PutExtra("custcode", codes [0].Trim());
            intent.PutExtra("itemuid", "-1");
            intent.PutExtra("editmode", "NEW");
            StartActivity(intent);
        }
示例#13
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            if (!((GlobalvarsApp)this.Application).ISLOGON)
            {
                Finish();
            }
            SetContentView(Resource.Layout.InvDtlView);

            invno    = Intent.GetStringExtra("invoiceno") ?? "AUTO";
            CUSTCODE = Intent.GetStringExtra("custcode") ?? "AUTO";


            SetTitle(Resource.String.title_cashitems);
            pathToDatabase = ((GlobalvarsApp)this.Application).DATABASE_PATH;
            COMPCODE       = ((GlobalvarsApp)this.Application).COMPANY_CODE;
            rights         = Utility.GetAccessRights(pathToDatabase);



            isNotAllowEditAfterPrinted = DataHelper.GetInvoicePrintStatus(pathToDatabase, invno, rights);
            txtbarcode            = FindViewById <EditText> (Resource.Id.txtbarcode);
            txtbarcode.Visibility = ViewStates.Gone;
            Button butNew = FindViewById <Button> (Resource.Id.butnewItem);

            butNew.Visibility = ViewStates.Gone;


            Button butInvBack = FindViewById <Button> (Resource.Id.butInvItmBack);

            butInvBack.Click += (object sender, EventArgs e) => {
                Intent intent = ActivityManager.GetActivity <CashBillListing> (this.ApplicationContext);
                StartActivity(intent);
            };

            GetData();
            populate(listData);
            listView = FindViewById <ListView> (Resource.Id.invitemList);
            SetViewDlg viewdlg = SetViewDelegate;

            listView.Adapter = new GenericListAdapter <InvoiceDtls> (this, listData, Resource.Layout.InvDtlItemViewCS, viewdlg);
        }
示例#14
0
//		private void butCashClick(object sender,EventArgs e)
//		{
//			var intent =ActivityManager.GetActivity<CashActivity>(this.ApplicationContext);
//			StartActivity(intent);
//		}
//

        void ButPOS_Click(object sender, EventArgs e)
        {
            var intent = ActivityManager.GetActivity <POSSalesActivity>(this.ApplicationContext);

            StartActivity(intent);
        }
示例#15
0
        private void butClick(object sender, EventArgs e)
        {
            var intent = ActivityManager.GetActivity <InvoiceActivityEx>(this.ApplicationContext);

            StartActivity(intent);
        }
示例#16
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            if (!((GlobalvarsApp)this.Application).ISLOGON)
            {
                Finish();
            }
            SetContentView(Resource.Layout.InvDtlView);
            TRXTYPE  = Intent.GetStringExtra("trxtype") ?? "CASH";
            invno    = Intent.GetStringExtra("invoiceno") ?? "AUTO";
            CUSTCODE = Intent.GetStringExtra("custcode") ?? "AUTO";
            EDITMODE = Intent.GetStringExtra("editmode") ?? "AUTO";

            if (TRXTYPE == "CASH")
            {
                SetTitle(Resource.String.title_cashitems);
            }
            else
            {
                SetTitle(Resource.String.title_invoiceitems);
            }
            pathToDatabase = ((GlobalvarsApp)this.Application).DATABASE_PATH;
            COMPCODE       = ((GlobalvarsApp)this.Application).COMPANY_CODE;
            rights         = Utility.GetAccessRights(pathToDatabase);



            isNotAllowEditAfterPrinted = DataHelper.GetInvoicePrintStatus(pathToDatabase, invno, rights);
            txtbarcode            = FindViewById <EditText> (Resource.Id.txtbarcode);
            txtbarcode.Visibility = ViewStates.Visible;
            Button butNew = FindViewById <Button> (Resource.Id.butnewItem);

            butNew.Click += (object sender, EventArgs e) => {
                NewItem(invno);
            };
            if (isNotAllowEditAfterPrinted)
            {
                butNew.Enabled = false;
            }
            if (!rights.InvAllowAdd)
            {
                butNew.Enabled = false;
            }

            Button butInvBack = FindViewById <Button> (Resource.Id.butInvItmBack);

            butInvBack.Click += (object sender, EventArgs e) => {
                Invoice temp = new Invoice();
                UpdateInvoiceAmount(invno, ref temp);

                if (EDITMODE.ToLower() == "new")
                {
                    DeleteInvWithEmptyInovItem();
                }
                Intent intent = null;
                if (temp.trxtype == "CASH")
                {
                    intent = ActivityManager.GetActivity <CashActivity>(this.ApplicationContext);
                }
                else
                {
                    intent = ActivityManager.GetActivity <InvoiceActivity>(this.ApplicationContext);
                }

                StartActivity(intent);
            };

            txtbarcode.SetOnKeyListener(this);
            txtbarcode.InputType = 0;
            GetData();
            populate(listData);
            listView            = FindViewById <ListView> (Resource.Id.invitemList);
            listView.ItemClick += OnListItemClick;
            //listView.Adapter = new CusotmItemListAdapter(this, listData);
            SetViewDlg viewdlg = SetViewDelegate;

            listView.Adapter = new GenericListAdapter <InvoiceDtls> (this, listData, Resource.Layout.InvDtlItemViewCS, viewdlg);
        }