public static void UOFfromStringCheck() { var a = (from s in AppDomain.CurrentDomain.GetAssemblies().SelectMany(s => s.GetTypes()).Where(s => s.Namespace == "Repo.DAL") where s.Name == "KEY_CLIENTS" select s).FirstOrDefault(); List <IEntity> SectorEntityList = new List <IEntity>(); DateTime st = new DateTime(2016, 01, 01, 00, 00, 00); DateTime fn = new DateTime(2016, 08, 22, 00, 00, 00); Edit_UOF t_uof = new Edit_UOF(); dynamic dyn = null; dynamic dynmc = null; int cnt = 0; string type_ = @"T_ACQ_D"; switch (type_) { case @"T_ACQ_D": dyn = t_uof.GetAllACQ_D(); break; case @"KEY_CLIENTS": dyn = t_uof.GetAllKK(); break; } //dynmc = InstantiateFromString(type_); LoopThrougt(SectorEntityList, dyn); AddFrom(SectorEntityList, t_uof, type_); t_uof.Dispose(); }
public static void UOF_one_another_check() { Edit_UOF eof = new Edit_UOF(); Edit_UOF eof2 = new Edit_UOF(); var a = eof.GetAllKK(); foreach (var b in a) { eof2.AddKK(b); } eof2.SaveAll(); eof.Dispose(); eof2.Dispose(); }
public static void AddFrom(List <IEntity> SectorEntityList, Edit_UOF t_uof_, string type_) { foreach (var item_ in SectorEntityList) { //T_ACQ_D_UOF.AddEntity(item_); switch (type_) { case @"T_ACQ_D": t_uof_.AddACQ_D(item_); break; case @"KEY_CLIENTS": t_uof_.AddKK(item_); break; } t_uof_.SaveAll(); } }