public static List <StoreGroup> ToList(BLL.StoreGroup v) { List <StoreGroup> list = new List <StoreGroup>(); while (!v.EOF) { StoreGroup t = new StoreGroup(); if (!v.IsColumnNull("ID")) { t.ID = v.ID; } if (!v.IsColumnNull("Name")) { t.Name = v.Name; } if (!v.IsColumnNull("StoreTypeID")) { t.StoreTypeID = v.StoreTypeID; } list.Add(t); v.MoveNext(); } return(list); }
public static void SaveList(List <HCMIS.Desktop.DirectoryServices.Stores> list) { BLL.StoreGroup bv = new BLL.StoreGroup(); foreach (HCMIS.Desktop.DirectoryServices.Stores v in list) { // try to load by primary key bv.LoadByPrimaryKey(v.ID.Value); // if the entry doesn't exist, create it if (bv.RowCount == 0) { bv.AddNew(); } // populate the contents of v on the to the database list if (v.ID.HasValue) { bv.ID = v.ID.Value; } if (v.StoreName != "" && v.StoreName != null) { bv.Name = v.StoreName; } if (v.StoreTypeID.HasValue) { bv.StoreTypeID = v.StoreTypeID.Value; } bv.Save(); } }
public static List <int> GetDeletedIDsAfter(long LastVersion) { BLL.StoreGroup v = new BLL.StoreGroup(); v.LoadDeletedIDs(LastVersion); List <int> list = new List <int>(); while (!v.EOF) { list.Add((int)v.GetColumn("ID")); v.MoveNext(); } return(list); }
public static void DeleteList(List <int> list) { BLL.StoreGroup bv = new BLL.StoreGroup(); foreach (int v in list) { // try to load by primary key bv.LoadByPrimaryKey(v); // if the entry doesn't exist, create it if (bv.RowCount > 0) { bv.MarkAsDeleted(); bv.Save(); } // populate the contents of v on the to the database list } }
public static List <StoreGroup> GetUpdatesAfter(long?lastVersion, DateTime?lastUpdateTime) { BLL.StoreGroup v = new BLL.StoreGroup(); if (lastVersion.HasValue && lastVersion.Value != 0) { v.LoadUpdatesAfter(lastVersion.Value); } else if (lastUpdateTime.HasValue) { v.LoadUpdatesAfterByTime(lastUpdateTime.Value); } else { v.LoadAll(); } return(ToList(v)); }
public static void DeleteList(List<int> list) { BLL.StoreGroup bv = new BLL.StoreGroup(); foreach (int v in list) { // try to load by primary key bv.LoadByPrimaryKey(v); // if the entry doesn't exist, create it if (bv.RowCount > 0) { bv.MarkAsDeleted(); bv.Save(); } // populate the contents of v on the to the database list } }
public static List <StoreGroup> GetAll() { BLL.StoreGroup v = new BLL.StoreGroup(); v.LoadAll(); return(ToList(v)); }
public static List<int> GetDeletedIDsAfter(long LastVersion) { BLL.StoreGroup v = new BLL.StoreGroup(); v.LoadDeletedIDs(LastVersion); List<int> list = new List<int>(); while (!v.EOF) { list.Add((int)v.GetColumn("ID")); v.MoveNext(); } return list; }
public static List<StoreGroup> GetAll() { BLL.StoreGroup v = new BLL.StoreGroup(); v.LoadAll(); return ToList(v); }
public static void SaveList(List<HCMIS.Desktop.DirectoryServices.Stores> list) { BLL.StoreGroup bv = new BLL.StoreGroup(); foreach (HCMIS.Desktop.DirectoryServices.Stores v in list) { // try to load by primary key bv.LoadByPrimaryKey(v.ID.Value); // if the entry doesn't exist, create it if (bv.RowCount == 0) { bv.AddNew(); } // populate the contents of v on the to the database list if(v.ID.HasValue ) bv.ID = v.ID.Value; if (v.StoreName != "" && v.StoreName != null) bv.Name = v.StoreName; if (v.StoreTypeID.HasValue) bv.StoreTypeID = v.StoreTypeID.Value; bv.Save(); } }
public static List<StoreGroup> GetUpdatesAfter(long? lastVersion,DateTime? lastUpdateTime) { BLL.StoreGroup v = new BLL.StoreGroup(); if(lastVersion.HasValue && lastVersion.Value != 0) { v.LoadUpdatesAfter( lastVersion.Value ); }else if(lastUpdateTime.HasValue) { v.LoadUpdatesAfterByTime(lastUpdateTime.Value); }else { v.LoadAll(); } return ToList(v); }