Esempio n. 1
0
        public bool AddOutTest(
            [PexAssumeUnderTest] SyllabusOutBLL target,
            string ids,
            string no,
            string content
            )
        {
            bool result = target.AddOut(ids, no, content);

            return(result);
            // TODO: add assertions to method SyllabusOutBLLTest.AddOutTest(SyllabusOutBLL, String, String, String)
        }
Esempio n. 2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            bool isempty = false;

            if (rtCourseOut.Text == null || rtCourseOut.Text == "")
            {
                temp    = temp + dc.sysllabusout("missingcontent") + "\n";
                isempty = true;
            }
            if (txtOutNo.Text == null || txtOutNo.Text == "")
            {
                temp    = temp + dc.sysllabusout("missingno") + "\n";
                isempty = true;
            }
            string content = rtCourseOut.Text;
            string no      = txtOutNo.Text;

            if (isempty == false)
            {
                if (idSout == "")
                {
                    if (syou.AddOut(idS, no, content) == true)
                    {
                        MessageBox.Show(dc.sysllabusout("success"));
                        rtCourseOut.Text = "";
                        txtOutNo.Text    = "";
                        this.Close();
                    }
                    else
                    {
                        MessageBox.Show(dc.sysllabusout("else"));
                    }
                }
                else
                {
                    if (syou.EditOut(idSout, no, content) == true)
                    {
                        MessageBox.Show(dc.sysllabusout("edit"));
                        this.Close();
                    }
                    else
                    {
                        MessageBox.Show(dc.sysllabusout("else"));
                    }
                }
            }
            else
            {
                MessageBox.Show(temp + "\nVui lòng kiểm tra lại");
            }
        }