Esempio n. 1
0
 public static CustomList<UserGroupList> GetAllUserGroupWithUserCode(string userCode)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.SysMan);
     CustomList<UserGroupList> UserGroupListCollection = new CustomList<UserGroupList>();
     String sql = "Exec spUserGroupList'" + userCode + "'";
     IDataReader reader = null;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             UserGroupList newUserGroup = new UserGroupList();
             newUserGroup.SetData(reader);
             UserGroupListCollection.Add(newUserGroup);
         }
         reader.Close();
         return UserGroupListCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Esempio n. 2
0
 public static CustomList<CmnBankAccountType> GetAllCmnBankAccountType()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<CmnBankAccountType> CmnBankAccountTypeCollection = new CustomList<CmnBankAccountType>();
     IDataReader reader = null;
     const String sql = "select * from CmnBankAccountType";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             CmnBankAccountType newCmnBankAccountType = new CmnBankAccountType();
             newCmnBankAccountType.SetData(reader);
             CmnBankAccountTypeCollection.Add(newCmnBankAccountType);
         }
         return CmnBankAccountTypeCollection;
     }
     catch(Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Esempio n. 3
0
 public static CustomList<SegmentNames> GetAllSegmentNames()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<SegmentNames> SegmentNamesCollection = new CustomList<SegmentNames>();
     IDataReader reader = null;
     const String sql = "select *from SegmentNames";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             SegmentNames newSegmentNames = new SegmentNames();
             newSegmentNames.SetData(reader);
             SegmentNamesCollection.Add(newSegmentNames);
         }
         return SegmentNamesCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Esempio n. 4
0
 public static CustomList<Signature> GetSignatureForUniqueCode(String sql)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.SysMan);
     CustomList<Signature> signatureCollection = new CustomList<Signature>();
     IDataReader reader = null;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         if (reader.NextResult())
         {
             while (reader.Read())
             {
                 Signature newSignature = new Signature();
                 newSignature.SetData(reader);
                 signatureCollection.Add(newSignature);
             }
         }
         return signatureCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Esempio n. 5
0
 public DataSet LoadMailInfo(Int32 ReportID)
 {
     ConnectionManager conManager = new ConnectionManager(ConName);
     IDataReader reader = null;
     try
     {
         DataSet dsRef = new DataSet();
         const String spName = "spGetMailInfo";
         conManager.OpenDataReader(out reader, spName, ReportID);
         dsRef = Util.DataReaderToDataSet(reader);
         return dsRef;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (conManager != null)
         {
             conManager.CloseConnection();
             conManager.Dispose();
         }
         if (reader.IsNotNull() && reader.IsClosed.IsFalse())
             reader.Close();
     }
 }
Esempio n. 6
0
        public static CustomList<ParameterFilterValue> GetReportValue(string parent)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            CustomList<ParameterFilterValue> ParameterFilterValueCollection = new CustomList<ParameterFilterValue>();
            IDataReader reader = null;
            String sql = "select OrgKey As ActualValues, OrgName As DisplayMember, OrgName As [Values]  from Gen_Org Where OrgParentKey in(" + parent + ")";//'" + userCode + "'";
            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    ParameterFilterValue newParameterFilterValue = new ParameterFilterValue();
                    newParameterFilterValue.SetData(reader);
                    ParameterFilterValueCollection.Add(newParameterFilterValue);
                }
                return ParameterFilterValueCollection;
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (conManager != null)
                {
                    conManager.CloseConnection();
                    conManager.Dispose();
                }

                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
