using NFine.Domain._03_Entity.SRM; using NFine.Repository; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using NFine.Data.Extensions; using System.Data; using NFine.Code; using System.Data.Common; using Newtonsoft.Json; using System.Configuration; using System.Net; using System.IO; using Newtonsoft.Json.Linq; namespace NFine.Application.WMS { public class PDAVersionApp : RepositoryFactory { public DataTable GetGridJson(string queryJson, ref Pagination jqgridparam) { DataTable dt = new DataTable(); var queryParam = queryJson.ToJObject(); List parameter = new List(); 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 "; //多站点 if (NFine.Code.OperatorProvider.Provider.GetCurrent().RoleEnCode != "admin") { sql += " and a.WorkPointCode in (" + NFine.Code.OperatorProvider.Provider.GetCurrent().Location.TrimEnd(',') + ")"; } //if (NFine.Code.OperatorProvider.Provider.GetCurrent().RoleEnCode == "Vendor") //{ // sql += " and a.VenCode='" + NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode + "'"; //} return Repository().FindTablePageBySql(sql.ToString(), parameter.ToArray(), ref jqgridparam); } public string Update(string ID, string Version, string URL, ref Pagination jqgridparam) { string sql ; return ""; } public DataTable GetInputValue(string ID) { try { DataTable dt = new DataTable(); //var queryParam = queryJson.ToJObject(); List parameter = new List(); string sql = @"SELECT ver.guid,ver.ProjectCode,ver.ProjectName,ver.Version,ver.URL,ver.WorkPointCode,ver.MUSERCode,ver.MUSERName,ver.MTIME FROM ICSVersions ver WHERE 1=1 AND ver.guid='{0}' "; sql = string.Format(sql, ID); return Repository().FindTableBySql(sql.ToString()); } catch (Exception ex) { throw new Exception(ex.Message.ToString()); } } } }