Example #1
0
        public bool DeleteVaccination(int vaccNumber)
        {
            string cmd = @"Delete from hvk_vaccination 
                                where vaccination_number = " + vaccNumber;

            return(HVK_SqlConnection.Delete(cmd));
        }
Example #2
0
        public int Add(string vaccinationName)
        {
            string cmdStr = "Insert into hvk_vaccination (VACCINATION_NUMBER, VACCINATION_NAME)" +
                            " values (HVK_VACCINATION_SEQ.NEXTVAL," + vaccinationName + ")";

            return(HVK_SqlConnection.AddRow(cmdStr, "hvk_vaccination_seq"));
        }
Example #3
0
        public bool Delete(int ownerNumber)
        {
            string cmd = @"Delete from hvk_owner 
                                where owner_number = " + ownerNumber;

            return(HVK_SqlConnection.Delete(cmd));
        }
Example #4
0
 public DataTable GetFullServiceInfo()
 {
     //            dsHvkTableAdapters.HVK_SERVICETableAdapter adapter = new dsHvkTableAdapters.HVK_SERVICETableAdapter();
     //            adapter.ClearBeforeFill = true;
     //            return adapter.GetData();
     return(HVK_SqlConnection.GetData("HVK_SERVICE"));
 }
Example #5
0
 public DataTable GetVaccinationInfoForPet(int petNumber)
 {
     //            dsHvkTableAdapters.PetVaccinationInformationTableAdapter adapter = new dsHvkTableAdapters.PetVaccinationInformationTableAdapter();
     //            adapter.ClearBeforeFill = true;
     //            return adapter.GetData(petNumber);
     return(HVK_SqlConnection.GetData("HVK_PET_VACCINATION", "select * from HVK_PET_VACCINATION where pet_pet_number = " + petNumber));
 }
Example #6
0
 public DataTable GetFullFoodInfo()
 {
     //            dsHvkTableAdapters.HVK_FOODTableAdapter adapter = new dsHvkTableAdapters.HVK_FOODTableAdapter();
     //            adapter.ClearBeforeFill = true;
     //            return adapter.GetData();
     return(HVK_SqlConnection.GetData("HVK_FOOD"));
 }
Example #7
0
 public DataTable GetFullReservationInfo()
 {
     //            dsHvkTableAdapters.HVK_RESERVATIONTableAdapter adapter = new dsHvkTableAdapters.HVK_RESERVATIONTableAdapter();
     //            adapter.ClearBeforeFill = true;
     //            return adapter.GetData();
     return(HVK_SqlConnection.GetData("HVK_RESERVATION"));
 }
Example #8
0
 public DataTable GetFullVetInfo()
 {
     //            dsHvkTableAdapters.HVK_VETERINARIANTableAdapter adapter = new dsHvkTableAdapters.HVK_VETERINARIANTableAdapter();
     //            adapter.ClearBeforeFill = true;
     //            return adapter.GetData();
     return(HVK_SqlConnection.GetData("HVK_VETERINARIAN"));
 }
Example #9
0
        public bool Delete(int resNumber)
        {
            string cmd = @"Delete from hvk_pet_reservation 
                                where res_reservation_number = " + resNumber;

            return(HVK_SqlConnection.Delete(cmd));
        }
Example #10
0
        public bool Update(int petNumber, string name, char gender, char isFixed, string breed,
                           DateTime birthdate, int ownerNumber, char dogSize, string notes)
        {
            string        cmd  = @"Update hvk_pet 
                                set pet_name = :name, 
                                pet_gender = :gender,
                                pet_fixed = :isFixed,
                                pet_breed = :breed,
                                pet_birthdate = :birthdate,
                                own_owner_number = :ownerNumber,
                                dog_size = :dogSize,
                                special_notes = :notes
                                    where pet_number = :petNumber;";
            List <string> list = new List <string>();

            list.Add("petNumber~" + petNumber);
            list.Add("name~" + name);
            list.Add("gender~" + gender);
            list.Add("isFixed~" + isFixed);
            list.Add("breed~" + breed);
            list.Add("birthdate~" + birthdate.ToShortDateString());
            list.Add("ownerNumber~" + ownerNumber);
            list.Add("dogSize~" + dogSize);
            list.Add("notes~" + notes);
            return(HVK_SqlConnection.UpdateRow(cmd, list));
        }
