public FineOffice.Modules.CNS_PoliticalAffiliation Update(FineOffice.Modules.CNS_PoliticalAffiliation model)
 {
     dal.Initialization();
     FineOffice.Entity.CNS_PoliticalAffiliation entity = new Entity.CNS_PoliticalAffiliation
     {
         ID        = model.ID,
         Remark    = model.Remark,
         Political = model.Political,
     };
     dal.Update(entity);
     dal.Dispose();
     return(null);
 }
 public FineOffice.Modules.CNS_PoliticalAffiliation Add(FineOffice.Modules.CNS_PoliticalAffiliation model)
 {
     dal.Initialization();
     FineOffice.Entity.CNS_PoliticalAffiliation entity = new Entity.CNS_PoliticalAffiliation
     {
         ID        = model.ID,
         Remark    = model.Remark,
         Political = model.Political,
     };
     dal.Add(entity);
     dal.Dispose();
     return(this.GetModel(d => d.ID == entity.ID));
 }
 public FineOffice.Modules.CNS_PoliticalAffiliation GetModel(System.Linq.Expressions.Expression <Func <FineOffice.Modules.CNS_PoliticalAffiliation, bool> > expression)
 {
     dal.Initialization();
     FineOffice.Modules.CNS_PoliticalAffiliation model =
         (from entity in dal.GetListAll()
          select new FineOffice.Modules.CNS_PoliticalAffiliation
     {
         ID = entity.ID,
         Remark = entity.Remark,
         Political = entity.Political,
     }).Where(expression).FirstOrDefault();
     dal.Dispose();
     return(model);
 }