纽威
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.

74 lines
2.4 KiB

3 years ago
3 years ago
  1. using NFine.Data.Extensions;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Data;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using NFine.Code;
  9. using NFine.Repository;
  10. using System.Data.Common;
  11. using NFine.Domain._03_Entity.SRM;
  12. using ICS.Application.Entity;
  13. using Newtonsoft.Json;
  14. using System.Configuration;
  15. using System.Data.SqlClient;
  16. using ICS.Data;
  17. using Newtonsoft.Json.Linq;
  18. namespace NFine.Application.WMS
  19. {
  20. public class PrintApp : RepositoryFactory<ICSVendor>
  21. {
  22. public DataTable GetLableType()
  23. {
  24. string WorkPoint = NFine.Code.OperatorProvider.Provider.GetCurrent().Location.TrimEnd(',');
  25. string sql = @"
  26. select '' as F_ItemCode,'' as F_ItemName
  27. union all
  28. SELECT DISTINCT a.F_ItemCode,isnull(a.F_ItemName,'') as F_ItemName FROM dbo.Sys_SRM_ItemsDetail a left join Sys_SRM_Items b on a.F_ItemId=b.F_Id where b.F_EnCode='BQ001'";
  29. string role = NFine.Code.OperatorProvider.Provider.GetCurrent().RoleEnCode;
  30. DataTable dt = SqlHelper.GetDataTableBySql(sql);
  31. return dt;
  32. }
  33. public DataTable GetLableSourceID()
  34. {
  35. string WorkPoint = NFine.Code.OperatorProvider.Provider.GetCurrent().Location.TrimEnd(',');
  36. string sql = @"
  37. select '' as ID,'' as SourceName
  38. union all
  39. select distinct ID,SourceName from Sys_LableDataSource";
  40. string role = NFine.Code.OperatorProvider.Provider.GetCurrent().RoleEnCode;
  41. DataTable dt = SqlHelper.GetDataTableBySql(sql);
  42. return dt;
  43. }
  44. public DataTable GetSys_LablesID(string LableType)
  45. {
  46. string WorkPoint = NFine.Code.OperatorProvider.Provider.GetCurrent().Location.TrimEnd(',');
  47. string sql = @"
  48. select '' as ID,'' as LableName
  49. union all
  50. select distinct ID,LableName from Sys_Lables where LableType='{0}'";
  51. sql = string.Format(sql, LableType);
  52. string role = NFine.Code.OperatorProvider.Provider.GetCurrent().RoleEnCode;
  53. DataTable dt = SqlHelper.GetDataTableBySql(sql);
  54. return dt;
  55. }
  56. public DataTable SelectColumnName(string BeginTime, string EndTime)
  57. {
  58. string sql = @"select ColCode, ColName from ICSExtensionEnable
  59. where Enable=1
  60. order by cast(EATTRIBUTE1 as int)";
  61. DataTable dt = SqlHelper.GetDataTableBySql(sql);
  62. return dt;
  63. }
  64. }
  65. }