} //End public List<StudentdetailVM> getDatalist_classmate(int id = null) public List <StudentdetailVM> getDatalist_classmate(int?id) { List <StudentdetailVM> vReturn; using (var db = new DBMAINContext()) { StudentdetailVM oData = new StudentDS().getData(id); int? idClasstype = oData.CLASSTYPE_ID; int? idClassroom = oData.CLASSROOM_ID; var oQRY = from tb in db.Student_infos where tb.ID != id && tb.CLASSTYPE_ID == idClasstype && tb.CLASSROOM_ID == idClassroom select new StudentdetailVM { BRANCH_ID = tb.BRANCH_ID, YEAR_ID = tb.YEAR_ID, SEMESTER_ID = tb.SEMESTER_ID, CLASSTYPE_ID = tb.CLASSTYPE_ID, CLASSROOM_ID = tb.CLASSROOM_ID, ID = tb.ID, NAME = tb.NAME, NIS = tb.NIS, STUDENT_IMG = tb.STUDENT_IMG, FTHR_IMG = tb.FTHR_IMG, MTHR_IMG = tb.MTHR_IMG }; vReturn = oQRY.ToList(); } //End using (var = new DbContext()) return(vReturn); } //End public List<StudentdetailVM> getDatalist_classmate(int id = null)
} //End private Reportin_tunggakanVM mapOTHER(StudentdetailVM poSTUDENT, TrintypedetailVM poTRINTYPES, Installment_indetailVM poINST) //METHOD-SET public void setSTUDENTS_TUNGGAKAN() { StudentDS oDS = new StudentDS(); StudentVM oFilter = new StudentVM(); //Init Filter if (this.CLASSTYPE_ID != null) { oFilter.FILTER_CLASSTYPE_ID = (Byte?)this.CLASSTYPE_ID; } if (this.CLASSLEVEL_ID != null) { oFilter.FILTER_CLASSLEVEL_ID = (Byte?)this.CLASSLEVEL_ID; } if (this.NIS != null) { oFilter.FILTER_NIS = this.NIS; } //Set Students this.STUDENTS = oDS.getDatalist(oFilter); if ((this.NIS != null) && (this.STUDENTS != null) && (this.STUDENTS.Count > 0)) { this.STUDENT_ID = this.STUDENTS.FirstOrDefault().ID; } } //End public void setSTUDENTS_TUNGGAKAN()