protected void btnSearchName_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(tbEmployeeName.Text))
     {
         Miami.Substitute.Bll.Substitute substitute = new Miami.Substitute.Bll.Substitute();
         DataView dv = substitute.SearchSubstitute(tbEmployeeName.Text);
         SubstituteList.Visible    = true;
         SubstituteList.DataSource = dv;
         SubstituteList.DataBind();
     }
 }
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            Miami.Substitute.Bll.Substitute substitute = new Miami.Substitute.Bll.Substitute();
            int id;

            int.TryParse(tbEmployeeId.Text, out id);
            DataView dv = substitute.SearchSubstitute(id);

            SubstituteList.Visible    = true;
            SubstituteList.DataSource = dv;
            SubstituteList.DataBind();
        }
Esempio n. 3
0
        protected void JobDataSource_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
        {
            Job job = new Job();

            lblJobId.Text          = e.ReturnValue.ToString();
            JobFormView.DataSource = job.LoadByPrimaryKey(Convert.ToInt32(e.ReturnValue)).DataView;
            JobFormView.DataBind();

            lblAvailSubs.Visible   = true;
            SubstituteList.Visible = true;
            SubstituteList.DataBind();
        }