Esempio n. 7
0
 public static CustomList<Configuration> GetAllConfiguration()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.SysMan);
     CustomList<Configuration> ConfigurationCollection = new CustomList<Configuration>();
     const String sql = "Select *from tblConfiguration";
     IDataReader reader = null; ;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             Configuration newConfiguration = new Configuration();
             newConfiguration.SetData(reader);
             ConfigurationCollection.Add(newConfiguration);
         }
         reader.Close();
         ConfigurationCollection.SelectSpName = "spSelectConfiguration";
         ConfigurationCollection.InsertSpName = "spInsertConfiguration";
         ConfigurationCollection.UpdateSpName = "spUpdateConfiguration";
         ConfigurationCollection.SelectSpName = "spDeleteConfiguration";
         return ConfigurationCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
 public static CustomList<HousekeepingHierarchy> GetAllHousekeepingHierarchy(Int32 hKID)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<HousekeepingHierarchy> HousekeepingHierarchyCollection = new CustomList<HousekeepingHierarchy>();
     IDataReader reader = null;
     String sql = "select *from HousekeepingHierarchy where HKID=" + hKID;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             HousekeepingHierarchy newHousekeepingHierarchy = new HousekeepingHierarchy();
             newHousekeepingHierarchy.SetData(reader);
             HousekeepingHierarchyCollection.Add(newHousekeepingHierarchy);
         }
         return HousekeepingHierarchyCollection;
     }
     catch(Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
 public void InsertWorkFlowTransaction(int DocListID,Int32 StatusID, String UserID, int CompanyID, long TransactionID = 0,bool IsApprove=true, String Comment = "", bool IsUpdate = false, bool IsDelete = false)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     IDataReader reader = null;
     String sql = "EXEC spInsertCmnWorkFlowTransaction " + DocListID+","+StatusID+",'"+UserID+"',"+CompanyID+","+TransactionID+","+IsApprove+",'"+Comment+"',"+IsUpdate+","+IsDelete;
     try
     {
         conManager.OpenDataReader(sql, out reader);
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Esempio n. 10
0
 public static CustomList<ContactTypeChild> GetAllContactTypeChild()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<ContactTypeChild> ContactTypeChildCollection = new CustomList<ContactTypeChild>();
     IDataReader reader = null;
     const String sql = "select *from ContactTypeChild";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             ContactTypeChild newContactTypeChild = new ContactTypeChild();
             newContactTypeChild.SetData(reader);
             ContactTypeChildCollection.Add(newContactTypeChild);
         }
         ContactTypeChildCollection.InsertSpName = "spInsertContactTypeChild";
         ContactTypeChildCollection.UpdateSpName = "spUpdateContactTypeChild";
         ContactTypeChildCollection.DeleteSpName = "spDeleteContactTypeChild";
         return ContactTypeChildCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Esempio n. 11
0
 public void LoadReportSourceDataSet(ref DataSet dsRef, CommandType cmdType, String strCmdText, IDbDataParameter[] sqlParam)
 {
     ConnectionManager conManager = new ConnectionManager(ConName);
     IDataReader reader = null;
     try
     {
         if (sqlParam.IsNull() || sqlParam.Length.IsZero())
             conManager.OpenDataReader(strCmdText, out reader);
         else
             conManager.OpenDataReader(out reader, strCmdText, sqlParam);
         //
         dsRef = Util.DataReaderToDataSet(reader);
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (conManager != null)
         {
             conManager.CloseConnection();
             conManager.Dispose();
         }
         if (reader.IsNotNull() && reader.IsClosed.IsFalse())
             reader.Close();
     }
 }
Esempio n. 12
0
 public static CustomList<ItemMaster> GetAllItemMasterByItemCode(String itemCode)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<ItemMaster> ItemMasterCollection = new CustomList<ItemMaster>();
     IDataReader reader = null;
     String sql = "select *from ItemMaster Where ItemCode='"+itemCode+"'";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             ItemMaster newItemMaster = new ItemMaster();
             newItemMaster.SetData(reader);
             ItemMasterCollection.Add(newItemMaster);
         }
         return ItemMasterCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
 public static CustomList<AccReportConfigurationHead> GetAllAccReportConfigurationHead(Int32 ReportTypeID)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<AccReportConfigurationHead> AccReportConfigurationHeadCollection = new CustomList<AccReportConfigurationHead>();
     IDataReader reader = null;
     String sql = "Exec spGetHeadCategoryMap "+ReportTypeID;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             AccReportConfigurationHead newAccReportConfigurationHead = new AccReportConfigurationHead();
             newAccReportConfigurationHead.SetData(reader);
             AccReportConfigurationHeadCollection.Add(newAccReportConfigurationHead);
         }
         return AccReportConfigurationHeadCollection;
     }
     catch(Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Esempio n. 14
0
 public static CustomList<AccChequeStatusList> GetAllAccChequeStatusList()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<AccChequeStatusList> AccChequeStatusListCollection = new CustomList<AccChequeStatusList>();
     IDataReader reader = null;
     const String sql = "select *from AccChequeStatusList";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             AccChequeStatusList newAccChequeStatusList = new AccChequeStatusList();
             newAccChequeStatusList.SetData(reader);
             AccChequeStatusListCollection.Add(newAccChequeStatusList);
         }
         return AccChequeStatusListCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Esempio n. 15
