コード例 #1
0
        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();
            }
        }
コード例 #2
0
        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);