Exemple #1
0
        private void dbind()
        {
            koneksikuDataContext dbku     = new koneksikuDataContext();
            msmember             msm      = new msmember();
            DataGridView         datagrid = new DataGridView();
            BindingSource        bs       = new BindingSource();

            var ambil = (from s in dbku.msmembers select s).ToList();

            datagrid.ColumnCount         = 6;
            datagrid.AutoGenerateColumns = false;
            DataTable dt = new DataTable();

            this.dgrid.DataSource = ambil;
        }
Exemple #2
0
        private void btnupdate_Click(object sender, EventArgs e)
        {
            int      meid    = Convert.ToInt32(txtmemid.Text);
            msmember msm     = new msmember();
            var      member  = (from u in dbku.msmembers where u.memberid == meid select u).First();
            var      member1 = (from s in dbku.msmembers where s.memberid == meid select s).First();

            //member.memberid = meid;
            member.name      = txtname.Text;
            member.handphone = txthp.Text;
            member.email     = txtemail.Text;
            MessageBox.Show("Data Member berhasil Di update");
            dgrid.Update();
            dgrid.Refresh();
        }
Exemple #3
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridViewRow    row1 = this.dgrid.Rows[e.RowIndex];
            DataGridViewColumn col1 = this.dgrid.Columns[e.ColumnIndex];

            if (e.RowIndex > 0)
            {
                msmember           msm = new msmember();
                DataGridViewRow    row = this.dgrid.Rows[e.RowIndex];
                DataGridViewColumn col = this.dgrid.Columns[e.ColumnIndex];

                txtmemid.Text        = dgrid[0, e.RowIndex].Value.ToString();
                txtemail.Text        = dgrid[2, e.RowIndex].Value.ToString();
                txtname.Text         = row.Cells["cname"].Value.ToString();
                txtpass.Text         = row.Cells["cpassword"].Value.ToString();
                txthp.Text           = row.Cells["chp"].Value.ToString();
                dateTimePicker1.Text = row.Cells["cjdate"].Value.ToString();
                dbind();
            }
        }
 partial void Deletemsmember(msmember instance);
 partial void Updatemsmember(msmember instance);
 partial void Insertmsmember(msmember instance);