コード例 #1
0
        private void ItemType_GridView_FocusedRowChanged(object sender, FocusedRowChangedEventArgs e)
        {
            Items_GridView.ClearColumnsFilter();
            ItemType selectedRow = ItemType_GridView.GetFocusedRow().CastTo <ItemType>();

            if (selectedRow == null)
            {
                return;
            }

            // filter grid
            Items_GridView.ActiveFilterString = $"[ItemTypeID] = '{selectedRow.ItemTypeID}'";
            Items_GridView.FocusedRowHandle   = 0;
        }
コード例 #2
0
        private void Items_Add_Button_Click(object sender, EventArgs e)
        {
            string itemTypeID = ItemType_GridView.GetFocusedRow().CastTo <ItemType>().ItemTypeID;

            if (string.IsNullOrWhiteSpace(itemTypeID))
            {
                MessageBoxHelper.ShowErrorMessage(BSMessage.BSM000009);
                return;
            }

            ItemsData.Add(new Items
            {
                ItemTypeID = itemTypeID,
                Status     = ModifyMode.Insert
            });
        }