public void SetDetailData(string ListData) { if (!string.IsNullOrEmpty(ListData)) { var list = JsonHelper.ToList(ListData); var entities = FormulaHelper.GetEntities <DocConstEntities>(); foreach (var item in list) { T_Borrow_FileInfo FileInfo = new T_Borrow_FileInfo(); FileInfo.ID = FormulaHelper.CreateGuid(); FileInfo.T_BorrowID = this.ID; FileInfo.FileID = item.GetValue("FileID"); FileInfo.FileName = item.GetValue("FileName"); FileInfo.CarInfoID = item.GetValue("ID"); entities.Set <T_Borrow_FileInfo>().Add(FileInfo); } } }
public void AddBorrowLog(T_Borrow_FileInfo item) { var entities = FormulaHelper.GetEntities <DocConstEntities>(); var user = FormulaHelper.GetUserInfo(); S_DocumentLog log = entities.S_DocumentLog.Create(); log.ID = FormulaHelper.CreateGuid(); log.LogType = "Borrow"; log.Name = item.FileName; log.NodeID = item.NodeID; log.SpaceID = item.SpaceID; log.ConfigID = item.ConfigID; log.CreateDate = DateTime.Now; log.CreateUserID = user.UserID; log.CreateUserName = user.UserName; log.FileID = item.FileID; log.FullNodeID = ""; entities.S_DocumentLog.Add(log); }