using System.Linq.Expressions; using System.Reflection; using System.Text; using YieldChain.Helpers; using YLErp.BLL; namespace YLErp.Model { public class ClientFileResult { public int ClientId { get; set; } public string EncryptId { get; set; } public string ClientName { get; set; } public List FileNames { get; set; } public Dictionary> FilesDic { get; set; } public ClientFileResult() { FileNames = new List(); FilesDic = new Dictionary>(); } } public class clientFileRet { public client_file file; /// /// 能不能还原 /// public bool CanBack { get; set; } /// /// 能不能废弃 /// public bool CanDrop { get; set; } /// /// 能不能删除 /// public bool CanDelete { get; set; } /// /// (V2使用)file.HasSent && file.OptState == ConsReport.OptFlagsEnum.D; /// public bool HasSentDrop { get; set; } /// /// (V2使用)分组键值 /// public string GroupKey { get; set; } /// /// (V2使用)删除此文件时是否需要执行批量删除 /// public bool NeedMatchRemove { get; set; } } public class ClientfileauditPage { public int ClientId { get; set; } public string ClientName { get; set; } public List ItemRows { get; set; } public List RoleColumns { get; set; } } public class RoleColumnsInner { public int Id { get; set; } public string Name { get; set; } public string OptName { get; set; } } public class ClientfileauditPageRow { public string Group { get; set; } public List Titles { get; set; } } public class ClientfileAuditExecRequest { public int ClientId { get; set; } public List Items { get; set; } } public class ClientfileAuditExecRequestInner { public string RoleName { get; set; } public string Group { get; set; } public string Title { get; set; } public bool Checked { get; set; } } public class ClientHelper { /// /// 根据传入字符采取相应方式反序列化Trade对象 /// public static Client Deserialize(string clientJson) { Client result = null; { if (!clientJson.StartsWith("{")) { clientJson = GZipHelper.DecompressBase64String(clientJson); } result = JsonHelper.ToObject(clientJson); } return result; } public static string Serialize(Client c) { var str = JsonHelper.Serialize(c, true); var buffer = GZipHelper.Compress(Encoding.UTF8.GetBytes(str)); str = Convert.ToBase64String(buffer); return str; } } }