public bool Delete(string ProjectIdtext) { try { string query = "DELETE From UpcomingEventTable WHERE ProjectID='" + ProjectIdtext + "'"; DatabaseConnectionClass dcc = new DatabaseConnectionClass(); dcc.ConnectWithDB(); int x = dcc.ExecuteSQL(query); return(true); } catch (Exception ex) { return(false); } }
public bool DeleteReciever(string RecieverIdtext) { try { string query = "DELETE From RecieverPeopleTable WHERE RecieverId='" + RecieverIdtext + "'"; DatabaseConnectionClass dcc = new DatabaseConnectionClass(); dcc.ConnectWithDB(); int x = dcc.ExecuteSQL(query); return(true); } catch (Exception ex) { return(false); } }
// } //} public bool Update(Donarpeople dp) { try { string query2 = "UPDATE DonatorInfoTable SET DonarName = '" + dp.DonarName + "', DonarPhoneno = " + dp.DonarPhoneno + "WHERE DonarId = '" + dp.DonarId + "'"; DatabaseConnectionClass dcc = new DatabaseConnectionClass(); dcc.ConnectWithDB(); int x = dcc.ExecuteSQL(query2); return(true); } catch (Exception exasz) { return(false); } }
bool Insert(DonationByNgo d) { try { string query = "INSERT into DonationNGOgivenByTable VALUES ('" + d.DonationId + "', '" + d.DonationTitle + "', '" + d.RecieverId + "', '" + d.GivenTime + "', '" + d.DonationItem + "')"; DatabaseConnectionClass dcc = new DatabaseConnectionClass(); dcc.ConnectWithDB(); int x = dcc.ExecuteSQL(query); return(true); } catch (Exception exa) { return(false); } }
public bool Updater(Employee pas22nd) { try { string query2 = "UPDATE EmployeeTable SET EmployeePassword = '******' WHERE EmployeeId = '" + pas22nd.EmployeeId + "'"; DatabaseConnectionClass dcc = new DatabaseConnectionClass(); dcc.ConnectWithDB(); int x = dcc.ExecuteSQL(query2); return(true); } catch (Exception exasjuz) { return(false); } }
public bool Updatex(UpcomingEvent xaxxc) { try { string query2 = "UPDATE UpcomingEventTable SET Projectname = '" + xaxxc.Projectname + "', Projectarea = '" + xaxxc.Projectarea + "',ProposedDate = '" + xaxxc.ProposedDate + "' WHERE ProjectID = '" + xaxxc.ProjectID + "'"; // string query2 = "UPDATE UpcomingEvent SET Projectname = '" + tas.Projectname + "', Projectarea = "' + tas.Projectarea "' WHERE ProposedDate = '" + tas.ProposedDate + "'; DatabaseConnectionClass dcc = new DatabaseConnectionClass(); dcc.ConnectWithDB(); int x = dcc.ExecuteSQL(query2); return(true); } catch (Exception exasz) { return(false); } }
public bool Insert(UpcomingEvent dpa) { try { //String combo1 = Convert.ToString(this.DonationTitleCombobox.SelectedItem); RecieverPhone string query = "INSERT into UpcomingEventTable VALUES ('" + dpa.ProjectID + "', '" + dpa.Projectname + "', '" + dpa.Projectarea + "', '" + dpa.ProposedDate + "')"; DatabaseConnectionClass dcc = new DatabaseConnectionClass(); dcc.ConnectWithDB(); int x = dcc.ExecuteSQL(query); return(true); } catch (Exception exfa) { return(false); } }