示例#1
0
        public async Task Initialize(int id, TransactionEnum transactionEnum)
        {
            Transaction = transactionEnum;
            switch (transactionEnum)
            {
            case TransactionEnum.Insert:
                Employees = await GetAll();

                break;

            case TransactionEnum.Update:
                break;

            case TransactionEnum.Get:
                Employee = await GetById(id);

                Employees = await GetAll();

                break;

            case TransactionEnum.GetAll:
                Employees = await GetAll();

                break;

            default:
                break;
            }
        }
示例#2
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Use this to return your custom view for this Fragment

            View view = inflater.Inflate(Resource.Layout.sendfragmentex, container, false);

            CreateTextViewsAndButtons(view);

            CreateRecyclerView(view);

            dataRepository = new DataRepository();

            //@@todo: change to transactionState
            if (!sendForm)
            {
                addressLayout.Hint = "E-mail address";
                addressBlankError  = "E-mail address can't be blank!";
                amountEdit.SetTextColor(Color.Green);
                dollarAmountTextView.SetTextColor(Color.Green);
                radioGroup.Visibility         = ViewStates.Gone;
                topView.Visibility            = ViewStates.Gone;
                transactionFeeText.Visibility = ViewStates.Gone;
                bottomView.Visibility         = ViewStates.Gone;
                transactionState = TransactionEnum.RECEIVE;

                sendButton.Text = "Receive payment";
            }

            if (transactionByFileAttachment)
            {
                addressLayout.Hint = "Bitcoin public address";
                addressBlankError  = "Bitcoin public address can't be blank!";
                amountEdit.SetTextColor(Android.Graphics.Color.Red);
                amountEdit.Text  = seriousWalletTransactionMessage.CoinAmount;
                addressEdit.Text = seriousWalletTransactionMessage.TransactionAddress;
                labelEdit.RequestFocus();
                InputMethodManager imm = (InputMethodManager)Context.GetSystemService(Context.InputMethodService);
                imm.ShowSoftInput(labelEdit, ShowFlags.Implicit);
            }

            return(view);
        }
 public static TransactionProtoEnum ConvertTransactionType(TransactionEnum transactionType)
 => transactionType switch
 {
        public async Task <ActionResult> JsonForm(TransactionEnum transaction, int id = 0)
        {
            await employeeViewModel.Initialize(id, transaction);

            return(Json(employeeViewModel));
        }