示例#1
0
        public bool AddObjTest(
            [PexAssumeUnderTest] SyllabusObjBLL target,
            string ids,
            string content
            )
        {
            bool result = target.AddObj(ids, content);

            return(result);
            // TODO: add assertions to method SyllabusObjBLLTest.AddObjTest(SyllabusObjBLL, String, String)
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            bool isempty = false;

            if (rtObjectives.Text == null || rtObjectives.Text == "")
            {
                temp    = temp + dc.sysllabusobj("missingcontent") + "\n";
                isempty = true;
            }
            string content = rtObjectives.Text;

            if (isempty == false)
            {
                if (idobj == "")
                {
                    if (syso.AddObj(ids, content) == true)
                    {
                        MessageBox.Show(dc.sysllabusobj("success"));
                        rtObjectives.Text = "";
                        this.Close();
                    }
                    else
                    {
                        MessageBox.Show(dc.sysllabusobj("else"));
                    }
                }
                else
                {
                    if (syso.EditObj(idobj, content) == true)
                    {
                        MessageBox.Show(dc.sysllabusobj("edit"));
                        this.Close();
                    }
                    else
                    {
                        MessageBox.Show(dc.sysllabusobj("else"));
                    }
                }
            }
            else
            {
                MessageBox.Show(temp + "\nVui lòng kiểm tra lại");
            }
        }