예제 #1
0
 private void FnGetData()
 {
     mSelectedTransactionId            = Intent.GetIntExtra("selectedTransactionId", 0);
     mIsMultipay                       = Intent.GetBooleanExtra("isMultipay", false);
     mIsMultipayPreview                = Intent.GetBooleanExtra("isMultipayPreview", false);
     mMultipayPreviewIdList            = Intent.GetStringExtra("multipayPreviewIdList");
     mSettingsDataAccess               = new SettingsDataAccess();
     mTransactionsDataAccess           = new TransactionsDataAccess();
     mTransactionItemsDataAccess       = new TransactionItemsDataAccess();
     mRunnersDataAccess                = new RunnersDataAccess();
     mCustomersDataAccess              = new CustomersDataAccess();
     mRunnersMultipayRecordsDataAccess = new RunnersMultipayRecordsDataAccess();
     mReceiptSettings                  = mSettingsDataAccess.SelectTable()[0];
     mSelectedTransaction              = mIsMultipay ? null : mTransactionsDataAccess.SelectRecord(mSelectedTransactionId)[0];
     //mSelectedMultipayRecord = mIsMultipay ? mRunnersMultipayRecordsDataAccess.SelectRecord(mSelectedTransactionId)[0] : null;
     mSelectedMultipayRecord = new RunnersMultipayRecordsModel()
     {
         Id                  = 1,
         CashierName         = "Jepoy",
         TransactionDateTime = "2020-12-14 6:45",
         RunnerId            = 1,
         SubTotalAmount      = 45884,
         DiscountAmount      = 0,
         PaymentCashAmount   = 45884,
         PaymentCheckAmount  = 0,
         TransactionIds      = "#47, #46",
         StartDate           = "2020-12-11 6:45",
         EndDate             = "2020-12-14 12:45"
     };
 }
예제 #2
0
 private void MRlPrinter_Click(object sender, EventArgs e)
 {
     if (!mDialogShown)
     {
         using (var mBluetoothAdapter = BluetoothAdapter.DefaultAdapter)
         {
             if (mBluetoothAdapter == null)
             {
                 DialogMessageService.MessageBox(Context, "Attention", "This device does not support bluetooth");
             }
             else if (mBluetoothAdapter.IsEnabled)
             {
                 mDialogShown  = true;
                 mIsPrinterSet = mSettingsDataAccess.SelectTable()[0].ReceiptPrinterAddress != "";
                 //if there is selected printer, jump to selected printer test print, else jump to printer list
                 if (mIsPrinterSet)
                 {
                     Intent intent = new Intent(Context, typeof(SettingsFragmentSelectedPrinterActivity));
                     StartActivityForResult(intent, 3);
                 }
                 else
                 {
                     Intent intent = new Intent(Context, typeof(SettingsFragmentPrinterListActivity));
                     StartActivityForResult(intent, 3);
                 }
             }
             else
             {
                 DialogMessageService.MessageBox(Context, "Attention", "Please turn on your Bluetooth to connect the printer to your phone.");
             }
         }
     }
 }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.settings_fragment_selected_printer);
            FnGetData();
            mToolBar = FindViewById <SupportToolbar>(Resource.Id.toolBarPrinterSelectedPrinter);
            SetSupportActionBar(mToolBar);
            SupportActionBar actionBar = SupportActionBar;

            //actionBar.SetHomeAsUpIndicator(Resource.Drawable.left_icon_thin);
            actionBar.SetDisplayHomeAsUpEnabled(true);
            actionBar.SetDisplayShowHomeEnabled(true);
            actionBar.SetTitle(Resource.String.settings_select_printer);
            mBtnTestPrint                = FindViewById <Button>(Resource.Id.btnTestPrint);
            mBtnTestPrint.Click         += new SingleClickListener(MBtnTestPrint_Click).OnClick;
            mTxtSelectedPrinterName      = FindViewById <TextView>(Resource.Id.txtPrinterName);
            mTxtSelectedPrinterName.Text = mSettingsDataAccess.SelectTable()[0].ReceiptPrinterName;
        }
예제 #4
0
 private void FnGetData()
 {
     mSettingsDataAccess = new SettingsDataAccess();
     mPrinterSettings    = mSettingsDataAccess.SelectTable()[0];
 }