public static CustomList <CmnDocListFormat> GetAllCmnDocListFormat() { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList <CmnDocListFormat> CmnDocListFormatCollection = new CustomList <CmnDocListFormat>(); IDataReader reader = null; const String sql = "Select DocListFormatID,CustomCode,DocListId,Prefix,Suffix,PeriodType,Project,CostCentre,CompanyID, IsDeleted,Transfer,'' Description from CmnDocListFormat"; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { CmnDocListFormat newCmnDocListFormat = new CmnDocListFormat(); newCmnDocListFormat.SetData(reader); CmnDocListFormatCollection.Add(newCmnDocListFormat); } return(CmnDocListFormatCollection); } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) { reader.Close(); } } }
public static CustomList <CmnDocListFormat> GetAllDocListFormatFind() { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList <CmnDocListFormat> CmnDocListFormatCollection = new CustomList <CmnDocListFormat>(); IDataReader reader = null; const String sql = "SELECT a.DocListFormatID,a.CustomCode,a.DocListId,a.Prefix,a.Suffix,a.PeriodType,a.Project,a.CostCentre,a.CompanyID, a.IsDeleted,a.Transfer, b.Description FROM API.dbo.CmnDocListFormat a inner join APISysMan.dbo.Menu b ON a.DocListId=b.MenuID"; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { CmnDocListFormat newCmnDocListFormat = new CmnDocListFormat(); newCmnDocListFormat.SetData(reader); CmnDocListFormatCollection.Add(newCmnDocListFormat); } // CmnDocListFormatCollection.InsertSpName = "spInsertCmnDocListFormat"; // CmnDocListFormatCollection.UpdateSpName = "spUpdateCmnDocListFormat"; // CmnDocListFormatCollection.DeleteSpName = "spDeleteCmnDocListFormat"; return(CmnDocListFormatCollection); } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) { reader.Close(); } } }
public static CustomList<CmnDocListFormat> GetAllDocListFormatFind() { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList<CmnDocListFormat> CmnDocListFormatCollection = new CustomList<CmnDocListFormat>(); IDataReader reader = null; const String sql = "SELECT a.DocListFormatID,a.CustomCode,a.DocListId,a.Prefix,a.Suffix,a.PeriodType,a.Project,a.CostCentre,a.CompanyID, a.IsDeleted,a.Transfer, b.Description FROM API.dbo.CmnDocListFormat a inner join APISysMan.dbo.Menu b ON a.DocListId=b.MenuID"; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { CmnDocListFormat newCmnDocListFormat = new CmnDocListFormat(); newCmnDocListFormat.SetData(reader); CmnDocListFormatCollection.Add(newCmnDocListFormat); } // CmnDocListFormatCollection.InsertSpName = "spInsertCmnDocListFormat"; // CmnDocListFormatCollection.UpdateSpName = "spUpdateCmnDocListFormat"; // CmnDocListFormatCollection.DeleteSpName = "spDeleteCmnDocListFormat"; return CmnDocListFormatCollection; } catch (Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) reader.Close(); } }
public static CustomList<CmnDocListFormat> GetAllCmnDocListFormat() { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList<CmnDocListFormat> CmnDocListFormatCollection = new CustomList<CmnDocListFormat>(); IDataReader reader = null; const String sql = "Select DocListFormatID,CustomCode,DocListId,Prefix,Suffix,PeriodType,Project,CostCentre,CompanyID, IsDeleted,Transfer,'' Description from CmnDocListFormat"; try { conManager.OpenDataReader(sql, out reader); while (reader.Read()) { CmnDocListFormat newCmnDocListFormat = new CmnDocListFormat(); newCmnDocListFormat.SetData(reader); CmnDocListFormatCollection.Add(newCmnDocListFormat); } return CmnDocListFormatCollection; } catch(Exception ex) { throw (ex); } finally { if (reader != null && !reader.IsClosed) reader.Close(); } }