public async Task <ActionResult> Enroll(int id) { Student_Progress sp = new Student_Progress(); sp.CourseID = id; sp.UserName = Session["username"].ToString(); string add = JsonConvert.SerializeObject(sp); string result = await studentProgressBL.EnrollNow(add); if (result == "true") { return(Content("<script language='javascript' type='text/javascript'>alert('Enrolled Succesfully'); window.location.href = '/StudentCourse/Index'</script>")); } return(Content("<script language='javascript' type='text/javascript'>alert('You have already enrolled this course'); window.location.href = '/StudentCourse/Details/" + id.ToString() + "'</script>")); }
public async Task <ActionResult> Edit(Student_Progress s) { //s.Test_scores = 100; s.UserName = Session["username"].ToString(); string course = JsonConvert.SerializeObject(s); string result = await studentProgressBL.EditC(course); if (result == "true") { string progress = await studentProgressBL.GetStudent_Progresses(); List <Student_Progress> cust = JsonConvert.DeserializeObject <List <Student_Progress> >(progress); return(View("Index", cust)); } return(View()); }
public async Task <ActionResult> Edit(Student_Progress s) { //s.CertificateStatus = Generated; s.UserName = Session["username"].ToString(); string course = JsonConvert.SerializeObject(s); string result = await studentProgressBL.EditCerti(course); if (result == "true") { string certi = await studentProgressBL.GetStudent_Progresses(); List <Student_Progress> cust = JsonConvert.DeserializeObject <List <Student_Progress> >(certi); return(View("Index", cust)); } return(Content("<script language='javascript' type='text/javascript'>alert('You are not eligible for certificate... Score 85 and above and give Test.'); window.location.href = '/Certificate/index/" + "'</script>")); //return View(); }
public async Task <ActionResult> Assign() { int cid = Convert.ToInt32(Request["txtCourseid"].ToString()); string username = Request["txtUsername"].ToString(); StudentProgressBL studentProgressBL = new StudentProgressBL(); Student_Progress sp = new Student_Progress(); sp.CourseID = cid; sp.UserName = username; string add = JsonConvert.SerializeObject(sp); string result = await studentProgressBL.EnrollNow(add); if (result == "true") { return(Content("<script language='javascript' type='text/javascript'>alert('Assigned Succesfully'); window.location.href = '/Course/Index'</script>")); } return(Content("<script language='javascript' type='text/javascript'>alert('Course Not Assigned. Please check username/CourseID'); window.location.href = '/Course/Details/" + cid.ToString() + "'</script>")); }
public bool Edit(Student_Progress c) { return(dBHelper.EditProgress(c)); }
public bool Edit(Student_Progress c) { DBHelper dBHelper = new DBHelper(); return(dBHelper.EditTest(c)); }
public bool Post(Student_Progress sp) { DBHelper dBHelper = new DBHelper(); return(dBHelper.EnrollUser(sp)); }
public bool Edit(Student_Progress c) { return(dBHelper.EditCertificate(c)); }