示例#1
0
        private void FnSetUpData()
        {
            mSelectedRunnerId       = Intent.GetIntExtra("selectedRunnerId", 0);
            mTransactionsDataAccess = new TransactionsDataAccess();
            mRunnersDataAccess      = new RunnersDataAccess();
            mSelectedRunner         = mRunnersDataAccess.SelectRecord(mSelectedRunnerId)[0];

            //get startdate and end date based from unpaid records of the selected runner
            var holder = mTransactionsDataAccess.SelectTable()
                         .Where(x => x.CustomerOrRunnerId == mSelectedRunnerId && !x.IsPaid).ToList();

            holder = holder.OrderBy(x => StringDateToDate(x.TransactionDateTime)).ToList();

            if (holder.Count != 0)
            {
                mSelectedStartDate = StringDateToDate(holder[0].TransactionDateTime);
                mSelectedEndDate   = StringDateToDate(holder[holder.Count() - 1].TransactionDateTime);
            }

            selectedStartCalendarYear       = mSelectedStartDate.Year;
            selectedStartCalendarMonth      = mSelectedStartDate.Month - 1;
            selectedStartCalendarDayOfMonth = mSelectedStartDate.Day;

            selectedEndCalendarYear       = mSelectedEndDate.Year;
            selectedEndCalendarMonth      = mSelectedEndDate.Month - 1;
            selectedEndCalendarDayOfMonth = mSelectedEndDate.Day;
        }
 private void FnSetUpData()
 {
     mSelectedRunnerId = Intent.GetIntExtra("selectedRunnerId", 0);
     mRunnersMultipayRecordsDataAccess = new RunnersMultipayRecordsDataAccess();
     mRunnersDataAccess = new RunnersDataAccess();
     mSelectedRunner    = mRunnersDataAccess.SelectRecord(mSelectedRunnerId)[0];
 }
示例#3
0
 private string GetCustomerOrRunnerName(bool isRunner, int id)
 {
     if (isRunner)
     {
         return(mRunnersDataAccess.SelectRecord(id)[0].FullName);
     }
     else
     {
         return(mCustomersDataAccess.SelectRecord(id)[0].FullName);
     }
 }
示例#4
0
        public View GetButtonLayout()
        {
            View buttonView = null;

            LayoutInflater inflater = (LayoutInflater)this.GetSystemService(Context.LayoutInflaterService);

            buttonView = inflater.Inflate(Resource.Layout.checkout_fragment_customer_name_button, null);
            TextView     txtCustomerNameButtonTitle = buttonView.FindViewById <TextView>(Resource.Id.txtCustomerName);
            LinearLayout borderContainer            = buttonView.FindViewById <LinearLayout>(Resource.Id.llBorderContainer);
            ImageView    imgIcon = buttonView.FindViewById <ImageView>(Resource.Id.imgCustomerIcon);

            SetActionLayoutColor(borderContainer, imgIcon, txtCustomerNameButtonTitle);
            txtCustomerNameButtonTitle.Text = mRunnersDataAccess.SelectRecord(mRunnerId)[0].FullName;
            return(buttonView);
        }
        private string GetCustomerOrRunnerName(string _transactionType, int _id)
        {
            string retVal = "";

            if (_transactionType == PAYMENT || _transactionType == ORDER)
            {
                retVal = mCustomersDataAccess.SelectRecord(_id)[0].FullName;
            }
            else if (_transactionType == PAYLATER)
            {
                retVal = mRunnersDataAccess.SelectRecord(_id)[0].FullName;
            }
            else
            {
                retVal = "[null]";
            }

            return(retVal);
        }
 private string GetRunnerName(RunnersDataAccess dataAccess, int id)
 {
     return(dataAccess.SelectRecord(id)[0].FullName);
 }
 private void FnGetData()
 {
     mRunnerDataAccess = new RunnersDataAccess();
     selectedRunnerId  = Intent.GetIntExtra("RunnerId", 0);
     selectedRunner    = mRunnerDataAccess.SelectRecord(selectedRunnerId);
 }