Пример #1
0
        GPP getGPP()
        {
            Grooming grooming = dbController.getGroomingFromName(cbService.Text);
            Petsize  size     = dbController.petsizeMapper.getPetsizeFromName(cbSize.Text);
            GPP      gpp      = dbController.getGPPFromGroomingSize(grooming, size);

            return(gpp);
        }
Пример #2
0
        void updateGPP(Grooming grooming)
        {
            GPP gpp = new GPP()
            {
                price = decimal.Parse(txtPrice.Text),
            };

            dbController.updateGPP(origGPP, gpp);
        }
 public bool updateGPP(GPP oldGpp, GPP newGpp)
 {
     if (gppMapper.updateGroomingPrice(oldGpp, newGpp))
     {
         OnUpdateEntity(new EntityArgs(oldGpp));
         return(true);
     }
     return(false);
 }
        public bool updateGroomingPrice(GPP oldGpp, GPP newGPP)
        {
            if (oldGpp.price == newGPP.price)
                return false;

            string condition = string.Format("id = {0}", oldGpp.Id);
            string price = string.Empty;
            price = string.Format("price = {0}", newGPP.price);

            return update(
                updateSet(condition, price)
                );

        }
        public bool updateGroomingPrice(GPP oldGpp, GPP newGPP)
        {
            if (oldGpp.price == newGPP.price)
            {
                return(false);
            }

            string condition = string.Format("id = {0}", oldGpp.Id);
            string price     = string.Empty;

            price = string.Format("price = {0}", newGPP.price);

            return(update(
                       updateSet(condition, price)
                       ));
        }
Пример #6
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();
     }
 }
Пример #7
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();
     }
 }
Пример #8
0
        void updateGPP(Grooming grooming)
        {
            GPP gpp = new GPP()
            {
                price = decimal.Parse(txtPrice.Text),
            };

            dbController.updateGPP(origGPP, gpp);
        }
 public bool updateGPP(GPP oldGpp, GPP newGpp)
 {
     if (gppMapper.updateGroomingPrice(oldGpp, newGpp))
     {
         OnUpdateEntity(new EntityArgs(oldGpp));
         return true;
     }
     return false;
 }