コード例 #1
0
ファイル: ProgramOutBLLTest.cs プロジェクト: mintaz/Demo-SEP
        public bool EditProOutTest(
            [PexAssumeUnderTest] ProgramOutBLL target,
            string id,
            string no,
            int type,
            string content
            )
        {
            bool result = target.EditProOut(id, no, type, content);

            return(result);
            // TODO: add assertions to method ProgramOutBLLTest.EditProOutTest(ProgramOutBLL, String, String, Int32, String)
        }
コード例 #2
0
        private void btnOutcomesSave_Click(object sender, EventArgs e)
        {
            if (txtProgramOutNo.Text == null || txtProgramOutNo.Text == "")
            {
                txtProgramOutNo.Text = "0";
            }
            if (rcOutcomes.Text == null)
            {
                rcOutcomes.Text = "";
            }
            string no   = txtProgramOutNo.Text;
            int    type = int.Parse(cboOutcomeType.SelectedValue.ToString());
            string con  = rcOutcomes.Text;

            if (idprout == "")
            {
                int notest = db.ProgramOutcomes.Where(s => s.OutcomeNo.Contains(no)).Count();
                if (notest == 0)
                {
                    if (prou.AddProOut(idp, no, type, con) == true)
                    {
                        MessageBox.Show(dc.successProgramOut("addprogramoutcome"));
                        clean();
                        this.Close();
                    }
                    else
                    {
                        MessageBox.Show(dc.successProgramOut("else"));
                    }
                }
                else
                {
                    MessageBox.Show(dc.errorProOut("sameno"));
                }
            }
            else
            {
                if (prou.EditProOut(idprout, no, type, con) == true)
                {
                    MessageBox.Show(dc.successProgramOut("editprogramoutcome"));
                    clean();
                    this.Close();
                }
                else
                {
                    MessageBox.Show(dc.successProgramOut("else"));
                }
            }
        }