public void TranslateGradeSectionBDOToGradeSection(GradeSectionBDO gs, GradeSection gsb) { RoomService rService = new RoomService(); Room room = new Room(); TeacherService tService = new TeacherService(); Teacher teacher = new Teacher(); string message = string.Empty; room = rService.GetRoom(gs.HomeRoomNumber); teacher = tService.GetTeacher(gs.HomeRoomTeacherId, ref message); gsb.Deactivated = gs.Deactivated; gsb.GradeLevel = gs.GradeLevel; gsb.GradeSectionCode = gs.GradeSectionCode; gsb.HomeRoom = room; gsb.HomeRoomNumber = gs.HomeRoomNumber; gsb.HomeRoomTeacherId = gs.HomeRoomTeacherId; gsb.HomeRoomTeacher = teacher; if (teacher.MiddleName == String.Empty) { gsb.TeacherName = teacher.LastName + ", " + teacher.FirstName; } else { gsb.TeacherName = teacher.LastName + ", " + teacher.FirstName + " " + teacher.MiddleName.Substring(0, 1); } gsb.Class = gs.Class; gsb.SY = gs.SY; gsb.Section = gs.Section; }
public Teacher GetTeacherDetail(string teacherID, ref string message) { TeacherService ts = new TeacherService(); return(ts.GetTeacher(teacherID, ref message)); }
public Teacher GetTeacher(string lastname, string middlename, string firstname) { TeacherService ts = new TeacherService(); return(ts.GetTeacher(lastname, firstname, middlename)); }
public Teacher GetTeacher(string lastname, string middlename, string firstname) { TeacherService ts = new TeacherService(); return ts.GetTeacher(lastname, firstname, middlename); }
public Teacher GetTeacherDet(string teacherId, ref string message) { TeacherService ts = new TeacherService(); return ts.GetTeacher(teacherId, ref message); }
public void TranslateGradeSectionBDOToGradeSection(GradeSectionBDO gs, GradeSection gsb) { RoomService rService = new RoomService(); Room room = new Room(); TeacherService tService = new TeacherService(); Teacher teacher = new Teacher(); string message = string.Empty; room = rService.GetRoom(gs.HomeRoomNumber); teacher = tService.GetTeacher(gs.HomeRoomTeacherId, ref message); gsb.Deactivated = gs.Deactivated; gsb.GradeLevel = gs.GradeLevel; gsb.GradeSectionCode = gs.GradeSectionCode; gsb.HomeRoom = room; gsb.HomeRoomNumber = gs.HomeRoomNumber; gsb.HomeRoomTeacherId = gs.HomeRoomTeacherId; gsb.HomeRoomTeacher = teacher; if (teacher.MiddleName == String.Empty) gsb.TeacherName = teacher.LastName + ", " + teacher.FirstName; else gsb.TeacherName = teacher.LastName + ", " + teacher.FirstName + " " + teacher.MiddleName.Substring(0, 1); gsb.Class = gs.Class; gsb.SY = gs.SY; gsb.Section = gs.Section; }
private void txtTeacherID_Leave(object sender, EventArgs e) { Teacher teach = new Teacher(); string msg = string.Empty; ITeacherService teacherService = new TeacherService(); if (txtTeacherID.Text == string.Empty) txtTeacherID.Text = szTeacherID; teach = teacherService.GetTeacher(txtTeacherID.Text, ref msg); if (teach.TeacherId != null) { MessageBox.Show("Teacher ID already exist!"); txtTeacherID.Text = szTeacherID; txtTeacherID.Focus(); return; } }