Exemplo n.º 1
0
        void insertMedical()
        {
            string  name    = txtName.Text;
            Medical medical = new Medical(name);

            dbController.insertMedical(medical);
        }
 public bool insertMedical(Medical medical)
 {
     if (medicalMapper.insertMedical(medical))
     {
         OnInsertEntity(new EntityArgs(medical));
         return(true);
     }
     return(false);
 }
Exemplo n.º 3
0
        void updateMedical()
        {
            medical = new Medical()
            {
                Name = txtName.Text,
            };

            dbController.updateMedical(origMedical, medical);
        }
 public bool insertMedicalTransaction(Invoice transaction, Medical medical, int qty, decimal subtotal)
 {
     if (medicalTransactionMapper.insertMedicalTransaction(transaction, medical, qty, subtotal))
     {
         OnInsertEntity(new EntityArgs(transaction));
         return(true);
     }
     return(false);
 }
 public bool updateMedical(Medical oldMedical, Medical newMedical)
 {
     if (medicalMapper.updateMedical(oldMedical, newMedical))
     {
         OnUpdateEntity(new EntityArgs(newMedical));
         return(true);
     }
     return(false);
 }
Exemplo n.º 6
0
        public bool updateMedical(Medical oldMedical, Medical newMedical)
        {
            if (oldMedical.Name == newMedical.Name)
                return false;

            string condition = string.Format(" medical_name = '{0}'", oldMedical.Name);
            string medical_name = string.Format(" medical_name = '{0}'", newMedical.Name);
            return update(
                updateSet(condition, medical_name)
                );

        }
Exemplo n.º 7
0
        public bool updateMedical(Medical oldMedical, Medical newMedical)
        {
            if (oldMedical.Name == newMedical.Name)
            {
                return(false);
            }

            string condition    = string.Format(" medical_name = '{0}'", oldMedical.Name);
            string medical_name = string.Format(" medical_name = '{0}'", newMedical.Name);

            return(update(
                       updateSet(condition, medical_name)
                       ));
        }
Exemplo n.º 8
0
 void mappedServiceToFields(Service service)
 {
     if (service is GPP)
     {
         origGPP       = service as GPP;
         origGrooming  = dbController.groomingMapper.getGroomingFromId(origGPP.grooming_id);
         txtName.Text  = origGrooming.Name;
         txtPrice.Text = origGPP.price.ToString();
         cbSize.Text   = origGPP.petsize.ToString();
     }
     else if (service is Medical)
     {
         origMedical       = service as Medical;
         txtName.Text      = origMedical.Name;
         rbMedical.Checked = true;
         txtPrice.Clear();
     }
 }
 public bool insertMedicalTransaction(Invoice transaction, Medical medical, int qty, decimal subtotal)
 {
     if (medicalTransactionMapper.insertMedicalTransaction(transaction, medical, qty, subtotal))
     {
         OnInsertEntity(new EntityArgs(transaction));
         return true;
     }
     return false;
 }
Exemplo n.º 10
0
 void mappedServiceToFields(Service service)
 {
     if (service is GPP)
     {
         origGPP = service as GPP;
         origGrooming = dbController.groomingMapper.getGroomingFromId(origGPP.grooming_id);
         txtName.Text = origGrooming.Name;
         txtPrice.Text = origGPP.price.ToString();
         cbSize.Text = origGPP.petsize.ToString();
     }
     else if (service is Medical)
     {
         origMedical = service as Medical;
         txtName.Text = origMedical.Name;
         rbMedical.Checked = true;
         txtPrice.Clear();
     }
 }
Exemplo n.º 11
0
 void insertMedical()
 {
     string name = txtName.Text;
     Medical medical = new Medical(name);
     dbController.insertMedical(medical);
 }
Exemplo n.º 12
0
        void updateMedical()
        {
            medical = new Medical()
            {
                Name = txtName.Text,
            };

            dbController.updateMedical(origMedical, medical);
        }
 public bool insertMedical(Medical medical)
 {
     if(medicalMapper.insertMedical(medical)){
         OnInsertEntity(new EntityArgs(medical));
         return true;
     }
     return false;
 }
 public bool insertMedicalTransaction(Invoice transaction, Medical medical, int qty, decimal subtotal)
 {
     return create(
         insertValues(medical.Id, qty, subtotal, transaction.InvoiceId)
         );
 }
Exemplo n.º 15
0
 public bool insertMedical(Medical medical)
 {
     return(create(insertValues("null", medical.Name)));
 }
Exemplo n.º 16
0
 public bool insertMedical(Medical medical)
 {
     return create(insertValues("null", medical.Name));
 }
 public bool insertMedicalTransaction(Invoice transaction, Medical medical, int qty, decimal subtotal)
 {
     return(create(
                insertValues(medical.Id, qty, subtotal, transaction.InvoiceId)
                ));
 }
Exemplo n.º 18
0
        Medical getMedical()
        {
            Medical medical = dbController.medicalMapper.getMedicalFromName(cbService.Text);

            return(medical);
        }
 public bool updateMedical(Medical oldMedical, Medical newMedical)
 {
     if (medicalMapper.updateMedical(oldMedical, newMedical))
     {
         OnUpdateEntity(new EntityArgs(newMedical));
         return true;
     }
     return false;
 }