Query_YL.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. using System;
  2. using System.Data;
  3. using Core.Mes.ServerFrameWork;
  4. using Core.Mes.IBaseInterface;
  5. using System.Collections;
  6. namespace Core.XgMes.Server.JGKC.RollManager
  7. {
  8. /// <summary>
  9. /// Query_YL 的摘要说明。
  10. /// </summary>
  11. public class Query_YL : Core.Mes.ServerFrameWork.IComponent
  12. {
  13. public Query_YL()
  14. {
  15. //
  16. // TODO: 在此处添加构造函数逻辑
  17. //
  18. }
  19. public override int maxValue
  20. {
  21. get
  22. {
  23. return 100;
  24. }
  25. }
  26. public override int minValue
  27. {
  28. get
  29. {
  30. return 50;
  31. }
  32. }
  33. public ReturnObject BuressQuery(string _Where,string _Type)
  34. {
  35. try
  36. {
  37. string strOut="";
  38. string strSql="SELECT A.CREATOR,TO_CHAR( A.CREATETIME,'YYYY-MM-DD HH24:MI:SS')CREATETIME,"+
  39. "A.OLD_SAMPL_NO,A.NOW_BUTTRESS,A.OLD_BUTTRESS,"+
  40. "B.NAME_ CLASSORDER,C.NAME_ CLASSTEAM,"+
  41. "A.HANDLEMAN,A.HANDLEMODE,TO_CHAR( A.CREATETIME,'YYYY-MM-DD HH24:MI:SS')TIMENAME,"+
  42. "A.REMARK FROM {0},SCM_BASE_INFO B ,SCM_BASE_INFO C "+
  43. "WHERE A.CLASSORDER=B.ID_ AND A.CLASSTEAM=C.ID_"+_Where;
  44. switch(_Type)
  45. {
  46. case "YL":
  47. strSql=string.Format(strSql,new string[]{" KCJ3_STUFFMOVEBUTTRESSLIST_ZW A "});
  48. break;
  49. case "CP":
  50. strSql = string.Format(strSql, new string[] { "KCJ3_TURNOFFMOVEBUTTRESSLIST_Z A" });
  51. break;
  52. }
  53. System.Data.DataSet ds = this.DBManager.ExecuteQuery(strSql,out strOut);
  54. if(ds!=null && ds.Tables.Count==1 && ds.Tables[0].Rows.Count>0)
  55. {
  56. ds.Tables[0].TableName = "KCJ_MOVEBUTTRESSLIST";
  57. return new ReturnObject(ds);
  58. }
  59. else
  60. {
  61. return new ReturnObject(null);
  62. }
  63. }
  64. catch(Exception ex)
  65. {
  66. System.Diagnostics.Debug.WriteLine(ex.ToString());
  67. return new ReturnObject(null,ex.ToString());
  68. }
  69. }
  70. }
  71. }