Пример #1
0
        private void btnProgramSave_Click(object sender, EventArgs e)
        {
            if (txtProgramName.Text == null)
            {
                txtProgramName.Text = "";
            }
            string name = txtProgramName.Text;
            string ida  = cboProgramMaster.SelectedValue.ToString();

            if (idprogram == "")
            {
                if (p.CreateProgram(ida, name) == true)
                {
                    MessageBox.Show(dc.successCreateProgram("createprogram"));
                    this.Close();
                }
                else
                {
                    MessageBox.Show(dc.errorCreateProgram("else"));
                }
            }
            else
            {
                if (p.EditProgram(idprogram, name, ida) == true)
                {
                    MessageBox.Show(dc.successCreateProgram("editprogram"));
                    this.Close();
                }
                else
                {
                    MessageBox.Show(dc.errorCreateProgram("else"));
                }
            }
        }
Пример #2
0
        public bool EditProgramTest(
            [PexAssumeUnderTest] ProgramBLL target,
            string id,
            string name,
            string idacc
            )
        {
            bool result = target.EditProgram(id, name, idacc);

            return(result);
            // TODO: add assertions to method ProgramBLLTest.EditProgramTest(ProgramBLL, String, String, String)
        }