public async Task <IActionResult> AddNewcomer([FromBody] NewcomerBindingModel bm)
    {
        var newcomer = await _newcomersRepo.AddNewcomer(bm.FullName, bm.HomeAddress, bm.Phone, bm.EmailAddress,
                                                        bm.BirthDay, bm.AgeGroup, bm.CommentsOrPrayers, bm.HowYouFoundUs, bm.BecomeMember, bm.Gender,
                                                        bm.BornAgain);

        return(Created(Mapper.Map <NewcomerViewModel>(newcomer)));
    }
Esempio n. 2
0
        private async Task ResetControlsAsync()
        {
            // reset binding context
            BindingContext = new NewcomerBindingModel();

            // drop downs
            cmbDays.SelectedIndex   = -1;
            cmbMonths.SelectedIndex = -1;

            // scroll to top
            await scrollView.ScrollToAsync(0, 0, true);
        }
Esempio n. 3
0
        public RecordNewcomerPage()
        {
            InitializeComponent();

            // set drop down values
            cmbMonths.ItemsSource   = Constants.Months;
            cmbDays.ItemsSource     = Enumerable.Range(1, 31).ToList();
            cmbAgeGroup.ItemsSource = Constants.AgeGroups;
            cmbGender.ItemsSource   = Constants.Genders;

            // initialize stuff
            _newcomerClient = new NewcomerClient();
            BindingContext  = new NewcomerBindingModel();
        }
Esempio n. 4
0
 public Task Register(NewcomerBindingModel payload)
 {
     return(_newcomerClient.Register(payload));
 }