You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.6 KiB

  1. using Swift.DAL.SwiftDAL;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Data;
  5. using System.Linq;
  6. using System.Text;
  7. namespace Swift.DAL.GridAutoDemo
  8. {
  9. public class EmployeeDetailsDao : RemittanceDao
  10. {
  11. public DbResult EmployeeRegister(EmployeeModel employee)
  12. {
  13. var sql = "EXEC Pro_EmployeeDetails ";
  14. sql += "@flag=" + FilterString(employee.Flag);
  15. sql += ",@Id =" + FilterString(employee.Id.ToString());
  16. sql += ",@Name =" + FilterString(employee.Name);
  17. sql += ",@Address = " + FilterString(employee.Address);
  18. sql += ",@CompanyJoinDate=" + FilterString(employee.CompanyJoinDate.ToString());
  19. sql += ",@DepartName=" + FilterString(employee.DepartName);
  20. sql += ",@Description=" + FilterString(employee.Description);
  21. sql += ",@DOB=" + FilterString(employee.DOB.ToString());
  22. sql += ",@Email=" + FilterString(employee.Email);
  23. sql += ",@MobileNo=" + FilterString(employee.MobileNo);
  24. sql += ",@WorkDayOnWeek=" + FilterString(employee.WorkDayOnWeek.ToString());
  25. return ParseDbResult(sql);
  26. }
  27. public DataRow GetEmployeeDetails(string Id)
  28. {
  29. var sql = "EXEC Pro_EmployeeDetails";
  30. sql += " @Flag ='S'";
  31. sql += ",@Id =" + FilterString(Id);
  32. return ExecuteDataRow(sql);
  33. }
  34. public DbResult Delete(string id)
  35. {
  36. var sql = "EXEC Pro_EmployeeDetails";
  37. sql += " @Flag ='D'";
  38. sql += ",@Id =" + FilterString(id);
  39. return ParseDbResult(sql);
  40. }
  41. }
  42. }