コード例 #1
0
        public void toogleUpdate(Service service)
        {
            toggle();
            onUpdateMode = true;
            if (service is GPP)
                rbGrooming.Checked = true;
            else if (service is Medical)
                rbMedical.Checked = true;

            mappedServiceToFields(service);
        }
コード例 #2
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();
     }
 }