protected void btn_search_Click( object sender, EventArgs e )
 {
     //defaultStatus();
     string input = this.txtbox_search.Text.ToString();
     BusinessTier.Admin admin = new BusinessTier.Admin();
     Data.DataBase.caretakersDataTable table = new Data.DataBase.caretakersDataTable();
     if ( input.Length > 0 )
     {
         table = admin.SearchCareTakerByID(input);
         if ( table.Rows.Count > 0 )
         {
             this.gv_caretakerview.DataSource = table;
             this.gv_caretakerview.DataBind();
         }
         else
         {
             this.lbl_searchwarning.Text = "Invalid ID, Please confirm the IDs before search...";
             this.lbl_searchwarning.BackColor = System.Drawing.Color.Red;
         }
     }
     else
     {
         table = admin.SelectAllCareTakers();
         this.gv_caretakerview.DataSource = table;
         this.gv_caretakerview.DataBind();
     }
 }
        protected void btn_addcare_Click( object sender, EventArgs e )
        {
            //defaultStatus();
            string cid = this.txtbox_careID.Text;
            string name = txtbox_name.Text;
            string gender = txtbox_gender.Text;
            string contactno = txtbox_contactno.Text;
            int age = int.Parse(this.txtbox_age.Text);

            if ( cid.Length > 0 && name.Length > 0 && gender.Length > 0 && contactno.Length > 0 && age.ToString().Length > 0 )
            {
                BusinessTier.Admin admin = new BusinessTier.Admin();
                Data.DataBase.caretakersDataTable table = new Data.DataBase.caretakersDataTable();
                table = admin.SearchCareTakerByID(cid);
                if ( table.Rows.Count > 0 )
                {
                    this.lbl_idwarning.Text = "This ID is already exsit";
                    this.lbl_idwarning.BackColor = System.Drawing.Color.Red;
                }
                else
                {
                    admin.AddCareTaker(cid, name, gender, contactno, age);
                    this.gv_caretakerview.DataSource = admin.SelectAllCareTakers();
                    this.gv_caretakerview.DataBind();
                }
            }
            else
            {
                errorWarning();
            }
        }