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.

70 lines
2.4 KiB

  1. using NFine.Domain._03_Entity.SRM;
  2. using NFine.Repository;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using NFine.Data.Extensions;
  9. using System.Data;
  10. using NFine.Code;
  11. using System.Data.Common;
  12. using Newtonsoft.Json;
  13. using System.Configuration;
  14. using System.Net;
  15. using System.IO;
  16. using Newtonsoft.Json.Linq;
  17. namespace NFine.Application.WMS
  18. {
  19. public class PDAVersionApp : RepositoryFactory<ICSVendor>
  20. {
  21. public DataTable GetGridJson(string queryJson, ref Pagination jqgridparam)
  22. {
  23. DataTable dt = new DataTable();
  24. var queryParam = queryJson.ToJObject();
  25. List<DbParameter> parameter = new List<DbParameter>();
  26. string sql = @"SELECT a.guid,a.ProjectCode,a.ProjectName,a.Version,a.URL,a.MUSERCode,a.MUSERName,a.MTIME FROM ICSVersions a WHERE 1=1 ";
  27. //多站点
  28. if (NFine.Code.OperatorProvider.Provider.GetCurrent().RoleEnCode != "admin")
  29. {
  30. sql += " and a.WorkPointCode in (" + NFine.Code.OperatorProvider.Provider.GetCurrent().Location.TrimEnd(',') + ")";
  31. }
  32. //if (NFine.Code.OperatorProvider.Provider.GetCurrent().RoleEnCode == "Vendor")
  33. //{
  34. // sql += " and a.VenCode='" + NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode + "'";
  35. //}
  36. return Repository().FindTablePageBySql(sql.ToString(), parameter.ToArray(), ref jqgridparam);
  37. }
  38. public string Update(string ID, string Version, string URL, ref Pagination jqgridparam)
  39. {
  40. string sql ;
  41. return "";
  42. }
  43. public DataTable GetInputValue(string ID)
  44. {
  45. try
  46. {
  47. DataTable dt = new DataTable();
  48. //var queryParam = queryJson.ToJObject();
  49. List<DbParameter> parameter = new List<DbParameter>();
  50. string sql = @"SELECT ver.guid,ver.ProjectCode,ver.ProjectName,ver.Version,ver.URL,ver.WorkPointCode,ver.MUSERCode,ver.MUSERName,ver.MTIME
  51. FROM ICSVersions ver
  52. WHERE 1=1 AND ver.guid='{0}' ";
  53. sql = string.Format(sql, ID);
  54. return Repository().FindTableBySql(sql.ToString());
  55. }
  56. catch (Exception ex)
  57. {
  58. throw new Exception(ex.Message.ToString());
  59. }
  60. }
  61. }
  62. }