private void button5_Click(object sender, EventArgs e) { if (Treatment_utiles.DeleteTreatment()) { Treatment_List.SelectedIndex = -1; Refresh_Screen(); MessageBox.Show("טיפול נמחק"); } else { MessageBox.Show(Access.ExplaindError()); } }
private void button3_Click(object sender, EventArgs e) { try { List <Col> values = new List <Col>() { new Col("treatment", Treatment_Preview_Name.Text), new Col("summery", Treatment_Preview_Decription.Text), new Col("price", int.Parse(Treatment_Preview_Price.Text)) }; if (Treatment_utiles.UpdateTreatment(values)) { Refresh_Screen(); MessageBox.Show("טיפול עודכן"); } else { MessageBox.Show(Access.ExplaindError()); } } catch { } }
private void Load_Treatments() { Load_List(Treatment_List, Treatment_utiles.getNames()); }
private void Load_Treatment() { Treatment_Preview_Name.Text = Treatment_utiles.GetValue("treatment"); Treatment_Preview_Decription.Text = Treatment_utiles.GetValue("summery"); Treatment_Preview_Price.Text = Treatment_utiles.GetValue("price"); }
private void Treatment_List_SelectedIndexChanged(object sender, EventArgs e) { Treatment_utiles.ChangeTreatment(Treatment_List.SelectedIndex); Load_Treatment(); }