예제 #1
0
        public bool Insert(int PersonId, decimal Score, DateTime DateTaken, string LicensingNumber, string RegisterationNumber)
        {
            PersonSCHealthSpecialityDAC personschealthspecialityComponent = new PersonSCHealthSpecialityDAC();
            int PersonSCHealthSpecialityId = 0;

            return(personschealthspecialityComponent.InsertNewPersonSCHealthSpeciality(ref PersonSCHealthSpecialityId, PersonId, Score, DateTaken, LicensingNumber, RegisterationNumber));
        }
예제 #2
0
        public bool Insert(PersonSCHealthSpeciality personschealthspeciality)
        {
            int autonumber = 0;
            PersonSCHealthSpecialityDAC personschealthspecialityComponent = new PersonSCHealthSpecialityDAC();
            bool endedSuccessfuly = personschealthspecialityComponent.InsertNewPersonSCHealthSpeciality(ref autonumber, personschealthspeciality.PersonId, personschealthspeciality.Score, personschealthspeciality.DateTaken, personschealthspeciality.LicensingNumber, personschealthspeciality.RegisterationNumber);

            if (endedSuccessfuly)
            {
                personschealthspeciality.PersonSCHealthSpecialityId = autonumber;
            }
            return(endedSuccessfuly);
        }
예제 #3
0
        public List <PersonSCHealthSpeciality> GetAll()
        {
            PersonSCHealthSpecialityDAC _personSCHealthSpecialityComponent = new PersonSCHealthSpecialityDAC();
            IDataReader reader = _personSCHealthSpecialityComponent.GetAllPersonSCHealthSpeciality().CreateDataReader();
            List <PersonSCHealthSpeciality> _personSCHealthSpecialityList = new List <PersonSCHealthSpeciality>();

            while (reader.Read())
            {
                if (_personSCHealthSpecialityList == null)
                {
                    _personSCHealthSpecialityList = new List <PersonSCHealthSpeciality>();
                }
                PersonSCHealthSpeciality _personSCHealthSpeciality = new PersonSCHealthSpeciality();
                if (reader["PersonSCHealthSpecialityId"] != DBNull.Value)
                {
                    _personSCHealthSpeciality.PersonSCHealthSpecialityId = Convert.ToInt32(reader["PersonSCHealthSpecialityId"]);
                }
                if (reader["PersonId"] != DBNull.Value)
                {
                    _personSCHealthSpeciality.PersonId = Convert.ToInt32(reader["PersonId"]);
                }
                if (reader["Score"] != DBNull.Value)
                {
                    _personSCHealthSpeciality.Score = Convert.ToDecimal(reader["Score"]);
                }
                if (reader["DateTaken"] != DBNull.Value)
                {
                    _personSCHealthSpeciality.DateTaken = Convert.ToDateTime(reader["DateTaken"]);
                }
                if (reader["LicensingNumber"] != DBNull.Value)
                {
                    _personSCHealthSpeciality.LicensingNumber = Convert.ToString(reader["LicensingNumber"]);
                }
                if (reader["RegisterationNumber"] != DBNull.Value)
                {
                    _personSCHealthSpeciality.RegisterationNumber = Convert.ToString(reader["RegisterationNumber"]);
                }
                _personSCHealthSpeciality.NewRecord = false;
                _personSCHealthSpecialityList.Add(_personSCHealthSpeciality);
            }
            reader.Close();
            return(_personSCHealthSpecialityList);
        }
예제 #4
0
        public PersonSCHealthSpeciality GetByID(int _personSCHealthSpecialityId)
        {
            PersonSCHealthSpecialityDAC _personSCHealthSpecialityComponent = new PersonSCHealthSpecialityDAC();
            IDataReader reader = _personSCHealthSpecialityComponent.GetByIDPersonSCHealthSpeciality(_personSCHealthSpecialityId);
            PersonSCHealthSpeciality _personSCHealthSpeciality = null;

            while (reader.Read())
            {
                _personSCHealthSpeciality = new PersonSCHealthSpeciality();
                if (reader["PersonSCHealthSpecialityId"] != DBNull.Value)
                {
                    _personSCHealthSpeciality.PersonSCHealthSpecialityId = Convert.ToInt32(reader["PersonSCHealthSpecialityId"]);
                }
                if (reader["PersonId"] != DBNull.Value)
                {
                    _personSCHealthSpeciality.PersonId = Convert.ToInt32(reader["PersonId"]);
                }
                if (reader["Score"] != DBNull.Value)
                {
                    _personSCHealthSpeciality.Score = Convert.ToDecimal(reader["Score"]);
                }
                if (reader["DateTaken"] != DBNull.Value)
                {
                    _personSCHealthSpeciality.DateTaken = Convert.ToDateTime(reader["DateTaken"]);
                }
                if (reader["LicensingNumber"] != DBNull.Value)
                {
                    _personSCHealthSpeciality.LicensingNumber = Convert.ToString(reader["LicensingNumber"]);
                }
                if (reader["RegisterationNumber"] != DBNull.Value)
                {
                    _personSCHealthSpeciality.RegisterationNumber = Convert.ToString(reader["RegisterationNumber"]);
                }
                _personSCHealthSpeciality.NewRecord = false;
            }
            reader.Close();
            return(_personSCHealthSpeciality);
        }
예제 #5
0
        public bool Update(PersonSCHealthSpeciality personschealthspeciality, int old_personSCHealthSpecialityId)
        {
            PersonSCHealthSpecialityDAC personschealthspecialityComponent = new PersonSCHealthSpecialityDAC();

            return(personschealthspecialityComponent.UpdatePersonSCHealthSpeciality(personschealthspeciality.PersonId, personschealthspeciality.Score, personschealthspeciality.DateTaken, personschealthspeciality.LicensingNumber, personschealthspeciality.RegisterationNumber, old_personSCHealthSpecialityId));
        }
예제 #6
0
        public int UpdateDataset(System.Data.DataSet dataset)
        {
            PersonSCHealthSpecialityDAC personschealthspecialitycomponent = new PersonSCHealthSpecialityDAC();

            return(personschealthspecialitycomponent.UpdateDataset(dataset));
        }
예제 #7
0
        public void Delete(int Original_PersonSCHealthSpecialityId)
        {
            PersonSCHealthSpecialityDAC personschealthspecialityComponent = new PersonSCHealthSpecialityDAC();

            personschealthspecialityComponent.DeletePersonSCHealthSpeciality(Original_PersonSCHealthSpecialityId);
        }
예제 #8
0
        public bool Update(int PersonId, decimal Score, DateTime DateTaken, string LicensingNumber, string RegisterationNumber, int Original_PersonSCHealthSpecialityId)
        {
            PersonSCHealthSpecialityDAC personschealthspecialityComponent = new PersonSCHealthSpecialityDAC();

            return(personschealthspecialityComponent.UpdatePersonSCHealthSpeciality(PersonId, Score, DateTaken, LicensingNumber, RegisterationNumber, Original_PersonSCHealthSpecialityId));
        }