/// <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); }
/// <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); }