private ReportInfoModel GetReport_Info(Organisation organisation, DateTime?returnModifiedDate, int snapshotYear)
        {
            DateTime snapshotDate = GetSnapshotDate(organisation.SectorType, snapshotYear);

            if (!IsValidSnapshotYear(snapshotDate.Year))
            {
                return(null);
            }

            var result = new ReportInfoModel {
                ReportingStartDate   = snapshotDate,
                ReportModifiedDate   = returnModifiedDate,
                ReportingRequirement =
                    ScopeBusinessLogic.GetLatestScopeStatusForSnapshotYear(organisation.OrganisationId, snapshotDate.Year)
            };

            return(result);
        }
예제 #2
0
        public void GetPersonalInfo(HttpContext context)
        {
            var userID      = Convert.ToInt32(Common.GetRequest("userID"));
            var tempUser    = MgrServices.UserAddService.GetEntitys(userID);
            var reportModel = new ReportInfoModel()
            {
                Age          = string.IsNullOrEmpty(tempUser._u_birthday)? "": Common.CalculateAgeCorrect(Convert.ToDateTime(tempUser._u_birthday), DateTime.Now).ToString(),
                CellPhone    = tempUser._u_tel,
                Department   = tempUser.departmentName,
                Email        = tempUser._u_email,
                LoginName    = tempUser._u_loginname,
                Sex          = tempUser._u_sex,
                UserName     = tempUser._u_name,
                WarningState = "",
                UserID       = tempUser._u_id.ToString()
            };

            context.Response.Write(JsonConvert.SerializeObject(reportModel));
        }
        private async Task <ReportInfoModel> GetReport_InfoAsync(Organisation organisation, DateTime?returnModifiedDate,
                                                                 int snapshotYear)
        {
            var snapshotDate = GetSnapshotDate(organisation.SectorType, snapshotYear);

            if (!IsValidSnapshotYear(snapshotDate.Year))
            {
                return(null);
            }

            var result = new ReportInfoModel
            {
                ReportingStartDate   = snapshotDate,
                ReportModifiedDate   = returnModifiedDate,
                ReportingRequirement =
                    await SubmissionService.ScopeBusinessLogic.GetLatestScopeStatusForSnapshotYearAsync(
                        organisation.OrganisationId, snapshotDate.Year)
            };

            return(result);
        }
예제 #4
0
 public ReturnViewModel()
 {
     ReportInfo = new ReportInfoModel();
 }