public void CreateNew(ref SMLIB_OBJ_SMLIB_LISTBUILDER_LIST Item) { SMLIB_DBUtils dbcontext = new SMLIB_DBUtils(); Item.DBObject.DBUtils = this.DBObject.DBUtils; Item.insertItem(); }
protected override Hashtable parseResult(DataTable mDT) { Hashtable ht = new Hashtable(); foreach (DataRow dr in mDT.Rows) { SMLIB_OBJ_SMLIB_LISTBUILDER_LIST item = new SMLIB_OBJ_SMLIB_LISTBUILDER_LIST(); item.getItem(dr); ht.Add(item.LIST_ID, item); } return(ht); }
public void insertOrNullItem(ref SMLIB_OBJ_SMLIB_LISTBUILDER_LIST item) { if (!String.IsNullOrEmpty(item.LIST_NAME)) { SMLIB_OBJ_SMLIB_LISTBUILDER_LIST obj = this.getByListNamePatronID(item.LIST_NAME, item.LIST_CREATOR); if (obj != null) { item = obj; } else { CreateNew(ref item); } } }
public List <SMLIB_OBJ_SMLIB_LISTBUILDER_LIST> getCollaborateByPatronID(Double PatronID) { List <SMLIB_OBJ_SMLIB_LISTBUILDER_LIST> rv = new List <SMLIB_OBJ_SMLIB_LISTBUILDER_LIST>(); String sql = "SELECT * FROM SMLIB_LISTBUILDER_LIST WHERE LIST_ID IN (SELECT SHARED_LIST_ID FROM SMLIB_LISTBUILDER_SHARED WHERE SHARED_REF_ID='" + PatronID.ToString("F2") + "' AND SHARED_TYPE='COLLABORATE') ORDER BY LIST_NAME "; SMLIB_DBUtils dbu = new SMLIB_DBUtils(); DataTable dt = new DataTable(); dt = dbu.getTable(sql); foreach (DataRow dr in dt.Rows) { SMLIB_OBJ_SMLIB_LISTBUILDER_LIST item = new SMLIB_OBJ_SMLIB_LISTBUILDER_LIST(); item.getItem(dr); rv.Add(item); } return(rv); }
public override void insertObject(ref PCP_I_SiteObject SiteObj) { SMLIB_OBJ_SMLIB_LISTBUILDER_LIST item = SiteObj as SMLIB_OBJ_SMLIB_LISTBUILDER_LIST; insertOrNullItem(ref item); }