private void AddButton_Click(object sender, EventArgs e) { if (nameBox1.Text != string.Empty && nameBox2.Text != string.Empty && nameBox3.Text != string.Empty) { AddPatient?.Invoke(); } }
/// <summary> /// adds new patient to the database /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <param name="stackpanel"></param> /// <param name="addPatient"></param> /// <param name="patientenDataGrid"></param> public void SavePatient(object sender, EventArgs e, StackPanel stackpanel, AddPatient addPatient, DataGrid patientenDataGrid) { Dictionary <string, string> array = new Dictionary <string, string>(); array["userid"] = Container.GetInstance.Get("userId"); foreach (object child in stackpanel.Children) { if (child.GetType() == typeof(TextBox)) { array[((TextBox)child).Name] = !string.IsNullOrEmpty(((TextBox)child).Text) ? ((TextBox)child).Text : null; } } if (Checkifempty(addPatient)) { MessageBox.Show("Niet alle velden zijn ingevuld!"); } else { ((QueryBuilder)MysqlSshConnection.InstanceCon).InsertHandler("patient", array); this.PatientOverzicht(patientenDataGrid); addPatient.Close(); } }
/// <summary> /// closes window /// </summary> /// <param name="window"></param> public void Terug(AddPatient window) { Home navigation = new Home(); window.Close(); navigation.ShowDialog(); }
private void metroButtonLogout_Click(object sender, EventArgs e) { panelEveryThingHolder.Controls.Clear(); AddPatient a = new AddPatient(); panelEveryThingHolder.Controls.Add(a); }
private void button1_Click(object sender, EventArgs e) { addp = new AddPatient(this); addp.StartPosition = FormStartPosition.CenterScreen; addp.Show(); }
public dynamic AddPat(Patient patient) { AddPatient addPatient = new AddPatient(); addPatient.id = "AddPatient"; addPatient.patientInfo = patient; return(addPatient); }
private void ButtonAddNewPatient(object sender, RoutedEventArgs e) { AddPatient addPatient = new AddPatient(); addPatient.ShowDialog(); SearchDataBaseForPatients(); comboBoxPatient.ItemsSource = patients; }
private void btnAddPatient_Click(object sender, RoutedEventArgs e) { patient = new AddPatientDialog(); patient.Parent = this; AddPatient child = new AddPatient(true); child.Close += new EventHandler(child_Close); patient.Content = child; patient.Show(); }
private void NewPatient_Load(object sender, EventArgs e) { var patientControl = new AddPatient(new DataModels.Customer()); patientControl.PatientSaved += PatientSave; patientControl.Close += Close; patientControl.Dock = System.Windows.Forms.DockStyle.Fill; panel1.Controls.Add(patientControl); }
public async Task <ActionResult> DeleteConfirmed(int id) { AddPatient addpatient = await db.Patients.FindAsync(id); db.Patients.Remove(addpatient); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
private void lblPatient_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { patient = new AddPatientDialog(); patient.Parent = this; AddPatient child = new AddPatient(false); child.Close += new EventHandler(child_Close); patient.Content = child; patient.Show(); }
private void AddPatient_button_Click(object sender, EventArgs e) { AddPatient addPatient = new AddPatient(); DialogResult result = addPatient.ShowDialog(); if (result == DialogResult.Yes) { this.getAllPatients_Click(sender, e); } }
public async Task <ActionResult> Edit([Bind(Include = "ID,name,FHname,Complaint,Sex,Address,Country,City,Place,Inpatient,Doctorcode,Testcode,Roomcode,DateAdmitted")] AddPatient addpatient) { if (ModelState.IsValid) { db.Entry(addpatient).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(addpatient)); }
static void Main(string[] args) { Utility.InitDb(); AddRoom.AddRooms(); AddDoctor.AddDoctors(); AddPatient.AddPatients(); AddDisease.AddDiseases(); AddExam.ImportExams(); AddRehabilitation.ImportRehabilitation(); AddSurgery.ImportSurgery(); }
// GET: /Admin/AddPatient/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AddPatient addpatient = await db.Patients.FindAsync(id); if (addpatient == null) { return(HttpNotFound()); } return(View(addpatient)); }
public bool Checkifempty(AddPatient patientView) { foreach (object fields in patientView.Stackpanelpatients.Children) { if (fields.GetType() == typeof(TextBox)) { if (String.IsNullOrEmpty(((TextBox)fields).Text)) { return(true); } } } return(false); }
public bool ImportPatient(AddPatient addPatient) { try { Name = addPatient.NNAME.Text; InsuranceID = int.Parse(addPatient.Insurancebox.SelectedValue.ToString()); Weight = int.Parse(addPatient.Weight.Text); DateOfBirth = addPatient.DateOfBirth.Value; CityID = int.Parse(addPatient.CityBox.SelectedValue.ToString()); RegionID = int.Parse(addPatient.RegionBox.SelectedValue.ToString()); Phone = addPatient.Phone.Text; return(true); } catch { return(false); } }
public HttpResponseMessage AddPatient([FromBody] AddPatient patient) { return(requestHandlerAddPatient.CreateGbObject2(Request, patient)); }
/// <summary> /// opens the create patient window /// </summary> /// <param name="patientenDataGrid"></param> public void AddPatientView(DataGrid patientenDataGrid) { AddPatient addPatient = new AddPatient(patientenDataGrid); addPatient.ShowDialog(); }
public async void AddNewPatient() { Value = true; var connection = await apiService.CheckConnection(); if (!connection.IsSuccess) { await Application.Current.MainPage.DisplayAlert( Languages.Warning, Languages.CheckConnection, Languages.Ok); return; } if (string.IsNullOrEmpty(FirstName) || string.IsNullOrEmpty(LastName) || string.IsNullOrEmpty(FiscalCode)) { Value = true; return; } if (Client == null || Residence == null || Domicile == null) { Value = true; return; } if (SelectedTitle.Key == null) { await Application.Current.MainPage.DisplayAlert("Error", "Please Select Title", "ok"); return; } if (SelectedSex.Key == null) { await Application.Current.MainPage.DisplayAlert("Error", "Please Select Gender", "ok"); return; } var _fiscalData = new FiscalData { codeDestinaterio = CodeDestinatario, inderizioPec = InderizioPec, adresseFacturation = BillingAddress, conditionPaymentDescription = NotePayment, conditionPayment = "CCD", pIVA = PIVA }; var _domicile = new AddDomicile { comuniLocal = Domicile, street = StreetDomicile }; var _residence = new AddResidence { comuniLocal = Residence, street = StreetResidence }; var addPatient = new AddPatient { title = SelectedTitle.Key, firstName = FirstName, lastName = LastName, fullName = SelectedTitle.Key + " " + FirstName + " " + LastName, fiscalCode = FiscalCode, gender = SelectedSex.Key, birthDate = DateNow, //Convert.ToDateTime(DateNow), placeOfBirth = PlaceOfBirth, note = Note, phone = Phone, cellPhone = CellPhone, email = Email, //fiscalData = _fiscalData, client = Client, domicile = _domicile, residence = _residence }; var cookie = Settings.Cookie; //.Split(11, 33) var res = cookie.Substring(11, 32); var response = await apiService.Save <AddPatient>( "https://portalesp.smart-path.it", "/Portalesp", "/patient/save", res, addPatient); Debug.WriteLine("********responseIn ViewModel*************"); Debug.WriteLine(response); /* if (!response.IsSuccess) * { * await Application.Current.MainPage.DisplayAlert("Error", response.Message, "ok"); * return; * }*/ Value = false; MessagingCenter.Send((App)Application.Current, "OnSaved"); DependencyService.Get <INotification>().CreateNotification("PortalSP", "Patient Added"); await Navigation.PopAsync(); }