public static bool DeleteTreatment() { if (Selected_Treatment == -1) { return(false); } Condition condition = new Condition("id", int.Parse(GetValue("id"))); return(Access.Execute(SQL_Queries.Delete("treatments", condition))); }
public static bool DeleteCar(int number) { bool execute = Access.Execute(SQL_Queries.Delete("cars", new Condition("car_number", number))); if (execute) { Refresh(); } return(execute); }
public bool remove_user() { try { bool execute = Access.Execute(SQL_Queries.Delete("people", new Condition("id", int.Parse(id)))); Assets.Refresh(); return(execute); } catch { return(false); } }
private void Worker_Register_Finish(object sender, EventArgs e) { if (Wizzard_Helper.inputValidator(Worker_Profile_Panel) && Wizzard_Helper.inputValidator(Worker_User_panel)) { try { List <object> profile = new List <object>() { int.Parse(Worker_Id.Text), Worker_fname.Text, Worker_lname.Text, Worker_Bdate.Value.ToShortDateString(), Worker_gender.Text, Worker_phone.Text, Worker_email.Text, }, user = new List <object>() { int.Parse(Worker_Id.Text), Worker_password.Text, Worker_Admin.Checked }; if (Access.Execute(SQL_Queries.Insert("people", profile)) && Access.Execute(SQL_Queries.Insert("workers", user))) { Refresh_Screen(); MessageBox.Show("inserted"); } else { MessageBox.Show(Access.ExplaindError()); Access.Execute(SQL_Queries.Delete("people", new Condition("id", int.Parse(Worker_Id.Text)))); } } catch { } } else { MessageBox.Show("אנא מלא את השדות החסרים"); } }
public static bool DeleteUser() { return(Access.Execute(SQL_Queries.Delete("people", new Condition("id", user_id)))); }
public static bool RemoveUser(int id) { return Access.Execute(SQL_Queries.Delete("people", new Condition("id",id))); }