protected void show_pet(object sender, CommandEventArgs e) { this.U_pet1.Visible = true; SqlFuns sf = new SqlFuns(); this.U_pet1.pet = sf.SearchPetById(int.Parse(e.CommandName.ToString())); this.U_pet1.Visible = true; this.Button_update.Visible = true; this.Button_submit_pet.Visible = true; }
protected void DropDownList_pet_SelectedIndexChanged(object sender, EventArgs e) { SqlFuns sf = new SqlFuns(); Pet ptmp = sf.SearchPetById(int.Parse(DropDownList_pet.SelectedValue)); this.U_showpet1.petinfo = ptmp; this.U_showpet1.Visible = true; this.U_service1.Visible = true; this.Button_submit.Visible = true; IList <Services> pslist = sf.SearchServicesByPeid(ptmp.ID); if (pslist != null) { this.U_showmsg1.Visible = true; this.U_showmsg1.msgdata = pslist; DateTime ndt = pslist[0].Date.AddHours(sf.SearchOperationById(pslist[0].Operation).NextTime); } else { } }