Exemple #1
0
        public string GetStaffInformationManagementOfAbsenceBySMTBySchoolID(int schoolID)
        {
            string results          = string.Empty;
            JavaScriptSerializer js = new JavaScriptSerializer();

            try
            {
                SurveyRepository _repo = new SurveyRepository();
                StaffInformationSMTManagementOfAttendenceModel data = _repo.GetStaffInformationSMTManagementOfAttendenceBySchoolID(schoolID);

                results = js.Serialize(new { Message = "Success", Data = data });
            }
            catch (Exception ex)
            {
                results = js.Serialize(new { Message = string.Format("Error - {0}", ex.Message) });
            }

            return(results);
        }
        public static StaffInformationSMTManagementOfAttendenceModel Map(this StaffInformationSMTManagementOfAttendence original)
        {
            if (original == null)
            {
                return(null);
            }

            var row = new StaffInformationSMTManagementOfAttendenceModel()
            {
                ID = original.ID,
                HaveThereBeenStaffWhoHaveNotNeturnedToSchoolWithoutApproval = original.HaveThereBeenStaffWhoHaveNotNeturnedToSchoolWithoutApproval,
                NoOfStatePaidEducators = original.NoOfStatePaidEducators,
                NoOfPSStaff            = original.NoOfPSStaff,
                HasTheGDEInstitutedDisciplinaryProcesses = original.HasTheGDEInstitutedDisciplinaryProcesses,
                HowManyCasesInvolvedStatePaidEducators   = original.HowManyCasesInvolvedStatePaidEducators,
                HowManyCasesInvolvedPSStaff = original.HowManyCasesInvolvedPSStaff,
                SchoolID   = original.SchoolID,
                DateLogged = original.DateLogged
            };

            return(row);
        }
Exemple #3
0
        public string SaveStaffInformation(List <StaffInformationHeadCountModel> staffInformationHeadcount, List <StaffInformationManagementOfConcessionModel> staffInformationConcessions, StaffInformationSMTManagementOfAttendenceModel sMTManagementOfAttendence)
        {
            string               results    = string.Empty;
            List <string>        resultList = new List <string>();
            JavaScriptSerializer js         = new JavaScriptSerializer();

            try
            {
                SurveyRepository repo = new SurveyRepository();

                var learnerInfo = repo.SaveStaffInformationSMTManagementOfAttendence(sMTManagementOfAttendence);
                if (learnerInfo != null)
                {
                    resultList.Add("Success");
                }

                foreach (var item in staffInformationHeadcount)
                {
                    var data = repo.SaveStaffInformationHeadCount(item);
                    if (data != null)
                    {
                        resultList.Add("Success");
                    }
                }

                foreach (var item in staffInformationConcessions)
                {
                    var data = repo.SaveStaffInformationManagementOfConcession(item);
                    if (data != null)
                    {
                        resultList.Add("Success");
                    }
                }
            }
            catch (Exception ex)
            {
                resultList.Add(string.Format("Error - {0}", ex.Message));
            }

            results = js.Serialize(resultList);
            return(results);
        }