示例#1
0
        private void dgvJewel_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                return;
            }

            var value = dgvJewel[e.ColumnIndex, e.RowIndex].Value.ToString();

            if (value == "Details")
            {
                var transactionId = (int)dgvJewel[e.ColumnIndex, e.RowIndex].Tag;
                var item          = _transactionServices.GetJewelTransactionsById(transactionId);
                var detail        = new frmItemDetail();
                detail.BindForm(item.Properties.ItemDetails);
                detail.Show();
            }
        }
示例#2
0
        void JewelItemClick(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Left)
            {
                return;
            }

            var panel = sender as Panel;

            if (panel == null)
            {
                return;
            }

            var item = PurchaseTransactionItems.SingleOrDefault(x => x.JewelTransactionRowId == (Guid)panel.Tag);

            if (item != null)
            {
                var frm = new frmItemDetail();
                frm.BindForm(item.Properties.ItemDetails);
                frm.Show();
            }
        }