Пример #1
0
        public static CustomList <CmnWorkFlowDetail> GetAllCmnWorkFlowDetail(Int32 WorkFlowID)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            CustomList <CmnWorkFlowDetail> CmnWorkFlowDetailCollection = new CustomList <CmnWorkFlowDetail>();
            IDataReader reader = null;
            String      sql    = "select *from CmnWorkFlowDetail Where WorkFlowID=" + WorkFlowID;

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    CmnWorkFlowDetail newCmnWorkFlowDetail = new CmnWorkFlowDetail();
                    newCmnWorkFlowDetail.SetData(reader);
                    CmnWorkFlowDetailCollection.Add(newCmnWorkFlowDetail);
                }
                return(CmnWorkFlowDetailCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
Пример #2
0
 public static CustomList<CmnWorkFlowDetail> GetAllCmnWorkFlowDetail(Int32 WorkFlowID)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<CmnWorkFlowDetail> CmnWorkFlowDetailCollection = new CustomList<CmnWorkFlowDetail>();
     IDataReader reader = null;
     String sql = "select *from CmnWorkFlowDetail Where WorkFlowID="+WorkFlowID;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             CmnWorkFlowDetail newCmnWorkFlowDetail = new CmnWorkFlowDetail();
             newCmnWorkFlowDetail.SetData(reader);
             CmnWorkFlowDetailCollection.Add(newCmnWorkFlowDetail);
         }
         return CmnWorkFlowDetailCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }