static void Main() { int empno; Console.WriteLine("Enter Employ No "); empno = Convert.ToInt32(Console.ReadLine()); EmployDao dao = new EmployDao(); string result = dao.DeleteEmp(empno); Console.WriteLine(result); }
static void Main(string[] args) { EmployDao dao = new EmployDao(); SqlDataReader dr = dao.ShowEmp(); while (dr.Read()) { Console.WriteLine("Employ No " + dr["empno"]); Console.WriteLine("Employ Name " + dr["nam"]); Console.WriteLine("Department " + dr["dept"]); Console.WriteLine("Designation " + dr["desig"]); Console.WriteLine("Basic " + dr["basic"]); Console.WriteLine("------------------------------------"); } }
static void Main() { Emp emp = new Emp(); Console.WriteLine("Enter Employ No "); emp.Empno = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Enter Name "); emp.Name = Console.ReadLine(); Console.WriteLine("Enter Department "); emp.Dept = Console.ReadLine(); Console.WriteLine("Enter Designation "); emp.Desig = Console.ReadLine(); Console.WriteLine("Enter Basic "); emp.Basic = Convert.ToInt32(Console.ReadLine()); EmployDao dao = new EmployDao(); Console.WriteLine(dao.AddEmploy(emp)); }
static void Main() { int empno; Console.WriteLine("Enter Employ No "); empno = Convert.ToInt32(Console.ReadLine()); EmployDao dao = new EmployDao(); SqlDataReader dr = dao.SearchEmp(empno); if (dr.Read()) { Console.WriteLine("Employ Name " + dr["nam"]); Console.WriteLine("Department " + dr["dept"]); Console.WriteLine("Designation " + dr["desig"]); Console.WriteLine("Basic " + dr["basic"]); } else { Console.WriteLine("*** Record Not Found ***"); } }