0
 public static CustomList<ItemMaster> FindAllItemMasterGroupWise()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<ItemMaster> ItemMasterCollection = new CustomList<ItemMaster>();
     IDataReader reader = null;
     String sql = "select ItemCode,ItemDescription,ItemGroupID,ItemSubGroupID from ItemMaster";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             ItemMaster newItemMaster = new ItemMaster();
             newItemMaster.SetDataItem(reader);
             ItemMasterCollection.Add(newItemMaster);
         }
         return ItemMasterCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
 public static CustomList<AccReportConfigurationHeadCOAMap> GetAllAccReportConfigurationHeadCOAMap(Int32 headID)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<AccReportConfigurationHeadCOAMap> AccReportConfigurationHeadCOAMapCollection = new CustomList<AccReportConfigurationHeadCOAMap>();
     IDataReader reader = null;
     String sql = "select HeadCOAMapID,HeadID,'' COAName,COAID,IsActive from AccReportConfigurationHeadCOAMap Where HeadID='" + headID + "'";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             AccReportConfigurationHeadCOAMap newAccReportConfigurationHeadCOAMap = new AccReportConfigurationHeadCOAMap();
             newAccReportConfigurationHeadCOAMap.SetData(reader);
             AccReportConfigurationHeadCOAMapCollection.Add(newAccReportConfigurationHeadCOAMap);
         }
         return AccReportConfigurationHeadCOAMapCollection;
     }
     catch(Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Esempio n. 17
0
 public static CustomList<StockView> StockView1()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<StockView> StockViewCollection = new CustomList<StockView>();
     IDataReader reader = null;
     String sql = "EXEC spGetStockView";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             StockView newStockView = new StockView();
             newStockView.SetData(reader);
             StockViewCollection.Add(newStockView);
         }
         return StockViewCollection;
     }
     catch(Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Esempio n. 18
0
 public static CustomList<GroupRule> GetAllGroupSecurityRule(string groupCode)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.SysMan);
     CustomList<GroupRule> GroupSecurityRuleCollection = new CustomList<GroupRule>();
     String sql = "Select  *from GroupRule where GroupCode='" + groupCode + "'";
     IDataReader reader = null;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             GroupRule newGroupSecurityRule = new GroupRule();
             newGroupSecurityRule.SetData(reader);
             GroupSecurityRuleCollection.Add(newGroupSecurityRule);
         }
         reader.Close();
         GroupSecurityRuleCollection.InsertSpName = "spInsertGroupRule";
         GroupSecurityRuleCollection.SelectSpName = "spDeleteGroupRule";
         return GroupSecurityRuleCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Esempio n. 19
