DataTable Select()
        {
            DataTable retVal = new DataTable();
            using (tempdbEntities tde = new tempdbEntities())
            {
                retVal = tde.pSelCustomer();

            }

            return retVal;
        }
Beispiel #2
0
 private void buttonSelect_Click(object sender, EventArgs e)
 {
     try
     {
         tempdbEntities tde = new tempdbEntities();
         dataGridViewSelectedData.DataSource = tde.pSelCustomer().ToArray();
     }
     catch (Exception)
     {
         MessageBox.Show("Could not select data");
     }
 }
Beispiel #3
0
        public string Select()
        {
            StringBuilder retVal = new StringBuilder();

            using (tempdbEntities tde = new tempdbEntities())
            {
                var results = tde.pSelCustomer();
                foreach (var item in results)
                {
                    retVal.AppendLine(item.CustomerId + ", " + item.CustomerName);
                }
            }

            return retVal.ToString();
        }