Exemple #1
0
        public void BindToViewModel(HomeVisitDataViewModel model)
        {
            viewModel = model;
            cmbCustomers.DataSource    = model.CustomerListValues;
            cmbCustomers.DisplayMember = "Value";
            cmbCustomers.ValueMember   = "Key";
            BindingHelper.SetBinding(cmbCustomers, "SelectedValue", model, "Customer", true, DataSourceUpdateMode.OnPropertyChanged);
            BindingHelper.SetBinding(chkDrivenHome, "Checked", model, "DrivenHome", true, DataSourceUpdateMode.OnPropertyChanged);

            dtpBegin.Value     = model.Begin;
            dtpBeginTime.Value = model.Begin;
            dtpEnd.Value       = model.End;
            dtpEndTime.Value   = model.End;
        }
Exemple #2
0
        public void BindToViewModel(HomeVisitDataViewModel model)
        {
            viewModel = model;
            cmbCustomers.DataSource = model.CustomerListValues;
            cmbCustomers.DisplayMember = "Value";
            cmbCustomers.ValueMember = "Key";
            BindingHelper.SetBinding(cmbCustomers, "SelectedValue", model, "Customer", true, DataSourceUpdateMode.OnPropertyChanged);
            BindingHelper.SetBinding(chkDrivenHome, "Checked", model, "DrivenHome", true, DataSourceUpdateMode.OnPropertyChanged);

            dtpBegin.Value = model.Begin;
            dtpBeginTime.Value = model.Begin;
            dtpEnd.Value = model.End;
            dtpEndTime.Value = model.End;
        }