Example #11
0
        public bool Delete(int dailyNumber)
        {
            string cmd = @"Delete from hvk_daily_rate 
                                where daily_rate_number = " + dailyNumber;

            return(HVK_SqlConnection.Delete(cmd));
        }
Example #12
0
 public DataTable GetDataByOwnerNumber(int ownerNumber)
 {
     //            dsHvkTableAdapters.HVK_PETTableAdapter adapter = new dsHvkTableAdapters.HVK_PETTableAdapter();
     //            adapter.ClearBeforeFill = true;
     //            return adapter.GetDataByOwnerNumber(ownerNumber);
     return(HVK_SqlConnection.GetData("HVK_PET", "select * from HVK_PET where own_owner_number = " + ownerNumber));
 }
Example #13
0
 public DataTable GetFullDiscountInfo()
 {
     //            dsHvkTableAdapters.HVK_DISCOUNTTableAdapter adapter = new dsHvkTableAdapters.HVK_DISCOUNTTableAdapter();
     //            adapter.ClearBeforeFill = true;
     //            return adapter.GetData();
     return(HVK_SqlConnection.GetData("HVK_DISCOUNT"));
 }
Example #14
0
        public bool DeletePetVaccination(int petNumber)
        {
            string cmd = @"Delete from hvk_pet_vaccination 
                                where pet_pet_number = " + petNumber;

            return(HVK_SqlConnection.Delete(cmd));
        }
Example #15
0
        public bool Update(int ownerNumber, string first, string last, string street, string city,
                           string province, string postal, string phone, string email, string emgFirst, string emgLast,
                           string emgPhone, int vet)
        {
            string        cmd  = @"Update hvk_owner 
                                set owner_first_name = :fName, 
                                owner_last_name = :lName,
                                owner_street = :street,
                                owner_city = :city,
                                owner_province = :province,
                                owner_postal_code = :postalCode,
                                owner_phone = :phone,
                                owner_email = :email,
                                emergency_contact_first_name = :eFName,
                                emergency_contact_last_name = :eLName,
                                emergency_contact_phone = :ePhone,
                                vet_vet_number = :vet
                                    where owner_number = :oNumber;";
            List <string> list = new List <string>();

            list.Add("oNumber~" + ownerNumber);
            list.Add("fName~" + first);
            list.Add("lName~" + last);
            list.Add("street~" + street);
            list.Add("city~" + city);
            list.Add("province~" + province);
            list.Add("postalCode~" + postal);
            list.Add("email~" + email);
            list.Add("eFName~" + emgFirst);
            list.Add("eLName~" + emgLast);
            list.Add("ePhone~" + emgPhone);
            list.Add("vet~" + vet);
            return(HVK_SqlConnection.UpdateRow(cmd, list));
        }
Example #16
0
        public bool DeleteService(int serviceNumber)
        {
            string cmd = @"Delete from hvk_service 
                                where service_number = " + serviceNumber;

            return(HVK_SqlConnection.Delete(cmd));
        }
Example #17
0
        public int Add(string brand, string variety)
        {
            string cmdStr = "Insert into hvk_food (FOOD_NUMBER, FOOD_BRAND, FOOD_VARIETY)" +
                            " values (HVK_FOOD_SEQ.NEXTVAL," + brand + "," + variety + ")";

            return(HVK_SqlConnection.AddRow(cmdStr, "hvk_food_seq"));
        }
Example #18
0
        /*
         * PET_RESERVATION_SERVICE
         */

        public int Add(int petResNumber, int serviceNumber)
        {
            string cmdStr = "Insert into hvk_pet_reservation_service (PR_PET_RES_NUMBER, SERV_SERVICE_NUMBER)" +
                            " values (" + petResNumber + ", " + serviceNumber + ")";

            return(HVK_SqlConnection.AddRow(cmdStr));
        }
Example #19
0
        public bool RemovePetRes(int petNumber)
        {
            string cmd = @"Delete from hvk_pet_reservation 
                                where PET_PET_NUMBER = " + petNumber;

            return(HVK_SqlConnection.Delete(cmd));
        }
