コード例 #1
0
        private Patient GetPreRegistrationPatientInformation(string uniqueID)
        {
            Patient patient = new Patient();

            try
            {
                using (IDbConnection db = new MySqlConnection(ConfigurationValues.GroveHillConnection))
                {
                    const string query = "select UniqueID,FirstName,LastName,CellPhone,Email,DateOfBirth"
                        + " from patientswhoregister"
                        + " where UniqueID = @UniqueID";

                    patient = db.Query<Patient>(query, new
                    {
                        @UniqueID = uniqueID
                    }).SingleOrDefault();
                    return patient;
                }
            }
            catch (Exception er)
            {
                return patient;
            }
        }
コード例 #2
0
        public Patient GetPatientInformation(string email)
        {
            Patient patient = new Patient();

            try
            {
                using (IDbConnection db = new MySqlConnection(ConfigurationValues.GroveHillConnection))
                {
                    const string query = "select UniqueID,FirstName,LastName,CellPhone,Email,DateOfBirth"
                        + " from Patients"
                        + " where Email = @Email";

                    patient = db.Query<Patient>(query, new
                    {
                        @Email = email
                    }).SingleOrDefault();
                    return patient;
                }
            }
            catch (Exception er)
            {
                return patient;
            }
        }