Beispiel #1
0
        private void dgvMembers_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            dgvProduct.DataSource = null;
            string inde = dgvMembers.CurrentRow.Cells[0].Value.ToString();

            //MessageBox.Show(index);
            mem.LoadDGVPackage(dgvPackage, inde);
            mem.loadDGVProduct(dgvProduct, inde);
            btEditMachine.Enabled = true;

            string    index = dgvMembers.CurrentRow.Cells[0].Value.ToString();
            DataTable dt    = new DataTable();

            dt = getmem.getMemberbyID(index);
            GetEditMember.FName    = dt.Rows[0][1].ToString();
            GetEditMember.LName    = dt.Rows[0][2].ToString();
            GetEditMember.Address  = dt.Rows[0][5].ToString();
            GetEditMember.Birthday = Convert.ToDateTime(dt.Rows[0][4].ToString());
            GetEditMember.IDCard   = dt.Rows[0][8].ToString();
            GetEditMember.Phone    = dt.Rows[0][7].ToString();
            GetEditMember.Gender   = dt.Rows[0][6].ToString();
            GetEditMember.IDMember = index;
            try
            {
                byte[] picPD;
                picPD = (byte[])dt.Rows[0][3];
                MemoryStream pic = new MemoryStream(picPD);
                GetEditMember.Picture = Image.FromStream(pic);
            }
            catch { }
        }
Beispiel #2
0
        private void dgvMembers_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            dgvProduct.DataSource = null;
            string index = dgvMembers.CurrentRow.Cells[0].Value.ToString();

            //MessageBox.Show(index);
            mem.LoadDGVPackage(dgvPackage, index);
            mem.loadDGVProduct(dgvProduct, index);
            mem.loadDGVPT(dgvPT, index);
            getID          = index;
            txtMember.Text = dgvMembers.CurrentRow.Cells[1].Value.ToString() + " " + dgvMembers.CurrentRow.Cells[2].Value.ToString();
        }