Exemplo n.º 1
0
        public void ApptListView()
        {
            CusName = cusNameInput.Text;
            ApptList appt = new ApptList(ApptID, PetID, PetName, CusName, ApptDateTime, ApptTable);

            try
            {
                ConnectionClass.GetApptList(appt);
                ApptListTable.DataSource = appt.ApptTable;
                ApptListTable.DataBind();
            }

            catch
            {
                ClientScript.RegisterStartupScript(GetType(), "message", "<script>alert(' Can't find any appointment for the customer! ');</script>");
            }
            finally
            {
            }
        }
Exemplo n.º 2
0
        protected void OnPagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e)
        {
            (ApptListTable.FindControl("DataPager1") as DataPager).SetPageProperties(e.StartRowIndex, e.MaximumRows, false);

            if (hdnText.Value != "")
            {
                string yourValue = hdnText.Value.ToString();
                if (yourValue == "Default")
                {
                    ApptListView();
                }
                else
                {
                    this.ApptListView();
                }
            }
            //else
            //{
            this.ApptListView();
            //}
        }