Click here to Skip to main content
15,915,094 members
Home / Discussions / C#
   

C#

 
GeneralRe: Plot line graph from database Pin
Syafiqah Zahirah15-May-14 7:13
Syafiqah Zahirah15-May-14 7:13 
GeneralRe: Plot line graph from database Pin
Syafiqah Zahirah20-May-14 9:24
Syafiqah Zahirah20-May-14 9:24 
QuestionDeleting Read Bytes Pin
computerpublic10-May-14 23:49
computerpublic10-May-14 23:49 
AnswerRe: Deleting Read Bytes Pin
OriginalGriff11-May-14 0:49
mveOriginalGriff11-May-14 0:49 
GeneralRe: Deleting Read Bytes Pin
computerpublic11-May-14 5:58
computerpublic11-May-14 5:58 
GeneralRe: Deleting Read Bytes Pin
OriginalGriff11-May-14 6:22
mveOriginalGriff11-May-14 6:22 
GeneralRe: Deleting Read Bytes Pin
Richard MacCutchan11-May-14 7:17
mveRichard MacCutchan11-May-14 7:17 
GeneralRe: Deleting Read Bytes Pin
Richard MacCutchan11-May-14 7:17
mveRichard MacCutchan11-May-14 7:17 
QuestionHow Do I Select Particular Data From Sql Database In C#? Pin
hahaahahaahahhahahahhahaha10-May-14 18:29
hahaahahaahahhahahahhahaha10-May-14 18:29 
AnswerRe: How Do I Select Particular Data From Sql Database In C#? Pin
OriginalGriff10-May-14 21:31
mveOriginalGriff10-May-14 21:31 
QuestionUpdating UI from Task Pin
GrooverFromHolland10-May-14 5:40
GrooverFromHolland10-May-14 5:40 
AnswerRe: Updating UI from Task Pin
Eddy Vluggen12-May-14 8:31
professionalEddy Vluggen12-May-14 8:31 
GeneralRe: Updating UI from Task Pin
GrooverFromHolland13-May-14 10:31
GrooverFromHolland13-May-14 10:31 
GeneralRe: Updating UI from Task Pin
Eddy Vluggen14-May-14 7:19
professionalEddy Vluggen14-May-14 7:19 
QuestionEditing values in List? Pin
Member 1044193910-May-14 4:16
professionalMember 1044193910-May-14 4:16 
AnswerRe: Editing values in List? Pin
Wes Aday10-May-14 4:25
professionalWes Aday10-May-14 4:25 
AnswerRe: Editing values in List? Pin
pradeep surya10-May-14 5:19
pradeep surya10-May-14 5:19 
AnswerRe: Editing values in List? Pin
Member 1044193910-May-14 6:33
professionalMember 1044193910-May-14 6:33 
AnswerRe: Editing values in List? Pin
Wes Aday10-May-14 14:08
professionalWes Aday10-May-14 14:08 
AnswerRe: Editing values in List? Pin
BillWoodruff10-May-14 13:31
professionalBillWoodruff10-May-14 13:31 
AnswerRe: Editing values in List? Pin
Emre Ataseven11-May-14 7:05
professionalEmre Ataseven11-May-14 7:05 
QuestionError : Expected class,delegate,enum, interface,or struct Pin
Member 104511519-May-14 16:02
Member 104511519-May-14 16:02 
AnswerRe: Error : Expected class,delegate,enum, interface,or struct Pin
BillWoodruff9-May-14 16:44
professionalBillWoodruff9-May-14 16:44 
QuestionError : Expected class,delegate,enum, interface,or struct Pin
Member 104511519-May-14 16:01
Member 104511519-May-14 16:01 
Hep

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 Hastane_Randevu_Sistemi
{
public partial class Giris : Form
{
public Giris()
{
InitializeComponent();
}

private void button2_Click(object sender, EventArgs e)
{
RandevuAl frm = new RandevuAl();
frm.Show();
this.Hide();
}

private void button1_Click(object sender, EventArgs e)
{
comboBox1.Text = "";
comboBox2.Text = "";
comboBox3.Text = "";
comboBox4.Text = "";
cmbbolum.Text = "";
}

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
{
GetCountry();
}
}

private DataTable Connection(string commandType)
{
DataTable dataTable = new DataTable();
SqlConnection con = new SqlConnection("Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\vt.mdf;Integrated Security=True;Connect Timeout=30");
con.Open();
SqlCommand command = new SqlCommand(commandType);
command.Connection = con;
SqlDataAdapter dataAdapter = new SqlDataAdapter(command);
dataAdapter.Fill(dataTable);
con.Close();
return dataTable;
}

private void GetCountry()
{
DataTable dataTable = new DataTable();
dataTable = Connection("select * from IL");
comboBox1.DisplayMember = "COUNTRYNAME";
comboBox1.ValueMember = "GUID";
comboBox1.DataSource = dataTable;
}

private void GetCity(string CountryId)
{
DataTable dataTable = new DataTable();
dataTable = Connection("Select * from vt where IL ='" + CountryId + "'");
comboBox2.DisplayMember = "İlçe Adı";
comboBox2.ValueMember = "GUID";
comboBox2.DataSource = dataTable;
}

private void cboCountry_SelectionChangeCommitted(object sender, EventArgs e)
{
GetCity(comboBox1.SelectedValue.ToString());
}
}

private void Giris_Load(object sender, EventArgs e)
{


}
}
AnswerRe: Error : Expected class,delegate,enum, interface,or struct Pin
Richard MacCutchan9-May-14 21:38
mveRichard MacCutchan9-May-14 21:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.