public JsonResult GroupCommentLikeOrDislike(ClassTeacherTopicComment Info) { ClassTeacher classteacher = new ClassTeacher(); ResultInfo <ClassTeacherForum> result = classteacher.GroupCommentLikeOrDislike(Info); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult EditClassTeacherCommunityComment(ClassTeacherTopicComment Info) { ClassTeacher classteacher = new ClassTeacher(); ResultInfo <ClassTeacherForum> result = classteacher.EditOnlineForumComment(Info); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult GetTopicWiseComment(long TopicId, long SchoolId) { ClassTeacher classteacher = new ClassTeacher(); ResultInfo <ClassTeacherForum> result = classteacher.GetTopicWiseComment(TopicId, SchoolId); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult InsertCommentGroupTopicWise(ClassTeacherTopicComment Info) { ClassTeacher classteacher = new ClassTeacher(); ResultInfo <ClassTeacherForum> result = classteacher.InsertCommentGroupTopicWise(Info); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult GetStudentsAssignmentFeedback(ClassTeacherAssignmentDetails Info) { ClassTeacher classteacher = new ClassTeacher(); ResultInfo <ClassTeacherAssignmentDetails> result = classteacher.GetTeacherAssignmentDetails(Info); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult getMessageCount(long SenderId, long ReceiverId, long SchoolId) { ClassTeacher classteacher = new ClassTeacher(); long Count = classteacher.getMessageCount(SenderId, ReceiverId, SchoolId); return(Json(Count, JsonRequestBehavior.AllowGet)); }
public JsonResult GetTeacherForumGroupsList(long SchoolID) { ClassTeacher classteacher = new ClassTeacher(); ResultInfo <ClassTeacherForum> result = classteacher.GetTeacherForumGroupsList(SchoolID); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult GetCurriculumClassWise(TeachersCurriculum Info) { ClassTeacher classteacher = new ClassTeacher(); ResultInfo <TeachersCurriculum> result = classteacher.GetCurriculumClassWise(Info); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult GetTopicSemesterWise(long SubjectId, int SemesterId, long ClassId, int Level_Id, long SchoolID) { ClassTeacher classteacher = new ClassTeacher(); AddStudentDetails result = classteacher.getTopicDetails(SubjectId, SemesterId, ClassId, Level_Id, SchoolID); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult GetClassTeacherTimeTable(timetable_prop prop) { ClassTeacher classteacher = new ClassTeacher(); List <ClassTeacherTimetable> list = classteacher.getClassTeacherTimeTable(prop); return(Json(list, JsonRequestBehavior.AllowGet)); }
public JsonResult GetSemesterDetails() { ClassTeacher classteacher = new ClassTeacher(); AddStudentDetails result = classteacher.getSemesterDetails(); return(Json(result, JsonRequestBehavior.AllowGet)); }
public ActionResult BindSubjectOnClassIDAndLevelID(long SchoolId, long ClassId, int LvlId) { ClassTeacher classteacher = new ClassTeacher(); AddStudentDetails result = classteacher.getSubjectDetails(SchoolId, ClassId, LvlId); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult GetClassByLevelAndDivisionId(long SchoolId, int DivId, int LvlId) { ClassTeacher classteacher = new ClassTeacher(); AddStudentDetails result = classteacher.getClassDetails(SchoolId, DivId, LvlId); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult GetLevelDetailsOnDivisionId(int Div) { ClassTeacher classteacher = new ClassTeacher(); AddStudentDetails result = classteacher.getLevelDetails(Div); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult CreateOnlineForumGroup(ClassTeacherForumGroups Info) { ClassTeacher classteacher = new ClassTeacher(); ResultInfo <ClassTeacherForum> result = classteacher.CreateOnlineGroup(Info); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult ReportCommunityComment(ClassTeacherCommunityCommentReport Info) { ClassTeacher classteacher = new ClassTeacher(); ResultInfo <ClassTeacherForum> result = classteacher.ReportCommunityComment(Info); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult GetForumTopicListGroupIDWise(long Forum_ID, long SchoolID, string Forum_Name) { ClassTeacher classteacher = new ClassTeacher(); ResultInfo <ClassTeacherForum> result = classteacher.GetGroupWiseTopic(Forum_ID, SchoolID, Forum_Name); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult GetTeachersTopicClassWise(ClassTeacherAssignmentDetails Info) { ClassTeacher classteacher = new ClassTeacher(); ResultInfo <ClassTeacherAssignmentDetails> result = classteacher.GetSubjectWiseTopic(Info); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult CreateClassTeacherForumTopic(ClassTeacherTopic Info) { ClassTeacher classteacher = new ClassTeacher(); ResultInfo <ClassTeacherForum> result = classteacher.CreateGroupWiseTopic(Info); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult InsertClassTeacherMessages(ClassTeacherMessages messages) { ClassTeacher classteacher = new ClassTeacher(); string Result = classteacher.InsertClassteacherMessagesByUID(messages); return(Json(Result, JsonRequestBehavior.AllowGet)); }
public JsonResult DeleteCommunityComment(long CommentId) { ClassTeacher classteacher = new ClassTeacher(); ResultInfo <ClassTeacherForum> result = classteacher.DeleteCommunityComment(CommentId); return(Json(result, JsonRequestBehavior.AllowGet)); }
private bool InsertOrUpdate(ClassTeacher classTeacher, ref StringBuilder sbError) { bool dbFlag = false; var list = _uofRepository.ClassTeacherRepository.GetListByTermID(_user.TermID, _user.SchoolID, ref dbFlag); if (dbFlag) { sbError.Append("Error getting class teacher list if the problem persit ask system admin"); return(false); } if (list != null) { var classTeacherExist = list.Where(c => c.TeacherID == classTeacher.TeacherID).FirstOrDefault(); if (classTeacherExist != null) { sbError.Append("Teacher already has a class"); return(false); } } var isSaved = _uofRepository.ClassTeacherRepository.Save(classTeacher, _user.Username, ref dbFlag); if (!isSaved) { sbError.Append("Error saving if the problem persit ask system admin"); return(false); } return(true); }
public JsonResult getSubjectTeacherListCount(long UserId, long SchoolId) { ClassTeacher classteacher = new ClassTeacher(); long Count = classteacher.getSubjectTeacherListCount(UserId, SchoolId); return(Json(Count, JsonRequestBehavior.AllowGet)); }
private void Show() { tablePersTeacher.Items.Clear(); Operations a = new ClassTeacher(); a.ShowPers(tablePersTeacher); }
private void Remove() { if (Index >= 0) { ClassTeacher.RemoveAt(Index); } }
private void ShowRank(string rank) { tablePersTeacher.Items.Clear(); TeacherInterface a = new ClassTeacher(); a.ShowPersRank(tablePersTeacher, rank); }
private void Remove() { if (Index >= 0) { var teacher = ClassTeacher[Index]; var list = new List <int>(); var element = ClassTeacher.Where(c => c.CodeOfTeacher == teacher.CodeOfTeacher).Select(t => t.CodeOfTeacher); foreach (var item in element) { list.Add(item); } if (list.Count == 2) { if (RequestToDataBase.Instance.requestDeleteFromTeacherAndDepartments(ClassTeacher, Index)) { ClassTeacher.Clear(); foreach (var value in RequestToDataBase.Instance.ReadTeachers()) { ClassTeacher.Add(value); } } } else { if (RequestToDataBase.Instance.requestDeleteFromTeacher(ClassTeacher, Index)) { ClassTeacher.Clear(); foreach (var value in RequestToDataBase.Instance.ReadTeachers()) { ClassTeacher.Add(value); } } } } }
private void Add() { var context = new TeacherVM(departments.ToArray()); var wind = new NewTeacher() { DataContext = context }; wind.ShowDialog(); if (wind.DialogResult == true) { bool res = false; if (context.Teacher != null) { res = RequestToDataBase.Instance.requestInsertIntoTeacher(context.Teacher); } if (context.Teacher.DepartmentTwo != null && context.Teacher.PostTwo != null) { res = RequestToDataBase.Instance.requestInsertIntoTeacherDepartmentTwo(context.Teacher) || res; } if (res) { ClassTeacher.Clear(); foreach (var value in RequestToDataBase.Instance.ReadTeachers()) { ClassTeacher.Add(value); } } } }
public ActionResult <object> Save([FromBody] ClassTeacher classTeacher) { try { Init(); StringBuilder sbError = new StringBuilder(""); if (!ModelState.IsValid || classTeacher == null) { Response.StatusCode = 400; return("Failed getting classTeacher id"); } else { var list = new List <ClassTeacher>(); list.Add(classTeacher); var isSaved = _classTeacherService.Save(list, ref sbError); if (isSaved <= 0) { Response.StatusCode = 400; return("classTeacher save failed " + sbError.ToString()); } else { return((string)"classTeacher saved successfully"); } } } catch (Exception er) { return(Error(er)); } }
public bool Save(ClassTeacher objClass, string modifiedBy, ref bool dbError) { try { using (var connection = GetConnection()) { var update = @"UPDATE ClassTeacher SET TeacherID = @TeacherID , LastModifiedBy = @modifiedBy WHERE ClassID = @ClassID AND TermID = @TermID AND IsDeleted Is NULL "; var id = connection.Execute(update, new { ClassID = objClass.ClassID, TermID = objClass.TermID, TeacherID = objClass.TeacherID, modifiedBy = modifiedBy, }); if (id <= 0) { var insert = @" INSERT INTO ClassTeacher ( ClassID , TermID , TeacherID , LastModifiedBy ) VALUES ( @ClassID, @TermID , @TeacherID , @modifiedBy ) "; var idI = connection.Execute(insert, new { ClassID = objClass.ClassID, TermID = objClass.TermID, TeacherID = objClass.TeacherID, modifiedBy = modifiedBy }); } return(true); } } catch (Exception er) { dbError = true; DbLog.Error(er); return(false); } }