Пример #1
0
        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);

        }
Пример #2
0
		private void InitializeData(GeneralSkillDataService dataService)
		{
			GeneralSkillDataService = dataService;
			SaveCommand = new Command(Save, CanSave);
		}
Пример #3
0
		/// <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);
		}
Пример #4
0
		/// <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;
		}
Пример #5
0
		public static PersonalSkill CreateNew(GeneralSkillDataService dataService)
		{
			int id = dataService.AddModel(new PersonalSkill { Experience = 0, Education = "دیپلم" });
			return dataService.GetSingle(id);
		}