Ejemplo n.º 1
0
        public int myApp(MyApplicationBal myApplicationBal)
        {
            cmd = new SqlCommand("SP_Student_Register", con);
            cmd.Parameters.AddWithValue("@Name", myApplicationBal.Name);
            cmd.Parameters.AddWithValue("@Course", myApplicationBal.Course);
            cmd.Parameters.AddWithValue("@Email", myApplicationBal.Email);
            cmd.Parameters.AddWithValue("@Marks", myApplicationBal.Marks);
            cmd.CommandType = CommandType.StoredProcedure;
            con.Open();
            int i = cmd.ExecuteNonQuery();

            con.Close();
            return(i);
        }
Ejemplo n.º 2
0
        public ActionResult MyApplicationView(MyApplicationBal myApplicationBal)
        {
            //int j=0
            string           result = "";
            MyApplicationDal dal    = new MyApplicationDal();
            int j = dal.myApp(myApplicationBal);

            if (j > 0)
            {
                result = "registration Success";
            }
            else
            {
                result = "registration Failed";
            }
            return(Json(result, JsonRequestBehavior.AllowGet));
        }