public PassingGoodsMasterModel GetDetail(int id, string userId) { try { var list = (from l in _db.SP_PASSINGGOODS_GETDETAIL(id, userId) select new PassingGoodsMasterModel() { Id = l.Id, Code = l.Code, Applicant = l.Applicant, ApplicantName = l.ApplicantName, OrgName = l.OrgName, PlantName = l.PlantName, DeptName = l.DeptName, SectionName = l.SectName, ApprovalKind = l.ApprovalKind.ToString(), ApprovalKindName = l.KindName, ApprovalLineJson = l.ApprovalLineJson, ApprovalLine = l.ApprovalLine, ApprovalStatus = l.ApprovalStatus.ToString(), ApprovalStatusName = l.ApprovalStatusName, NextApprover = l.NextApprover, NextApproverName = l.NextApproverName, ApplicationDate = l.ApplicationDate, ReImport = l.ReImport ?? false, ReImportDate = l.ReImportDate, Reason = l.Reason, FinishApplication = l.FinishApplication ?? false, FinishReason = l.FinishReason, FinishDate = l.FinishDate, CreateUid = l.CreateUid, CreateName = l.CreateName, CreateDate = l.CreateDate, IsRecall = l.IsRecall ?? false, ExportDate = l.ExportDate, ExportUid = l.ExportUid, ExportName = l.ExportName, ExportGate = l.GateName }).FirstOrDefault(); list.IdEncrypt = Util.Encrypt(list.Id.ToString() + "_" + string.Format("hhss", DateTime.Now)); return(list); } catch (Exception ex) { LogHelper.Error("PassingGoodsRepository GetAll: " + ex.Message + " Inner Exception: " + ex.InnerException.Message); return(null); } }