示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            requestID = Request.QueryString.ToString();
            interID   = Int32.Parse(requestID);

            if (!IsPostBack)
            {
                var db = new AccessDB();
                db.QueryType   = CommandType.StoredProcedure;
                db.QueryString = "GetSpeciedData";
                var internObj = db.ReadDataToUpdate(interID);

                first_name.Text           = internObj.FirstName;
                last_name.Text            = internObj.LastName;
                contact_number.Text       = internObj.ContactNumber;
                email_address.Text        = internObj.Email;
                Role.SelectedIndex        = internObj.Role;
                PrimaryCheckBox.Checked   = internObj.IsPrimary;
                IsBusinesCheckBox.Checked = internObj.IsBusiness;
                DOB.SelectedDate          = DateTime.Parse(internObj.DateOfBirth);
            }
        }