Beispiel #1
0
        private void editAccountToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (var db = new AkunModel())
            {
                var query = from akun in db.Akun where akun.Username == lblUsername.Text select akun;
                foreach (var item in query)
                {
                    DaftarAkunForm daftarAkunForm = new DaftarAkunForm(item.Username, item.Umur, item.Password, item.Gender);
                    daftarAkunForm.ShowDialog();

                    lblUsername.Text = daftarAkunForm.tbNama.Text;
                    lblUmur.Text     = daftarAkunForm.tbUmur.Text + " tahun";
                    if (daftarAkunForm.rbLaki.Checked)
                    {
                        lblGender.Text = "Laki-laki";
                    }
                    else
                    {
                        lblGender.Text = "Perempuan";
                    }
                    btnCekKondisi.Enabled = true;
                }
            }
        }
Beispiel #2
0
        private void lblDaftar_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            DaftarAkunForm daftarAkunForm = new DaftarAkunForm();

            daftarAkunForm.ShowDialog();
        }