using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace DgsData_b
{
public partial class DGSOrderForm : Form
{
SqlConnection con = new SqlConnection(@"Data Source = C:\Users\User\source\repos\DgsData_b.sn\DgsData_b\phone_book_searchDataSet.xsd");
public DGSOrderForm()
{
InitializeComponent();
}
private void DGSOrderForm_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'phone_book_searchDataSet.orderforms_data' table. You can move, or remove it, as needed.
this.orderforms_dataTableAdapter.Fill(this.phone_book_searchDataSet.orderforms_data);
//
}
private void modelComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void lengthComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void colourComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void finishComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void extrasComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void groupBox2_Enter(object sender, EventArgs e)
{
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
}
private void groupBox5_Enter(object sender, EventArgs e)
{
}
private void custiDLabel_Click(object sender, EventArgs e)
{
}
private void groupBox1_Enter(object sender, EventArgs e)
{
}
private void groupBox7_Enter(object sender, EventArgs e)
{
}
private void notesLabel_Click(object sender, EventArgs e)
{
}
private void toolStripButton1_Click(object sender, EventArgs e)
{
this.Close();
}
private void orderforms_dataBindingNavigator_RefreshItems(object sender, EventArgs e)
{
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(@"C:\Users\User\source\repos\DgsData_b.sn\DgsData_b\phone_book_searchDataSet.xsd");
string sql = "SELECT concat(FirstName,' ',Surname) as name FROM phone_book_search.tblcustomers";
SqlCommand cmd = new SqlCommand(sql, con);
con.Open();
SqlDataReader rd = cmd.ExecuteReader();
while (rd.Read())
{
string FirstName = rd.GetString(1);
string Surname = rd.GetString(2);
Name = FirstName + " " + Surname;
con.Close();
}
}
}
}