private void InitializeData() { GeneralSkillDataService = new GeneralSkillDataService(); GeneralSkillDataService.GeneralSkillAdded += OnGeneralSkillAdded; ColumnHeaders = new List<ColumnInfo> { new ColumnInfo("Education",0), new ColumnInfo("Reserve1",1), new ColumnInfo("Reserve2",2) , new ColumnInfo("Mode",3,true) }; AddCommand = new Command(Add, CanAdd);RefreshCommand = new Command(CreateItems); AddGroupCommand = new Command(Add, CanAddGroup); CreateItems(null); }
private void InitializeData(GeneralSkillDataService dataService) { GeneralSkillDataService = dataService; SaveCommand = new Command(Save, CanSave); }
/// <summary> /// Initializes a new instance of the <see cref="ProductGroupVM"/> class initialized with default values. /// </summary> public GeneralSkillVM(AccessType access, GeneralSkillDataService dataService) : base(access) { InitializeData(dataService); }
/// <summary> /// Initializes a new instance of the <see cref="ProductVM"/> class from the model. /// </summary> /// <param name="entity">The model.</param> /// <param name="access"></param> /// <param name="dataService"></param> public GeneralSkillVM(PersonalSkill entity, AccessType access, GeneralSkillDataService dataService) : base(access) { InitializeData(dataService); _model = entity; }
public static PersonalSkill CreateNew(GeneralSkillDataService dataService) { int id = dataService.AddModel(new PersonalSkill { Experience = 0, Education = "دیپلم" }); return dataService.GetSingle(id); }