Sal
Sal
Sal
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;
using Guna.UI2.WinForms;
namespace CC1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
cn.Open();
SqlCommand cmd = new SqlCommand(" select * from Emp where Mat = '"
+ guna2TextBox1.Text + "' ", cn);
SqlDataReader r = cmd.ExecuteReader();
while (r.Read())
{
guna2TextBox1.Text = r[0].ToString();
guna2TextBox2.Text = r[1].ToString();
guna2ComboBox1.Text = r[2].ToString();
guna2ComboBox2.Text = r[3].ToString();
guna2TextBox3.Text = r[4].ToString();
guna2DateTimePicker1.Value = Convert.ToDateTime(r[5]);
}
cn.Close();
}
else
{
MessageBox.Show("Please Fill all data !");
}
}
}