public PopupObjectCollection GetAll() { PopupObjectCollection tasks = new PopupObjectCollection(); QueryBuilder builder; try { builder = new QueryBuilder(); builder.Append(this.BaseQuery(false, 0)); tasks = PopupConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]); } catch (System.Exception exception1) { throw new Exception(MethodBase.GetCurrentMethod().Name, exception1); } return(tasks); }
public PopupObjectCollection GetActive() { PopupObjectCollection tasks = new PopupObjectCollection(); QueryBuilder builder; try { builder = new QueryBuilder(); builder.Append(this.BaseQuery(false, 0)); builder.AppendWhereBoolean(PopupObject.ACTIVE, true, QueryBuilder.ParameterLocation.FIRST_LAST); tasks = PopupConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]); } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } return(tasks); }
public PopupObjectCollection GetAllActiveByEmployee(UserObject user) { PopupObjectCollection popups = new PopupObjectCollection(); QueryBuilder builder; try { builder = new QueryBuilder(); builder.Append(this.BaseQuery(false, 0)); builder.AppendWhereString(PopupUserObject.USER_ID, user.UsrID.ToString(), QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST); builder.Append("AND " + PopupUserObject.USER_ID + " is not null "); builder.Append("AND " + PopupUserObject.POPUP_ID + " is not null "); builder.AppendWhereBoolean(PopupObject.ACTIVE, true, QueryBuilder.ParameterLocation.LAST); popups = PopupConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]); } catch (System.Exception exception1) { throw new Exception(MethodBase.GetCurrentMethod().Name, exception1); } return(popups); }