예제 #1
0
    protected void DropDownList_pet_SelectedIndexChanged(object sender, EventArgs e)
    {
        SqlFuns     sf   = new SqlFuns();
        IList <Pet> pets = sf.SearchPetByUsrid(Session["login"].ToString());

        this.U_showpet1.petinfo = pets[DropDownList_pet.SelectedIndex];
        IList <Services> pslist = sf.SearchServicesByPeid(pets[DropDownList_pet.SelectedIndex].ID);

        if (pslist != null)
        {
            this.U_showmsg1.msgdata = pslist;
            DateTime ndt = pslist[0].Date.AddHours(sf.SearchOperationById(pslist[0].Operation).NextTime);
            this.Label_lasttime.Text = ndt.ToString();
        }
        else
        {
            this.Label_lasttime.Text = "";
        }
    }
예제 #2
0
    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
        {
        }
    }