private void _Load(int ID) { try { StudenAccess acs = new StudenAccess(); student std = acs.getStudent(ID); txtID.Text = std.C01_id.ToString().Trim(); txtFirstName.Text = std.C02_firtsname.ToString().Trim(); txtLastName.Text = std.C03_lastname.ToString().Trim(); timeBirthday.Text = std.C04_birthday.ToString().Trim(); if (std.C05_gender == true) { radMale.Checked = true; } else { radFemale.Checked = true; } txtPhone.Text = std.C06_phonenumber.ToString().Trim(); txtAddress.Text = std.C07_address.ToString().Trim(); picAvatar.Image = AllUser.BinaryToImage(std.C08_avatar.ToArray()); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK); } }
private void _Load() { txt_id.Text = std.C01_ID.ToString(); txt_firstname.Text = std.C02_FirstName; txt_lastname.Text = std.C03_LastName; date_birthday.Value = std.C04_Birthday; rad_male.Checked = std.C05_Male; rad_female.Checked = !std.C05_Male; txt_phone.Text = std.C06_Phone; txt_address.Text = std.C07_Address; btn_avatar.BackgroundImage = AllUser.BinaryToImage(std.C08_Avatar); }