private void load_breeds(int speciesId) { try { ListsManager lm = new ListsManager(); List<Breed> lstBreeds = lm.GetBreedList(speciesId, mCustomer); if (lstBreeds != null) { ddlBreed.DataSource = lstBreeds; ddlBreed.DataBind(); ddlBreed.Items.Insert(0, new ListItem("Select Breed", "0")); } else { displayError("loading breed list", "", true); } } catch (Exception ex) { displayError("loading breed list", ex.ToString(), true); } }
//private void ToggleSpecies(bool isDog) //{ // if (isDog) // { // //btnDog.CssClass= "btn btn-lg btn-pf-primary pet_species active"; // //btnCat.CssClass ="btn btn-lg btn-pf-primary pet_species"; // } // else // { // //btnDog.CssClass = "btn btn-lg btn-pf-primary pet_species"; // //btnCat.CssClass = "btn btn-lg btn-pf-primary pet_species active"; // } //} //kp:2015-06-29 //private void ToggleGender(bool isMale) //{ // if (isMale) // { // //html input not maintaining its active status after post back // //lblMale.Attributes.Add("class", "btn btn-sm btn-pf-secondary active"); // //lblFemale.Attributes.Add("class", "btn btn-sm btn-pf-secondary"); // //btnMale.Checked = true; // //btnFemale.Checked = false; // btnMale.CssClass = "btn btn-sm btn-pf-secondary active"; // btnFemale.CssClass = "btn btn-sm btn-pf-secondary"; // } // else // { // //lblMale.Attributes.Add("class","btn btn-sm btn-pf-secondary"); // //lblFemale.Attributes.Add("class", "btn btn-sm btn-pf-secondary active"); // //btnMale.Checked = false; // //btnFemale.Checked = true; // btnMale.CssClass = "btn btn-sm btn-pf-secondary"; // btnFemale.CssClass = "btn btn-sm btn-pf-secondary active"; // } //} //private void ToggleSpayed(bool isSpayed) //{ // if (isSpayed) // { // btnYes.CssClass = "btn btn-sm btn-pf-secondary active"; // btnNo.CssClass = "btn btn-sm btn-pf-secondary"; // //lblYes.Attributes.Add("class","btn btn-sm btn-pf-secondary active"); // //lblNo.Attributes.Add("class", "btn btn-sm btn-pf-secondary"); // //btnYes.Checked = true; // //btnNo.Checked = false; // } // else // { // btnYes.CssClass = "btn btn-sm btn-pf-secondary"; // btnNo.CssClass = "btn btn-sm btn-pf-secondary active"; // //lblYes.Attributes.Add("class", "btn btn-sm btn-pf-secondary"); // //lblNo.Attributes.Add("class", "btn btn-sm btn-pf-secondary active"); // //btnNo.Checked = true; // //btnYes.Checked = false; // } //} //private void loadColorList() //{ // //load color from service // try // { // ListsManager lm = new ListsManager(); // PetColor [] lstColor =lm.GetColorList(mCustomer); // if (lstColor !=null)//check error // { // ddlColor.DataSource = lstColor; // ddlColor.DataBind(); // } // else // { // //this is already logged by the lists managmer // displayError("loading color list", "", false); // } // } // catch (Exception ex) // { // displayError("loading color list", ex.ToString(), true); // } //} //end 2015-06-29 private void load_breeds(int speciesId) { //load breed from service try { ///test exception logging and emailing //throw new Exception("test email server exception"); ListsManager lm = new ListsManager(); List<Breed> lstBreeds = lm.GetBreedList(speciesId, mCustomer); if (lstBreeds != null) { ddlBreed.DataSource = lstBreeds; ddlBreed.DataBind(); ddlBreed.Items.Insert(0, new ListItem("Select Breed", "0")); } else displayError("loading breed list", "", false); } catch (Exception ex) { displayError("loading breed list", ex.ToString(), true); } }