Projectandprogram.cs 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using Cksoft.Unity;
  2. using System;
  3. namespace DllEapEntity
  4. {
  5. [Table("projectandprogram")]
  6. public class Projectandprogram : BaseEntity
  7. {
  8. ////自动产生代码开始&&此行不能删除
  9. #region 自动产生代码
  10. public Projectandprogram()
  11. {
  12. base.EntityStatusID = 1;
  13. }
  14. [ColDetail(10, "Id", 1, 1, 100, 1, "a.Id", "", 1, 1)]
  15. [Key]
  16. public int Id { get; set; }
  17. [ColDetail(20, "Recipe", 1, 1, 100, 1, "a.Recipe", "", 1, 1)]
  18. public string Recipe { get; set; }
  19. [ColDetail(30, "Project", 1, 1, 100, 1, "a.Project", "", 1, 1)]
  20. public string Project { get; set; }
  21. [ColDetail(40, "录入人代码", 1, 1, 100, 1, "a.RecCode", "", 1, 1)]
  22. public string RecCode { get; set; }
  23. [ColDetail(50, "录入日期", 1, 1, 100, 1, "a.RecTime", "", 1, 1)]
  24. public DateTime RecTime { get; set; }
  25. [ColDetail(60, "修改 人代码", 1, 1, 100, 1, "a.ModCode", "", 1, 1)]
  26. public string ModCode { get; set; }
  27. [ColDetail(70, "修改时间", 1, 1, 100, 1, "a.ModTime", "", 1, 1)]
  28. public DateTime ModTime { get; set; }
  29. [ColDetail(80, "FName", 1, 1, 100, 1, "b.FName", "", 1, 1)]
  30. public string RecName { get; set; }
  31. [ColDetail(90, "FName", 1, 1, 100, 1, "c.FName", "", 1, 1)]
  32. public string ModName { get; set; }
  33. public override string GetSelectSql()
  34. {
  35. return string.Format($"select { GetQueryColSql()} from { GetQueryTabSql()}");
  36. }
  37. public override string GetQueryColSql()
  38. {
  39. string sqlstr = "a.Id Id,a.Recipe Recipe,a.Project Project,a.RecCode RecCode,a.RecTime RecTime,a.ModCode ModCode,a.ModTime ModTime,b.FName RecName";
  40. sqlstr += ",c.FName ModName,0 EntityStatusID";
  41. return sqlstr;
  42. }
  43. public override string GetQueryTabSql()
  44. {
  45. string sqlstr = " projectandprogram a ";
  46. sqlstr += " left outer join staff b on a.reccode =b.fcode";
  47. sqlstr += " left outer join staff c on a.modcode =c.fcode";
  48. return sqlstr;
  49. }
  50. public override string GetQuerySortSql()
  51. {
  52. return "";
  53. }
  54. #endregion
  55. ////自动产生代码结束&&此行不能删除
  56. }
  57. }