Ejemplo n.º 1
0
 private void submitBtn_Click(object sender, EventArgs e)
 {
     // string constStr= ConfigurationManager.ConnectionStrings["connectionstr"].ToString();
     if (categorynameTxt.Text == "" || categorynDescTxt.Text == "")
     {
         MessageBox.Show("pls enter all the values", "error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         CategoryDAO categoryDAORef = new CategoryDAOImpl();
         Category    categoryRef    = new Category();
         categoryRef.categoryName = categorynameTxt.Text;
         categoryRef.categoryDesc = categorynDescTxt.Text;
         categoryDAORef.insertCatelog(categoryRef);
         clearFields();
     }
 }