private void BindInstructor()
        {
            int instructorId = Request.QueryString["InstructorId"].ToInt();

            if (instructorId > 0)
            {
                Instructor instructorLookup = InstructorDAL.GetItem(instructorId);

                if (instructorLookup != null)
                {
                    lblInstructorId.Text = instructorLookup.InstructorId.ToString();
                    lblPersonId.Text     = instructorLookup.PersonId.ToString();
                    lblEntityTypeId.Text = instructorLookup.EntityTypeId.ToString();
                    lblHireDate.Text     = instructorLookup.HireDate.ToShortDateString();
                    lblTermDate.Text     = instructorLookup.TermDate.ToShortDateString();
                    lblCreateDate.Text   = instructorLookup.CreateDate.ToShortDateString();
                }
                else
                {
                    lblMessage.Text = "Instructor could not be found.";
                }
            }
            else
            {
                lblMessage.Text = "Invalid Id. Instructor record could not be found.";
            }
        }
Ejemplo n.º 2
0
 public static Instructor GetItem(int instructorId)
 {
     return(InstructorDAL.GetItem(instructorId));
 }