コード例 #1
0
        public ActionResult AcknowledgeRecord(RecordViewModel record)
        {
            Session["DoctorId"] = null;
            DateTime Tommorow = new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day + 1);

            recordService.AddRecord(new RecordDTO {
                Date = Tommorow, DoctorId = record.DoctorId, DoctorName = record.DoctorName, PatientId = record.PatientId, PatientName = record.PatientName, Time = record.Time, Cabinet = record.Cabinet
            });
            return(RedirectToRoute(new { Controller = "Home", Action = "MainPage" }));
        }
コード例 #2
0
        public HttpResponseMessage PostRecord(RecordDTO record)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }

            try
            {
                _recordService.AddRecord(record);

                return(Request.CreateResponse(HttpStatusCode.OK));
            }
            catch
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }
        }
コード例 #3
0
 public void CollectNeedPreparingDatta(NeedPrepaingDataDto needPrepaing)
 {
     _iRecordService.AddRecord(needPrepaing.RecordDto);
     //_iRecordDetailService.AddListRecord(needPrepaing.RecordDetail,needPrepaing.ColorL,needPrepaing.ColorR);
 }
コード例 #4
0
 public async Task <ActionResult <Record> > PostRecord(Record record)
 {
     _service.AddRecord(record);
     return(CreatedAtAction("GetRecord", new { id = record.RecordId }, record));
 }