Esempio n. 1
0
 public FineOffice.Modules.ADM_LetterFollow Update(FineOffice.Modules.ADM_LetterFollow model)
 {
     dal.Initialization();
     FineOffice.Entity.ADM_LetterFollow entity = new Entity.ADM_LetterFollow
     {
         ID         = model.ID,
         Handler    = model.Handler,
         HandleTime = model.HandleTime,
         LetterID   = model.LetterID,
         Linkman    = model.Linkman,
         Matter     = model.Matter,
         Mobile     = model.Mobile,
         Result     = model.Result,
     };
     dal.Update(entity);
     dal.Dispose();
     return(GetModel(d => d.ID == model.ID));
 }
Esempio n. 2
0
 /// <summary>
 /// 返回一个model
 /// </summary>
 /// <returns></returns>
 public FineOffice.Modules.ADM_LetterFollow GetModel(System.Linq.Expressions.Expression <Func <FineOffice.Modules.ADM_LetterFollow, bool> > expression)
 {
     dal.Initialization();
     FineOffice.Modules.ADM_LetterFollow model =
         (from entity in dal.GetListAll()
          select new FineOffice.Modules.ADM_LetterFollow
     {
         ID = entity.ID,
         Handler = entity.Handler,
         HandleTime = entity.HandleTime,
         LetterID = entity.LetterID,
         Linkman = entity.Linkman,
         HandleDepartmentID = entity.HR_Personnel != null ? entity.HR_Personnel.DepartmentID : null,
         Matter = entity.Matter,
         Mobile = entity.Mobile,
         Result = entity.Result,
     }).Where(expression).FirstOrDefault();
     dal.Dispose();
     return(model);
 }