public ActionResult Index(ScheduleIndex m) { if (m.perDay > 0) { Patient_Doctor_Model patient_doctor_reg = new Patient_Doctor_Model() { ID = DataBase.Session.Load <Patient_Doctor_Model>(m.patientID).ID, DoctorID = Convert.ToInt32(Session["DOCID"]), PatientID = m.patientID, isDischarged = 0, readingPerDay = m.perDay }; DataBase.Session.Update(patient_doctor_reg); ViewBag.success = 1; } if (m.patientID > 0) { scheduleIndex.patientID = m.patientID; scheduleIndex.Patient = DataBase.Session.Query <PatientModel>().Where(x => x.ID == m.patientID).SingleOrDefault(); scheduleIndex.perDay = DataBase.Session.Query <Patient_Doctor_Model>().Where(x => (x.PatientID == m.patientID && x.DoctorID == Convert.ToInt32(Session["DOCID"]))).SingleOrDefault().readingPerDay; ViewBag.selected = 1; return(View(scheduleIndex));// RedirectToAction("ViewSchedule",new { pId = m.patientID }); } else { return(View(scheduleIndex)); } }
public async Task <string> DeleteScheduleItem(string index) { NetworkServiceUtil.Log("DeleteScheduleItem ==> called"); ScheduleIndex scheduleIndex = new ScheduleIndex(); scheduleIndex.deleteindex = (Convert.ToInt32(index)).ToString(); scheduleIndex.request = "delete"; scheduleIndex.info = "scheduler"; var deviceRes = await deviceService.DeleteScheduleIndex(scheduleIndex); var _DaysLeft = DeserializDeviceInfo(deviceRes); DaysLeft = _DaysLeft; DeviceInfoReceived?.Invoke(DaysLeft); return(deviceRes); }
public async Task <string> DeleteScheduleIndex(ScheduleIndex scheduleIndex) { try { if (scheduleIndex != null) { string jsonIgnoreNullValues = JsonConvert.SerializeObject(scheduleIndex, Formatting.Indented, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }); var info = await GetWsData(UrlConfig.GetFullURL(Endpoint.info, Endpoint_Method.GET, isNewFW: true), jsonIgnoreNullValues); return(info); } } catch (Exception e) { System.Diagnostics.Debug.WriteLine(e); } return(string.Empty); }
public Task <string> DeleteScheduleIndex(ScheduleIndex scheduleIndex) { throw new NotImplementedException(); }