public DSContact GetContactData() { DSContact dsContact = new DSContact(); Contact oContact = new Contact(); oContact.LoadAll(); int i = 1; i++; return dsContact; }
public void LoadAll(DSContact dsContact) { ContactDAC dao = new ContactDAC(this); dao.SelectAll(dsContact); }
public void SelectAll(DSContact dsContact) { SqlCommand command = SQLHelper.CreateCommand("spContactSelectAll"); SqlDataAdapter adapter = new SqlDataAdapter(); adapter.SelectCommand = command; if (command.Connection.State == ConnectionState.Closed) command.Connection.Open(); try { adapter.Fill(dsContact.DTContact); } catch { throw; } finally { adapter.Dispose(); command.Connection.Close(); } }