0
 public static CustomList<LatestNews> GetAllLatestNews()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<LatestNews> LatestNewsCollection = new CustomList<LatestNews>();
     IDataReader reader = null;
     const String sql = "select *from LatestNews";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             LatestNews newLatestNews = new LatestNews();
             newLatestNews.SetData(reader);
             LatestNewsCollection.Add(newLatestNews);
         }
         LatestNewsCollection.InsertSpName = "spInsertLatestNews";
         LatestNewsCollection.UpdateSpName = "spUpdateLatestNews";
         LatestNewsCollection.DeleteSpName = "spDeleteLatestNews";
         return LatestNewsCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Esempio n. 20
0
 public static CustomList<CmnBankAccount> GetAllCmnBankAccount()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<CmnBankAccount> CmnBankAccountCollection = new CustomList<CmnBankAccount>();
     IDataReader reader = null;
     String sql = "spFindBankAccount";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             CmnBankAccount newCmnBankAccount = new CmnBankAccount();
             newCmnBankAccount.SetData(reader);
             CmnBankAccountCollection.Add(newCmnBankAccount);
         }
         return CmnBankAccountCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
 public static CustomList<CmnDocListTableMapping> GetAllCmnTransactionReferenceFind()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<CmnDocListTableMapping> CmnTransRefCollection = new CustomList<CmnDocListTableMapping>();
     IDataReader reader = null;
     String sql = "EXEC spFindDocListTableMaping";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             CmnDocListTableMapping newCmnTransactionReference = new CmnDocListTableMapping();
             newCmnTransactionReference.SetData(reader);
             CmnTransRefCollection.Add(newCmnTransactionReference);
         }
         return CmnTransRefCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
 public static CustomList<CmnDocListTableMapping> GetAllCmnDocListTableMapping()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<CmnDocListTableMapping> CmnDocListTableMappingCollection = new CustomList<CmnDocListTableMapping>();
     IDataReader reader = null;
     const String sql = "select * from CmnDocListTableMapping";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             CmnDocListTableMapping newCmnDocListTableMapping = new CmnDocListTableMapping();
             newCmnDocListTableMapping.SetData(reader);
             CmnDocListTableMappingCollection.Add(newCmnDocListTableMapping);
         }
         CmnDocListTableMappingCollection.InsertSpName = "spInsertCmnDocListTableMapping";
         CmnDocListTableMappingCollection.UpdateSpName = "spUpdateCmnDocListTableMapping";
         CmnDocListTableMappingCollection.DeleteSpName = "spDeleteCmnDocListTableMapping";
         return CmnDocListTableMappingCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Esempio n. 23
0
        public void LoadReportTreeInfo(ref DataSet dsRef)
        {
            ConnectionManager conManager = new ConnectionManager(ConName);
            IDataReader reader = null;
            try
            {
                const String spName = "spWebReportSuite";
                conManager.OpenDataReader(out reader, spName, 1, 0);
                dsRef = Util.DataReaderToDataSet(reader);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (conManager != null)
                {
                    conManager.CloseConnection();
                    conManager.Dispose();
                }

                if (reader.IsNotNull() && reader.IsClosed.IsFalse())
                    reader.Close();
            }
        }
Esempio n. 24
0
 public static CustomList<ItemStructure> GetAllItemStructure(Int32 itemGroupID)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<ItemStructure> ItemStructureCollection = new CustomList<ItemStructure>();
     IDataReader reader = null;
     String sql = "select *from ItemStructure Where GroupItemID=" + itemGroupID;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             ItemStructure newItemStructure = new ItemStructure();
             newItemStructure.SetData(reader);
             ItemStructureCollection.Add(newItemStructure);
         }
         return ItemStructureCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Esempio n. 25
