Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. public class Employee
  2. {
  3. public String EmployeeNAme;
  4. public int EmployeeID;
  5. public double Salary;
  6. public ArrayList emp = new ArrayList();
  7.  
  8.  
  9. }
  10.  
  11. class EmployeeDAL : Employee
  12. {
  13.  
  14.  
  15. public bool add (Employee e)
  16. {
  17. emp.Add(e);
  18. if (emp.Contains("e") == true)
  19. {
  20. return true;
  21. }
  22. else
  23. {
  24. return false;
  25. }
  26.  
  27. }
  28. public bool Delete(int id)
  29. {
  30. emp.RemoveAt(id);
  31. if (emp.Contains(id) != true)
  32. {
  33. return true;
  34. }
  35. else
  36. {
  37. return false;
  38. }
  39. }
  40. public String SearchEmployee(int id)
  41. {
  42.  
  43. String emp = Convert.ToString(emp[id]);
  44. return emp;
  45. }
  46.  
  47.  
  48. }
  49.  
  50.  
  51. class Program: Employee
  52. {
  53. static void Main(string[] args)
  54. {
  55.  
  56.  
  57.  
  58. }
  59. }
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement