public List <APICallLogItem> Get(DateTime dteDateCreated_GToEQ, out string LastError) { List <APICallLogItem> lstAPICallLogItems = null; LastError = String.Empty; try { SqlCommand objQuery = new SqlCommand(); objQuery.CommandText = "tblAPICallLogItem_SelBy_DateCreated_GToEQ"; objQuery.CommandType = CommandType.StoredProcedure; // Add the parameter to the Parameters collection. objQuery.Parameters.Add(new SqlParameter("DateCreated", dteDateCreated_GToEQ)); lstAPICallLogItems = DBUtil.DataTableToList <APICallLogItem>(SqlServerDataAccess.Execute(objQuery)); } catch (System.Data.SqlClient.SqlException exSql) { LastError = String.Concat("", exSql.Message, exSql.Number, null); } catch (Exception ex) { LastError = String.Concat("", ex.Message, null); } return(lstAPICallLogItems); }
public List <APICallLogItem> GetByFK(int intOrderAdddressID, out string LastError) { List <APICallLogItem> lstOrderAddress = null; LastError = String.Empty; try { if (intOrderAdddressID == 0) { LastError = "The value supplied for 'intOrderAdddressID' cannot be zero and must be a valid integer that corresponds to an existing record"; return(null); } SqlCommand objQuery = new SqlCommand(); objQuery.CommandText = "tblAPICallLogItem_SelByFK_OrderAddressID_EQ"; objQuery.CommandType = CommandType.StoredProcedure; // Add the parameter to the Parameters collection. objQuery.Parameters.Add(new SqlParameter("OrderAddressID", (object)intOrderAdddressID ?? String.Empty)); lstOrderAddress = DBUtil.DataTableToList <APICallLogItem>(SqlServerDataAccess.Execute(objQuery)); } catch (System.Data.SqlClient.SqlException exSql) { LastError = String.Concat("", exSql.Message, exSql.Number, null); } catch (Exception ex) { LastError = String.Concat("", ex.Message, null); } return(lstOrderAddress); }
public List <OrderSystemOfRecord> GetAllRecords(out string LastError) { List <OrderSystemOfRecord> lstMigrationStatuses = null; LastError = String.Empty; try { SqlCommand objQuery = new SqlCommand(); objQuery.CommandText = "tblOrderSystemOfRecord_SelAll"; objQuery.CommandType = CommandType.StoredProcedure; lstMigrationStatuses = DBUtil.DataTableToList <OrderSystemOfRecord>(SqlServerDataAccess.Execute(objQuery)); } catch (System.Data.SqlClient.SqlException exSql) { LastError = String.Concat("", exSql.Message, exSql.Number, null); } catch (Exception ex) { LastError = String.Concat("", ex.Message, null); } return(lstMigrationStatuses); }
public List <SystemConfigItem> GetAllSystemConfigItems(out string LastError) { List <SystemConfigItem> lstSystemConfigItems = null; LastError = String.Empty; try { SqlCommand objQuery = new SqlCommand(); objQuery.CommandText = "tblSystemConfigItem_SelAll"; objQuery.CommandType = CommandType.StoredProcedure; lstSystemConfigItems = DBUtil.DataTableToList <SystemConfigItem>(SqlServerDataAccess.Execute(objQuery)); } catch (System.Data.SqlClient.SqlException exSql) { LastError = String.Concat("", exSql.Message, exSql.Number, null); } catch (Exception ex) { LastError = String.Concat("", ex.Message, null); } return(lstSystemConfigItems); }
public List <OrderAddress> Search(string strWhereClause, string strOrderByClause, out string LastError, int?intPageNumber = null, int?intPageSize = null) { List <OrderAddress> lstOrderAddress = new List <OrderAddress>(); LastError = String.Empty; try { SqlCommand objQuery = new SqlCommand(); objQuery.CommandText = "tblOrderAddress_SelByDyn_H1_Custom"; objQuery.CommandType = CommandType.StoredProcedure; // Add the parameter to the Parameters collection. objQuery.Parameters.Add(new SqlParameter("DynamicWhereClause", strWhereClause)); objQuery.Parameters.Add(new SqlParameter("DynamicOrderByClause", strOrderByClause)); objQuery.Parameters.Add(new SqlParameter("RowsPerPage", intPageSize ?? 100000)); objQuery.Parameters.Add(new SqlParameter("PageNumber", intPageNumber ?? 1)); lstOrderAddress = DBUtil.DataTableToList <OrderAddress>(SqlServerDataAccess.Execute(objQuery)); } catch (System.Data.SqlClient.SqlException exSql) { LastError = String.Concat("", exSql.Message, exSql.Number, null); } catch (Exception ex) { LastError = String.Concat("", ex.Message, null); } return(lstOrderAddress); }
public List <OrderAddressLogItem> GetRecords(string strTSQL) { DataTable objDataTable = Get(strTSQL); return(DBUtil.DataTableToList <OrderAddressLogItem>(objDataTable)); }