public static CustomList <MedicalReinSetup> GetAllMedicalReinSetup(string fyKey, string empKey)
        {
            ConnectionManager             conManager = new ConnectionManager(ConnectionName.HR);
            CustomList <MedicalReinSetup> MedicalReinSetupCollection = new CustomList <MedicalReinSetup>();
            IDataReader reader = null;
            String      sql    = "select *from MedicalReinSetup Where FYKey=" + fyKey + " and EmpKey=" + empKey;

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    MedicalReinSetup newMedicalReinSetup = new MedicalReinSetup();
                    newMedicalReinSetup.SetData(reader);
                    MedicalReinSetupCollection.Add(newMedicalReinSetup);
                }
                return(MedicalReinSetupCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
        public static MedicalReinSetup GetAllMedicalBalance(string fyKey, string empKey)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            IDataReader       reader     = null;
            String            sql        = "EXEC spGetMedicalAllowance " + empKey + "," + fyKey;

            try
            {
                conManager.OpenDataReader(sql, out reader);
                MedicalReinSetup newMedicalReinSetup = new MedicalReinSetup();
                while (reader.Read())
                {
                    newMedicalReinSetup.SelfLimit      = reader.GetDecimal("SelfLimit");
                    newMedicalReinSetup.FamilyLimit    = reader.GetDecimal("FamilyLimit");
                    newMedicalReinSetup.SelfPaid       = reader.GetDecimal("SelfPaid");
                    newMedicalReinSetup.FamilyPaid     = reader.GetDecimal("FamilyPaid");
                    newMedicalReinSetup.MaternityLimit = reader.GetDecimal("MaternityLimit");
                    newMedicalReinSetup.MaternityPaid  = reader.GetDecimal("MaternityPaid");
                }
                return(newMedicalReinSetup);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }
        public static CustomList <MedicalReinSetup> GetAllMedicalReinSetup()
        {
            ConnectionManager             conManager = new ConnectionManager(ConnectionName.HR);
            CustomList <MedicalReinSetup> MedicalReinSetupCollection = new CustomList <MedicalReinSetup>();
            IDataReader  reader = null;
            const String sql    = "select *from MedicalReinSetup";

            try
            {
                conManager.OpenDataReader(sql, out reader);
                while (reader.Read())
                {
                    MedicalReinSetup newMedicalReinSetup = new MedicalReinSetup();
                    newMedicalReinSetup.SetData(reader);
                    MedicalReinSetupCollection.Add(newMedicalReinSetup);
                }
                MedicalReinSetupCollection.InsertSpName = "spInsertMedicalReinSetup";
                MedicalReinSetupCollection.UpdateSpName = "spUpdateMedicalReinSetup";
                MedicalReinSetupCollection.DeleteSpName = "spDeleteMedicalReinSetup";
                return(MedicalReinSetupCollection);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (reader != null && !reader.IsClosed)
                {
                    reader.Close();
                }
            }
        }