Example #20
0
 public DataTable GetFullPetVaccinationInfo()
 {
     //            dsHvkTableAdapters.HVK_PET_VACCINATIONTableAdapter adapter = new dsHvkTableAdapters.HVK_PET_VACCINATIONTableAdapter();
     //            adapter.ClearBeforeFill = true;
     //            return adapter.GetData();
     return(HVK_SqlConnection.GetData("HVK_PET_VACCINATION"));
 }
Example #21
0
        public int Add(string serviceDesc)
        {
            string cmdStr = "Insert into hvk_service (SERVICE_NUMBER, SERVICE_DESCRIPTION)" +
                            " values (HVK_SERVICE_SEQ.NEXTVAL," + serviceDesc + ")";

            return(HVK_SqlConnection.AddRow(cmdStr, "hvk_service_seq"));
        }
        public bool Delete(int petResNumber)
        {
            string cmd = @"Delete from hvk_pet_reservation_discount 
                                where pr_pet_res_number = " + petResNumber;

            return(HVK_SqlConnection.Delete(cmd));
        }
Example #23
0
 public DataTable GetFullLogInfo()
 {
     //            dsHvkTableAdapters.HVK_KENNEL_LOGTableAdapter adapter = new dsHvkTableAdapters.HVK_KENNEL_LOGTableAdapter();
     //            adapter.ClearBeforeFill = true;
     //            return adapter.GetData();
     return(HVK_SqlConnection.GetData("HVK_KENNEL_LOG"));
 }
Example #24
0
        public bool DeleteResDis(int resNumber)
        {
            string cmd = @"Delete from hvk_reservation_discount 
                                where res_reservation_number = " + resNumber;

            return(HVK_SqlConnection.Delete(cmd));
        }
Example #25
0
        public bool Delete(int runNumber)
        {
            string cmd = @"Delete from hvk_run 
                                where run_number = " + runNumber;

            return(HVK_SqlConnection.Delete(cmd));
        }
Example #26
0
        public bool Delete(int discountNumber)
        {
            string cmd = @"Delete from hvk_discount 
                                where discount_number = " + discountNumber;

            return(HVK_SqlConnection.Delete(cmd));
        }
Example #27
0
        public int Add(DateTime date, int sequence, string notes, int petResNumber)
        {
            string cmdStr = "Insert into hvk_kennel_log (KENNEL_LOG_DATE,KENNEL_LOG_SEQUENCE_NUMBER," +
                            "KENNEL_LOG_NOTES, PR_PET_RES_NUMBER, KENNEL_LOG_VIDEO)" +
                            " values (" + date + "," + sequence + "," + notes + "," + petResNumber + ")";

            return(HVK_SqlConnection.AddRow(cmdStr, ""));
        }
Example #28
0
        /*
         * RESERVATION_DISCOUNT
         */

        public int AddResDis(int discountNumber, int reservationNumber)
        {
            string cmdStr = "Insert into hvk_reservation_discount (DISC_DISCOUNT_NUMBER," +
                            "RES_RESERVATION_NUMBER)" +
                            " values (" + discountNumber + "," + reservationNumber + ")";

            return(HVK_SqlConnection.AddRow(cmdStr));
        }
Example #29
0
        public int Add(string desc, double percentage, char dType)
        {
            string cmdStr = "Insert into hvk_discount (DISCOUNT_NUMBER, DISCOUNT_DESCRIPTION," +
                            "DISCOUNT_PERCENTAGE, DISCOUNT_TYPE)" +
                            " values (HVK_DISCOUNT_SEQ.NEXTVAL," + desc + "," + percentage + "," + dType + ")";

            return(HVK_SqlConnection.AddRow(cmdStr));
        }
Example #30
0
        public int Add(int frequency, string quantity, int petResNumber, int foodNumber)
        {
            string cmdStr = "Insert into hvk_pet_food (PET_FOOD_FREQUENCY, PET_FOOD_QUANTITY," +
                            "PR_PET_RES_NUMBER, FOOD_FOOD_NUMBER)" +
                            " values (" + frequency + "," + quantity + "," + petResNumber + "," + foodNumber + ")";

            return(HVK_SqlConnection.AddRow(cmdStr, ""));
        }