data.T_student.AddObject(stu);
int i=data.SaveChanges();
if (i > 0)
{
string message = string.Format("<script>alert('添加成功');location.href='{0}'</script>", Url.Action("Add","Stu"));
return Content(message, "text/html");
}
else
{
string message = string.Format("<script>alert('添加失败');location.href='{0}'</script>", Url.Action("Add", "Stu"));
return Content(message, "text/html");
}
int i=data.SaveChanges();
if (i > 0)
{
string message = string.Format("<script>alert('添加成功');location.href='{0}'</script>", Url.Action("Add","Stu"));
return Content(message, "text/html");
}
else
{
string message = string.Format("<script>alert('添加失败');location.href='{0}'</script>", Url.Action("Add", "Stu"));
return Content(message, "text/html");
}