Esempio n. 1
0
 /// <summary>
 /// 删除一个工程类别
 /// </summary>
 public BX.Modules.OA_ProjectType Delete(BX.Modules.OA_ProjectType model)
 {
     dal.Initialization();
     BX.Entity.OA_ProjectType entity = new Entity.OA_ProjectType
     {
         ID = model.ID
     };
     dal.Delete(entity);
     dal.Dispose();
     return(null);
 }
Esempio n. 2
0
 /// <summary>
 /// 返回一个model
 /// </summary>
 public BX.Modules.OA_ProjectType GetModel(System.Linq.Expressions.Expression <Func <BX.Modules.OA_ProjectType, bool> > expression)
 {
     dal.Initialization();
     BX.Modules.OA_ProjectType model = (from entity in dal.GetListAll()
                                        select new BX.Modules.OA_ProjectType
     {
         ID = entity.ID,
         TypeNO = entity.TypeNO,
         TypeName = entity.TypeName,
         PinyinCode = entity.PinyinCode,
         Stop = entity.Stop,
         Remark = entity.Remark
     }).Where(expression).FirstOrDefault();
     dal.Dispose();
     return(model);
 }
Esempio n. 3
0
 /// <summary>
 /// 修改工程类别
 /// </summary>
 public BX.Modules.OA_ProjectType Update(BX.Modules.OA_ProjectType model)
 {
     dal.Initialization();
     BX.Entity.OA_ProjectType entity = new Entity.OA_ProjectType
     {
         ID         = model.ID,
         TypeNO     = model.TypeNO,
         TypeName   = model.TypeName,
         PinyinCode = model.PinyinCode,
         Stop       = model.Stop,
         Remark     = model.Remark
     };
     dal.Update(entity);
     dal.Dispose();
     return(null);
 }