Ejemplo n.º 1
0
    protected void show_usr(object sender, CommandEventArgs e)
    {
        SqlFuns sf = new SqlFuns();

        bindpet(sf.SearchPetByUsrid(e.CommandName.ToString()));
        this.DropDownList_pet.Visible = true;
        DropDownList_pet_SelectedIndexChanged(sender, e);
    }
Ejemplo n.º 2
0
    protected void show_usr(object sender, CommandEventArgs e)
    {
        SqlFuns sf = new SqlFuns();

        bindpet(sf.SearchPetByUsrid(e.CommandName.ToString()));
        this.U_usr1.user               = sf.SearchUserById(e.CommandName.ToString());
        this.U_usr1.Visible            = true;
        this.U_usr2.Visible            = false;
        this.U_pet1.Visible            = false;
        this.U_pet1.Visible            = false;
        this.Repeater_petlist.Visible  = true;
        this.Button_newpet.Visible     = true;
        this.Button_update.Visible     = true;
        this.Button_submit_pet.Visible = false;
        this.Button_insert.Visible     = false;
    }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["login"] == null)
         {
             Response.Write("<script language='javascript'>alert('Response Timeout, Please Try Again.'); location.href='login.aspx'</script>");
         }
         else
         {
             SqlFuns     sf   = new SqlFuns();
             IList <Pet> pets = sf.SearchPetByUsrid(Session["login"].ToString());
             bindpet(pets);
             DropDownList_pet_SelectedIndexChanged(sender, e);
         }
     }
 }
Ejemplo n.º 4
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 = "";
        }
    }