Ejemplo n.º 1
0
        //Get Records Of Student Absent
        public ActionResult GetAbsentRecords(attendenceviewmodel uvm)
        {
            Attendance t      = new Attendance();
            string     status = "Absent";

            string            currdate = uvm.currentDate.ToString();
            List <Attendance> at       = db.Attendances.ToList();

            foreach (var item in at)
            {
                if (Convert.ToDateTime(item.currentDate.ToString()) == Convert.ToDateTime(currdate.ToString()) && item.AttendanceStatus == status)
                {
                    string s = "";
                }
            }

            return(View());
        }
Ejemplo n.º 2
0
        public ActionResult getStudentRecors(attendenceviewmodel uvm)
        {
            List <tbl_class> li = db.tbl_class.ToList();

            ViewBag.list = new SelectList(li, "class_id", "class_name");

            tbl_student        s = new tbl_student();
            List <tbl_student> t = db.tbl_student.Where(x => x.class_fk_id == uvm.Class_id).ToList();

            Session["id"]   = uvm.Class_id;
            Session["Date"] = uvm.currentDate;
            List <string> listdata = new List <string>();

            foreach (var item in t)
            {
                listdata.Add(item.stu_id.ToString());
                listdata.Add(item.applicant_name);
            }

            ViewBag.listone = t;
            return(View());
        }