Beispiel #1
0
        /// <summary>
        /// Basic ctor that recieves an indicator of which category group
        ///  the category is being added to
        /// </summary>
        /// <param name="categoryType">Category group indicator</param>
        public AddCategoryUI(CategoryType categoryType)
        {
            InitializeComponent();
            CategoryType = categoryType;

            _context = new AccountingDataContext();
            _categoryService = new CategoryService(_context);
        }
Beispiel #2
0
        /// <summary>
        /// C'tor that intializes the category group property
        /// </summary>
        /// <param name="nCategoryId">The category group id</param>
        public ViewCategoriesUI(int nCategoryId)
        {
            // Sets the property with the id given
            this.CategoryType = nCategoryId;

            // Auto generated code for the form
            InitializeComponent();

            _context = new AccountingDataContext();
            _categoryService = new CategoryService(_context);
        }