Example #1
0
        public void Delete(int patientId)
        {
            var check = GetByPatientId(patientId);

            if (check == null)
            {
                throw new ApplicationException();
            }

            MyDataSet ds = new MyDataSet();

            ds.EnforceConstraints = false;

            DbTools.ExecuteQuery(
                FireBirdConnection.Connection,
                string.Format(UrgentAppQueries.TAGREGISTRATION_DELETE_BYPATIENTID, patientId));
        }
Example #2
0
        public void Create(TagRegistrationDto tagRegistration)
        {
            MyDataSet ds = new MyDataSet();

            ds.EnforceConstraints = false;

            CheckForPKViolations(tagRegistration);

            string query = string.Format(
                UrgentAppQueries.TAGREGISTRATION_INSERT,
                tagRegistration.Id,
                tagRegistration.Tag_Id,
                tagRegistration.Patient_Id
                );

            DbTools.ExecuteQuery(
                FireBirdConnection.Connection, query);
        }
        public void Create(TagEventDto tagEvent)
        {
            MyDataSet ds = new MyDataSet();

            ds.EnforceConstraints = false;

            var type = tagEventTypeTasks.GetById(tagEvent.TagEventType_Id);

            if (type == null)
            {
                throw new ApplicationException();
            }

            string query = string.Format(
                Queries.TAGEVENT_INSERT_WITH_PATITIENT,
                tagEvent.Tag_Id,
                tagEvent.TagEventType_Id,
                tagEvent.Created,
                tagEvent.Patient_Id);

            DbTools.ExecuteQuery(
                FireBirdConnection.Connection, query);
        }