示例#1
0
 /// <summary>
 /// Binds new model data to screen
 /// </summary>
 /// <param name="modelData"></param>
 protected override void BindModel(object modelData)
 {
     MyViewModel.MyModel = modelData.CastOrFill <CustomerModel>();
     DataContext         = MyViewModel.MyModel;
     SetBinding(ref this.TextId, MyViewModel.MyModel.Id.ToString(), "Id");
     SetBinding(ref this.TextKey, MyViewModel.MyModel.Key.ToString(), "Key");
     SetBinding(ref this.TextFirstName, MyViewModel.MyModel.FirstName, "FirstName");
     SetBinding(ref this.TextLastName, MyViewModel.MyModel.LastName, "LastName");
     SetBinding(ref this.TextBirthDate, MyViewModel.MyModel.BirthDate, "BirthDate");
     SetBinding(ref this.DropDownGender, GenderList.GetAll(), MyViewModel.MyModel.GenderId, "GenderId");
 }