Exemplo n.º 1
0
        public static CustomList <WFApprovalPendingList> GetAllWFApprovalPendingList(Int32 DocListID, String UserID, Int32 CompanyID)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            CustomList <WFApprovalPendingList> WFApprovalPendingListCollection = new CustomList <WFApprovalPendingList>();
            IDataReader reader = null;
            String      sql    = "EXEC spGetWFApprovalPendingList " + DocListID + ",'" + UserID + "'," + CompanyID;

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    WFApprovalPendingList newWFApprovalPendingList = new WFApprovalPendingList();
                    newWFApprovalPendingList.SetData(reader);
                    WFApprovalPendingListCollection.Add(newWFApprovalPendingList);
                }
                return(WFApprovalPendingListCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
Exemplo n.º 2
0
 public static CustomList<WFApprovalPendingList> GetAllWFApprovalPendingList(Int32 DocListID,String UserID, Int32 CompanyID)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<WFApprovalPendingList> WFApprovalPendingListCollection = new CustomList<WFApprovalPendingList>();
     IDataReader reader = null;
     String sql = "EXEC spGetWFApprovalPendingList "+DocListID+",'"+UserID+"',"+CompanyID;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             WFApprovalPendingList newWFApprovalPendingList = new WFApprovalPendingList();
             newWFApprovalPendingList.SetData(reader);
             WFApprovalPendingListCollection.Add(newWFApprovalPendingList);
         }
         return WFApprovalPendingListCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }