public virtual void Invalidate(int iObjectID) { //Invalidate lookup edit columns to reflect all changes of lookup table //if (GridControl != null) // GridControl.InvalidateLookupEditColumns(); VinaDbUtil dbUtil = new VinaDbUtil(); BaseBusinessController objItemController = BusinessControllerFactory.GetBusinessController(ItemTableName + "Controller"); DataSet ds = new DataSet(); if (Relation.Equals(cstRelationForeign)) { ds = objItemController.GetAllDataByForeignColumn(ItemTableForeignKey, iObjectID); } else if (Relation.Equals(cstRelationParent)) { ds = objItemController.GetAllObjectsByObjectParentID(iObjectID); } else if (Relation.Equals(cstRelationNone)) { ds = objItemController.GetAllObjects(); } DataView view = ds.Tables[0].DefaultView; string ID = ItemTableName.Substring(0, ItemTableName.Length - 1) + "ID"; view.Sort = ID + " ASC"; DataTable sortIDData = view.ToTable(); ds.Clear(); ds.Merge(sortIDData); Invalidate(ds); }
protected virtual DataSet GetSearchData() { String mainObjectTableName = VinaUtil.GetTableNameFromBusinessObject(CurrentModuleEntity.MainObject); BaseBusinessController objCurrentObjectController = BusinessControllerFactory.GetBusinessController(mainObjectTableName + "Controller"); return(objCurrentObjectController.GetAllObjects()); }
public static DataSet GetLookupTableData(string lookupTableName) { BaseBusinessController objBusinessController = BusinessControllerFactory.GetBusinessController(lookupTableName + "Controller"); DataSet ds = new DataSet(); if (objBusinessController != null) { ds = objBusinessController.GetAllObjects(); } return(ds); }