public static List <ABC> ToList(BLL.ABC v) { List <ABC> list = new List <ABC>(); while (!v.EOF) { ABC t = new ABC(); if (!v.IsColumnNull("ID")) { t.ID = v.ID; } if (!v.IsColumnNull("Value")) { t.Value = v.Value; } if (!v.IsColumnNull("Description")) { t.Description = v.Description; } list.Add(t); v.MoveNext(); } return(list); }
public static void SaveList(List <HCMIS.Desktop.DirectoryServices.ABC> list) { BLL.ABC bv = new BLL.ABC(); foreach (HCMIS.Desktop.DirectoryServices.ABC 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.Value != "" && v.Value != null) { bv.Value = v.Value; } if (v.Description != "" && v.Description != null) { bv.Description = v.Description; } bv.Save(); } }
public static void DeleteList(List <int> list) { BLL.ABC bv = new BLL.ABC(); 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 DataView RunQuery(string query) { BLL.ABC abc = new BLL.ABC(); return abc.RunQuery(query); }
public static List <ABC> GetAll() { BLL.ABC v = new BLL.ABC(); v.LoadAll(); return(ToList(v)); }
public static void DeleteList(List<int> list) { BLL.ABC bv = new BLL.ABC(); 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 void SaveList(List<HCMIS.Desktop.DirectoryServices.ABC> list) { BLL.ABC bv = new BLL.ABC(); foreach (HCMIS.Desktop.DirectoryServices.ABC 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.Value != "" && v.Value != null ) bv.Value = v.Value; if( v.Description != "" && v.Description != null ) bv.Description = v.Description; bv.Save(); } }
public static List<ABC> GetAll() { BLL.ABC v = new BLL.ABC(); v.LoadAll(); return ToList(v); }
public static DataView RunQuery(string query) { BLL.ABC abc = new BLL.ABC(); return(abc.RunQuery(query)); }