public PartialViewResult _Detail() { List <TB_SUBJECTS> subjects = new List <TB_SUBJECTS>(); List <TB_BOXES> boxes = new List <TB_BOXES>(); List <TB_USERS> teachers = new List <TB_USERS>(); List <V_BOX_SUBJECT> boxSubject = new List <V_BOX_SUBJECT>(); List <TB_ROOM_CLASS> room = new List <TB_ROOM_CLASS>(); int count = 0; try { room = RoomClass_Service.GetAll(); boxSubject = Subjects_Boxes_Service.GetAllBy("", 1, short.MaxValue, out count); subjects = Subjects_Service.GetAll(); boxes = Boxes_Service.GetAll(); teachers = User_Service.GetAllTeacher(); } catch (Exception e) { Console.WriteLine(e); throw; } ViewBag.BoxSubject = boxSubject; ViewBag.subjects = subjects; ViewBag.boxes = boxes; ViewBag.teachers = teachers; ViewBag.Room = room; return(PartialView()); }
public ActionResult Schedules() { List <TB_USERS> list = new List <TB_USERS>(); try { list = User_Service.GetAllTeacher(); }catch (Exception e) { ViewBag.Error = e.ToString(); } ViewBag.Teacher = list; return(View()); }
public ActionResult Tracking() { List <TB_SCHEDULES> list = new List <TB_SCHEDULES>(); List <TB_USERS> listUser = new List <TB_USERS>(); try { list = Schedules_Service.GetAll(); listUser = User_Service.GetAllTeacher(); } catch (Exception e) { ViewBag.Error = e.ToString(); } ViewBag.Schedule = list; ViewBag.User = listUser; return(View()); }
public PartialViewResult _ReportSalary(string userId = "", string scheduleId = "", string startDate = "", string endDate = "", int pageNumber = 1, int pageSize = 10) { int count = 0; ViewBag.pageNumber = pageNumber; ViewBag.pageSize = pageSize; ViewBag.maxNumber = 0; List <V_SALARY_TEACHER> list = new List <V_SALARY_TEACHER>(); List <TB_SCHEDULES> listSche = new List <TB_SCHEDULES>(); List <TB_SUBJECTS> listSuject = new List <TB_SUBJECTS>(); List <TB_BOX_SUBJECTS> listBoxSubject = new List <TB_BOX_SUBJECTS>(); List <TB_TRANSACTION> listTran = new List <TB_TRANSACTION>(); List <TB_USERS> listUser = new List <TB_USERS>(); int total = 0; try { listUser = User_Service.GetAllTeacher(); listTran = Transaction_Service.GetAllBy(userId, startDate, endDate, "TEACHER"); listSuject = Subjects_Service.GetAll(); listBoxSubject = Subjects_Boxes_Service.GetAll(); listSche = Schedules_Service.GetAll(); list = User_Service.GetSalaryTeacher(userId, scheduleId, startDate, endDate, pageNumber, pageSize, out count); total = count + listTran.Count; } catch (Exception e) { ViewBag.Error = e.ToString(); } ViewBag.maxNumber = Math.Ceiling((double)total / pageSize); ViewBag.Salary = list; ViewBag.Subject = listSuject; ViewBag.SubjectBox = listBoxSubject; ViewBag.Schedule = listSche; ViewBag.Transaction = listTran; ViewBag.User = listUser; return(PartialView()); }