0
 public static CustomList<EmployeeHKInfo> GetAllEmployeeHKInfo(Int64 empKey)
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<EmployeeHKInfo> EmployeeHKInfoCollection = new CustomList<EmployeeHKInfo>();
     IDataReader reader = null;
     String sql = "select *from EmployeeHKInfo where EmpKey=" + empKey;
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             EmployeeHKInfo newEmployeeHKInfo = new EmployeeHKInfo();
             newEmployeeHKInfo.SetData(reader);
             EmployeeHKInfoCollection.Add(newEmployeeHKInfo);
         }
         EmployeeHKInfoCollection.InsertSpName = "spInsertEmployeeHKInfo";
         EmployeeHKInfoCollection.UpdateSpName = "spUpdateEmployeeHKInfo";
         EmployeeHKInfoCollection.DeleteSpName = "spDeleteEmployeeHKInfo";
         return EmployeeHKInfoCollection;
     }
     catch(Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Esempio n. 26
0
 public static CustomList<ItemMaster> FindAllItemMaster()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<ItemMaster> ItemMasterCollection = new CustomList<ItemMaster>();
     IDataReader reader = null;
     const String sql = "spFindItem";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             ItemMaster newItemMaster = new ItemMaster();
             newItemMaster.SetDataFindItem(reader);
             ItemMasterCollection.Add(newItemMaster);
         }
         return ItemMasterCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Esempio n. 27
0
 public static CustomList<LatestNews> GetAllLatestNewsForDisplay()
 {
     ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
     CustomList<LatestNews> LatestNewsCollection = new CustomList<LatestNews>();
     IDataReader reader = null;
     String sql = "Exec GetLatestNews";
     try
     {
         conManager.OpenDataReader(sql, out reader);
         while (reader.Read())
         {
             LatestNews newLatestNews = new LatestNews();
             newLatestNews.NewsDetails = reader.GetString("NewsDetails");
             LatestNewsCollection.Add(newLatestNews);
         }
         return LatestNewsCollection;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
     finally
     {
         if (reader != null && !reader.IsClosed)
             reader.Close();
     }
 }
Esempio n. 28
0
        public static CustomList<ParameterFilterValue> GetReportValueEmp(string search)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            CustomList<ParameterFilterValue> ParameterFilterValueCollection = new CustomList<ParameterFilterValue>();
            IDataReader reader = null;
            String sql = "Exec spReportViewerEmpSearch " + search;
            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    ParameterFilterValue newParameterFilterValue = new ParameterFilterValue();
                    newParameterFilterValue.SetData(reader);
                    ParameterFilterValueCollection.Add(newParameterFilterValue);
                }
                return ParameterFilterValueCollection;
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (conManager != null)
                {
                    conManager.CloseConnection();
                    conManager.Dispose();
                }

                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
Esempio n. 29
0
        public static CustomList<ReportSuiteMenu> GetReportList()
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            CustomList<ReportSuiteMenu> ReportSuiteMenuCollection = new CustomList<ReportSuiteMenu>();
            IDataReader reader = null;
            String sql = "EXEC spGetReportList";
            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    ReportSuiteMenu newReportSuiteMenu = new ReportSuiteMenu();
                    newReportSuiteMenu.REPORTID = reader.GetInt32("REPORTID");
                    newReportSuiteMenu.NODE_TEXT = reader.GetString("NODE_TEXT");
                    ReportSuiteMenuCollection.Add(newReportSuiteMenu);
                }
                return ReportSuiteMenuCollection;
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (conManager != null)
                {
                    conManager.CloseConnection();
                    conManager.Dispose();
                }

                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
Esempio n. 30
0
        public static CustomList<ReportSuiteMenu> GetReportSuiteMenu()
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            CustomList<ReportSuiteMenu> ReportSuiteMenuCollection = new CustomList<ReportSuiteMenu>();
            IDataReader reader = null;
            String sql = "EXEC spGetUserWiseProfileReport";
            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    ReportSuiteMenu newReportSuiteMenu = new ReportSuiteMenu();
                    newReportSuiteMenu.SetData(reader);
                    ReportSuiteMenuCollection.Add(newReportSuiteMenu);
                }
                return ReportSuiteMenuCollection;
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (conManager != null)
                {
                    conManager.CloseConnection();
                    conManager.Dispose();
                }

                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }