public static CustomList<TreeGenerator> GetAllTreeGeneratorWithOpeningAndWithoutPO() { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList<TreeGenerator> TreeGeneratorCollection = new CustomList<TreeGenerator>(); String sql = "EXEC spSWebTreeGeneratorWithAllItem"; try { IDataReader reader; conManager.OpenDataReader(sql, out reader); while (reader.Read()) { TreeGenerator newTreeGenerator = new TreeGenerator(); newTreeGenerator.SetData(reader); TreeGeneratorCollection.Add(newTreeGenerator); } reader.Close(); return TreeGeneratorCollection; } catch (Exception ex) { throw (ex); } }
public static CustomList<TreeGenerator> GetAllTreeGenerator(string location, string projectCode) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList<TreeGenerator> TreeGeneratorCollection = new CustomList<TreeGenerator>(); String sql = "EXEC spSWebTreeGeneratorLocationWiseProjectItem '" + location + "','" + projectCode + "'"; try { IDataReader reader; conManager.OpenDataReader(sql, out reader); while (reader.Read()) { TreeGenerator newTreeGenerator = new TreeGenerator(); newTreeGenerator.SetDataRequisition(reader); TreeGeneratorCollection.Add(newTreeGenerator); } reader.Close(); return TreeGeneratorCollection; } catch (Exception ex) { throw (ex); } }
public static CustomList<TreeGenerator> GetAllTreeGeneratorWithAdditionalWork(string TranId) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList<TreeGenerator> TreeGeneratorCollection = new CustomList<TreeGenerator>(); String sql = "EXEC spSWebTreeGeneratorForAdditionalItem '" + TranId + "'"; try //spSWebTreeGeneratorForAdditionalItem { IDataReader reader; conManager.OpenDataReader(sql, out reader); while (reader.Read()) { TreeGenerator newTreeGenerator = new TreeGenerator(); newTreeGenerator.SetDataRequisition(reader); TreeGeneratorCollection.Add(newTreeGenerator); } reader.Close(); return TreeGeneratorCollection; } catch (Exception ex) { throw (ex); } }
public static CustomList<TreeGenerator> GetAllTreeGenerator(string projectCode) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); CustomList<TreeGenerator> TreeGeneratorCollection = new CustomList<TreeGenerator>(); String sql = "EXEC spSWebTreeGenerator '" + projectCode + "'"; try { IDataReader reader; conManager.OpenDataReader(sql, out reader); while (reader.Read()) { TreeGenerator newTreeGenerator = new TreeGenerator(); newTreeGenerator.SetDataRequisition(reader); TreeGeneratorCollection.Add(newTreeGenerator); } reader.Close(); TreeGeneratorCollection.SelectSpName = "spSelectTreeGenerator"; TreeGeneratorCollection.InsertSpName = "spInsertTreeGenerator"; TreeGeneratorCollection.UpdateSpName = "spUpdateTreeGenerator"; TreeGeneratorCollection.SelectSpName = "spDeleteTreeGenerator"; return TreeGeneratorCollection; } catch (Exception ex) { throw (ex); } }