public static DeleteAcount deleteAcount(DeleteAcount delete) { try { string Query = " delete from MovementsAccount where AcountID='" + delete.AcountID + "' delete from AcountType where AcountID='" + delete.AcountID + "' delete from Acount where AcountID='" + delete.AcountID + "' delete from Login where Login.PersonID='" + delete.PersonID + "' delete from installation where PersonID='" + delete.PersonID + "' delete from Person where PersonID='" + delete.PersonID + "'"; SqlConnection SQLConn = new SqlConnection(ConnectionString); SqlCommand MyCommand = new SqlCommand(Query, SQLConn); SqlDataReader MyReader; SQLConn.Open(); MyReader = MyCommand.ExecuteReader(); SQLConn.Close(); } catch (Exception ex) { throw ex; } return(null); }
public DeleteAcount deleteAcount(DeleteAcount delete) { string guid = Guid.NewGuid().ToString(); return(DataBaseService.deleteAcount(delete)); }