예제 #1
0
        private bool SaveDataReport(TechInspection techInspection, string status)
        {
            var report = reportRep.GetReports().
                         Where(x => x.TechInspectionId == techInspection.TechInspectionId & x.Status == status).FirstOrDefault();

            if (report == null)
            {
                techInspection.IsExpired = true;
                techInspectionRep.ChangeStatus(techInspection);


                reportRep.AddReport(new Report
                {
                    TechInspectionId = techInspection.TechInspectionId,
                    Status           = status
                });
                return(true);
            }
            return(false);
        }
예제 #2
0
 public ActionResult UploadReport(string id, string version, HttpPostedFileBase uploadFile)
 {
     _repository.AddReport(id, version, uploadFile.InputStream);
     return(Content("Success"));
 }