public static CustomList <Hr_MasterSetup> GetAllHr_MasterCommissionAndVATPercent() { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); string IsValue = ""; CustomList <Hr_MasterSetup> Hr_MasterSetupList = new CustomList <Hr_MasterSetup>(); try { IDataReader reader = null; String sql = "select ItemValue from Hr_MasterSetup Where ItemType IN('CP','VATP','InventoryP')"; conManager.OpenDataReader(sql, out reader); while (reader.Read()) { Hr_MasterSetup newHr_MasterSetup = new Hr_MasterSetup(); newHr_MasterSetup._ItemValue = reader.GetString("ItemValue"); Hr_MasterSetupList.Add(newHr_MasterSetup); } } catch (Exception ex) { throw (ex); } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } return(Hr_MasterSetupList); }
public static string GetAllHr_MasterSetupBufferTime() { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); string IsValue = ""; try { IDataReader reader = null; String sql = "select ItemValue from Hr_MasterSetup Where ItemType IN('InTimeBuffer','OutTimeBuffer','LunchInBuffer','LunchOutBuffer')"; conManager.OpenDataReader(sql, out reader); while (reader.Read()) { Hr_MasterSetup newHr_MasterSetup = new Hr_MasterSetup(); if (IsValue == "") { IsValue = reader.GetString("ItemValue"); } else { IsValue = IsValue + "," + reader.GetString("ItemValue"); } } } catch (Exception ex) { throw (ex); } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } return(IsValue); }