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"));
                }
            }
        }
Example #2
0
        public bool CreateProgramTest(
            [PexAssumeUnderTest] ProgramBLL target,
            string idAcc,
            string namepro
            )
        {
            bool result = target.CreateProgram(idAcc, namepro);

            return(result);
            // TODO: add assertions to method ProgramBLLTest.CreateProgramTest(ProgramBLL, String, String)
        }
        private void btnProgramSave_Click(object sender, EventArgs e)
        {
            string name = txtProgramName.Text;
            string ida  = cboProgramMaster.SelectedValue.ToString();

            if (p.CreateProgram(ida, name) == true)
            {
                dc.successCreateProgram("createprogram");
            }
            else
            {
                dc.errorCreateProgram("else");
            }
        }