public async Task <IActionResult> Edit(int id, [Bind("CompleteListID,MedicalRecord,LastName,FirstName,Physician,DOB,TreatmentDays,Age,Gender,Address,PhoneNumber,Email,TreatmentTime,AccessType,KBath,CaBath,NaBath,BiCarb,Temp,DialyzerSize,Comments")] CompleteList completeList) { if (id != completeList.CompleteListID) { return(NotFound()); } if (ModelState.IsValid) { try { context.Update(completeList); await context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CompleteListExists(completeList.CompleteListID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(completeList)); }
/// <summary> /// Called after the task is complete /// </summary> /// <param name="action"></param> /// <returns></returns> public UnityTask <TResult> ContinueWith(Action <UnityTask <TResult> > action) { if (IsCompleted) { action(this); } else { CompleteList.Add(action); } return(this); }
public void TaskDownload(TaskViewModel from) { if (DownloadList.Contains(from) == false) { if (ErrorList.Contains(from)) { ErrorList.Remove(from); } if (CompleteList.Contains(from)) { CompleteList.Remove(from); } DownloadList.Insert(0, from); } }
public void DeleteTask(TaskViewModel from) { if (DownloadList.Contains(from)) { DownloadList.Remove(from); } if (CompleteList.Contains(from)) { CompleteList.Remove(from); } if (ErrorList.Contains(from)) { ErrorList.Remove(from); } }
public IActionResult RemovePatient(int[] patientIds) //Comes from piatientIds in checkbox id ="" in Remove View { //Remove patient from List //Loop through list created from int[] patientIds foreach (int patientId in patientIds) { //Still can use same array of Ids but you are matching them with PatientMasterLists (from DbContext) //Create a instance of PatientMasterlist(thePatient) and use linq qurey to draw what you want CompleteList thePatient = context.CompleteLists.Single(p => p.CompleteListID == patientId); context.CompleteLists.Remove(thePatient); } context.SaveChanges(); return(Redirect("/PatientMasterList/Index")); }
protected override void OnTaskComplete() { foreach (var d in CompleteList) { if (d != null) { d.DynamicInvoke(this); } } CompleteList.Clear(); if (IsSuccess) { foreach (var d in SuccessList) { if (d != null) { d.DynamicInvoke(Result); } } } SuccessList.Clear(); }
public IActionResult AddPatient(AddCompleteListViewModle addCompleteListViewModle) { if (ModelState.IsValid) { //Add new Patient to existing patient list CompleteList newCompletList = new CompleteList { MedicalRecord = addCompleteListViewModle.MedicalRecord, FirstName = addCompleteListViewModle.FirstName, LastName = addCompleteListViewModle.LastName, Physician = addCompleteListViewModle.Physician, TreatmentDays = addCompleteListViewModle.TreatmentDays, Age = addCompleteListViewModle.Age, DOB = addCompleteListViewModle.DOB, Gender = addCompleteListViewModle.Gender, Address = addCompleteListViewModle.Address, PhoneNumber = addCompleteListViewModle.PhoneNumber, Email = addCompleteListViewModle.Email, TreatmentTime = addCompleteListViewModle.TreatmentTime, AccessType = addCompleteListViewModle.AccessType, KBath = addCompleteListViewModle.KBath, CaBath = addCompleteListViewModle.CaBath, NaBath = addCompleteListViewModle.NaBath, BiCarb = addCompleteListViewModle.BiCarb, Temp = addCompleteListViewModle.Temp, DialyzerSize = addCompleteListViewModle.DialyzerSize, Comments = addCompleteListViewModle.Comments }; context.CompleteLists.Add(newCompletList); //From Dbset context.SaveChanges(); //*****always have to save****** return(Redirect("/PatientMasterList/Index")); } return(View(addCompleteListViewModle)); }
public List <(Pressure, SpecificEnergy)> GetEnvelopePhase() { List <(Pressure, SpecificEnergy)> localListLiq = new List <(Pressure, SpecificEnergy)>(); List <(Pressure, SpecificEnergy)> localListGas = new List <(Pressure, SpecificEnergy)>(); List <(Pressure, SpecificEnergy)> CompleteList = new List <(Pressure, SpecificEnergy)>(); Pressure Increment = (CriticalPressure - LimitPressureMin) / (10000); //List<Pressure> PressureList = new List<Pressure>(); //for (Pressure i = CriticalPressure; i > LimitPressureMin; i -= Increment) //{ // PressureList.Add(i); // Increment *= 1.10; //} for (Pressure i = CriticalPressure - Pressure.FromBars(1); i > LimitPressureMin; i -= Increment) { UpdatePX(i, 0); if (!FailState) { localListLiq.Add((i, Enthalpy)); } UpdatePX(i, 1); if (!FailState) { localListGas.Add((i, Enthalpy)); } Increment *= 1.10; } //localListLiq.Sort((x, y) => y.Item1.CompareTo(x.Item1)); //We dont want the Critical point to be there twice //localListLiq.RemoveAt(0); //Merging into one list foreach (var item in localListLiq.AsEnumerable().Reverse()) { CompleteList.Add(item); } foreach (var item in localListGas) { CompleteList.Add(item); } return(CompleteList); }
public void TaskComplete(TaskViewModel from) { DownloadList.Remove(from); CompleteList.Insert(0, from); }