protected void AddButton_Click(object obj, EventArgs args)
        {
            if (Page.IsValid == false)
            return;

            if (CurrentProject != null)
            {
            bool wasCategorySave = false;

            Category newCategory = new Category(Abbrev.Text, Convert.ToDecimal(CatDuration.Text), CategoryName.Text, CurrentProject.Id);
            wasCategorySave = newCategory.Save();
            ListAllCategories.DataBind();
            }
        }
        protected void CopyButton_Click(object obj, EventArgs args)
        {
            if (CurrentProject != null)
            {
            int selectedProjectId = Convert.ToInt32(ProjectList.SelectedValue);

            List<Category> newCategories = Category.GetCategoriesByProjectId(selectedProjectId);

            foreach (Category cat in newCategories)
            {
                Category newCat = new Category(cat.Abbreviation, cat.EstimateDuration, cat.Name, CurrentProject.Id);
                newCat.Save();
            }
            CategoryData.DataBind();
            ListAllCategories.DataBind();
            }
        }
Пример #3
0
 public abstract bool UpdateCategory(Category newCategory);
Пример #4
0
 /*** METHODS  ***/
 //Category
 public abstract int CreateNewCategory(Category newCategory);