コード例 #1
0
        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;
        }
コード例 #2
0
        public Teacher GetTeacherDetail(string teacherID, ref string message)
        {
            TeacherService ts = new TeacherService();

            return(ts.GetTeacher(teacherID, ref message));
        }
コード例 #3
0
        public Teacher GetTeacher(string lastname, string middlename, string firstname)
        {
            TeacherService ts = new TeacherService();

            return(ts.GetTeacher(lastname, firstname, middlename));
        }
コード例 #4
0
ファイル: GradingService.cs プロジェクト: RazenRyne/eSAR
 public Teacher GetTeacher(string lastname, string middlename, string firstname)
 {
     TeacherService ts = new TeacherService();
     return ts.GetTeacher(lastname, firstname, middlename);
 }
コード例 #5
0
ファイル: GradingService.cs プロジェクト: RazenRyne/eSAR
 public Teacher GetTeacherDet(string teacherId, ref string message)
 {
     TeacherService ts = new TeacherService();
     return ts.GetTeacher(teacherId, ref message);
 }
コード例 #6
0
ファイル: GradeSectionService.cs プロジェクト: RazenRyne/eSAR
 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;
 }
コード例 #7
0
ファイル: frmTeacherDetails.cs プロジェクト: RazenRyne/eSAR
        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;
            }
        }