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