コード例 #1
0
 public static List<Accounttype> GetAllAccounttype()
 {
     List<Accounttype> result = new List<Accounttype>();
     NewAppsCnn newAppsCnn = new NewAppsCnn(AppSettings.CrAppSettings.NewAppsConnectionString);
     var dbAccounttypes = from g in newAppsCnn.Acc_Accountype select g;
     foreach (var dbAccounttype in dbAccounttypes)
     {
         Accounttype accounttype = new Accounttype();
         accounttype.FromDbAccounttype(dbAccounttype);
         result.Add(accounttype);
     }
     return result;
 }
コード例 #2
0
 public static Accounttype FindByAccounttypeID(int _VaidationID)
 {
     NewAppsCnn newAppsCnn = new NewAppsCnn(AppSettings.CrAppSettings.NewAppsConnectionString);
     var dbAccounttypes = from u in newAppsCnn.Acc_Accountype where u.TypeID == _VaidationID select u;
     if (dbAccounttypes.Count() > 0)
     {
         Acc_Accountype dbAccounttype = dbAccounttypes.First();
         Accounttype accounttype = new Accounttype();
         accounttype.FromDbAccounttype(dbAccounttype);
         accounttype.IsNew = false;
         return accounttype;
     }
     else
         return null;
 }