예제 #1
0
        public DSContact GetContactData()
        {
            DSContact dsContact = new DSContact();

            Contact oContact = new Contact();

            oContact.LoadAll();

            int i = 1;
            i++;

            return dsContact;
        }
예제 #2
0
파일: Contact.cs 프로젝트: wjkong/MicNets
 public void LoadAll(DSContact dsContact)
 {
     ContactDAC dao = new ContactDAC(this);
     dao.SelectAll(dsContact);
 }
예제 #3
0
        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();
            }
        }