// GET: Yudisium/Create public ActionResult Create(short idDept, short idTermYear, long Student_Id) { ViewBag.currentTermYear = idTermYear; ViewBag.CurrentDept = idDept; //View Data var acd_Student = new Acd_Student(); acd_Student = db.Acd_Student.Where(s => s.Student_Id == Student_Id).FirstOrDefault(); ViewBag.Nim = acd_Student.Nim; ViewBag.Name = acd_Student.Full_Name; //View Data var acd_Thesis = new Acd_Thesis(); acd_Thesis = db.Acd_Thesis.Where(th => th.Student_Id == Student_Id).FirstOrDefault(); if (acd_Thesis != null) { ViewBag.judul = acd_Thesis.Thesis_Title; ViewBag.judul_Eng = acd_Thesis.Thesis_Title_Eng; ViewBag.dosenPemb1 = acd_Thesis.Emp_Employee.Full_Name; ViewBag.dosenPemb2 = acd_Thesis.Emp_Employee1.Full_Name; ViewBag.tglSeminar = string.Format("{0:dddd, d MMMM yyyy}", acd_Thesis.Seminar_Date); ViewBag.tglPendadaran = string.Format("{0:dddd, d MMMM yyyy}", acd_Thesis.Thesis_Exam_Date); } //Input Data var acd_yudisium = new Acd_Yudisium(); var acd_transcript = db.Acd_Transcript.Where(t => t.Student_Id == Student_Id).ToList(); acd_yudisium.Student_Id = Student_Id; acd_yudisium.Term_Year_Id = idTermYear; if (acd_transcript.Count() != 0) { acd_yudisium.Sks_Total = Math.Round(Convert.ToDecimal(acd_transcript.Sum(t => t.Sks)), 0); acd_yudisium.Course_Count = Convert.ToByte(acd_transcript.Count()); acd_yudisium.Bnk = acd_transcript.Sum(t => t.Bnk_Value); acd_yudisium.Gpa = Math.Round(Convert.ToDecimal(acd_yudisium.Bnk / acd_yudisium.Sks_Total), 2); } acd_yudisium.Application_Date = DateTime.Now; //ViewBag.Graduation_Period_Id = new SelectList(db.Acd_Graduation_Period, "Graduation_Period_Id", "Period_Name"); //ViewBag.Student_Id = new SelectList(db.Acd_Student, "Student_Id", "Nim"); //ViewBag.Graduate_Predicate_Id = new SelectList(db.Mstr_Graduate_Predicate, "Graduate_Predicate_Id", "Predicate_Name"); //ViewBag.Term_Year_Id = new SelectList(db.Mstr_Term_Year, "Term_Year_Id", "Term_Year_Name"); return(View(acd_yudisium)); }
// GET: Yudisium/Details/5 public ActionResult Details(long?id) { ViewBag.proses = new string[] { "Surat Permohonan Yudisium", //proses 1 "Surat bebas pinjaman lab", //proses 2 "Berita acara yudisium", //proses 3 "Pengantar pembayaran wisuda", //proses 4 "Surat keterangan lulus", //proses 5 "Cetak transkrip", //proses 6 "Cetak bukti penyerahan TA" //proses 7 }; //View Data var acd_Student = new Acd_Student(); acd_Student = db.Acd_Student.Where(s => s.Student_Id == id).FirstOrDefault(); ViewBag.Nim = acd_Student.Nim; ViewBag.Name = acd_Student.Full_Name; //View Data var acd_Thesis = new Acd_Thesis(); acd_Thesis = db.Acd_Thesis.Where(th => th.Student_Id == id).FirstOrDefault(); if (acd_Thesis != null) { ViewBag.judul = acd_Thesis.Thesis_Title; ViewBag.judul_Eng = acd_Thesis.Thesis_Title_Eng; ViewBag.dosenPemb1 = acd_Thesis.Emp_Employee.Full_Name; ViewBag.dosenPemb2 = acd_Thesis.Emp_Employee1.Full_Name; ViewBag.tglSeminar = string.Format("{0:dddd, d MMMM yyyy}", acd_Thesis.Seminar_Date); ViewBag.tglPendadaran = string.Format("{0:dddd, d MMMM yyyy}", acd_Thesis.Thesis_Exam_Date); } if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Acd_Yudisium acd_Yudisium = db.Acd_Yudisium.Find(id); if (acd_Yudisium == null) { return(HttpNotFound()); } ViewBag.currentTermYear = acd_Yudisium.Term_Year_Id; ViewBag.CurrentDept = acd_Student.Department_Id; return(View(acd_Yudisium)); }