コード例 #1
0
ファイル: EngineerGroupsTest.cs プロジェクト: jbob24/KPFF
        public void InsertGroup()
        {
            var group = new EngineerGroup(0, "My 2nd Group", "This is another test group", true);
            group.Insert();

            Assert.AreNotEqual(0, group.GroupId, "the groupid is still 0");
        }
コード例 #2
0
ファイル: EngineerGroups.aspx.cs プロジェクト: jbob24/KPFF
        protected void btnAdd_Click(object sender, System.EventArgs e)
        {
            if (string.IsNullOrEmpty(txtName.Text.Trim()))
            {
                return;
            }

            var newGroup = new EngineerGroup();
            newGroup.Name = txtName.Text;
            newGroup.Description = txtDescription.Text;

            newGroup.Insert();

            RefreshPage();
        }