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" })); }
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)); } }
public void CollectNeedPreparingDatta(NeedPrepaingDataDto needPrepaing) { _iRecordService.AddRecord(needPrepaing.RecordDto); //_iRecordDetailService.AddListRecord(needPrepaing.RecordDetail,needPrepaing.ColorL,needPrepaing.ColorR); }
public async Task <ActionResult <Record> > PostRecord(Record record) { _service.AddRecord(record); return(CreatedAtAction("GetRecord", new { id = record.RecordId }, record)); }