示例#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);
		}