Example #1
0
        //添加仓库事件
        private void barLargeButtonItem4_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            FormAddAndUpdateStorehouse frm = new FormAddAndUpdateStorehouse();

            frm.StartPosition       = FormStartPosition.CenterParent;
            frm.AddStorehouseEvent += frm_AddStorehouseEvent;
            frm.ShowDialog();
        }
Example #2
0
        private void gridView1_DoubleClick(object sender, EventArgs e)
        {
            if (gridView1.FocusedRowHandle < 0)
            {
                return;
            }

            try
            {
                if (_info.InRowCell)
                {
                    FormAddAndUpdateStorehouse frm = new FormAddAndUpdateStorehouse();
                    int selectRow = gridView1.GetSelectedRows()[0];                                                 //获得选中的第一行的下标
                    var id        = Convert.ToInt32(gridView1.GetRowCellValue(selectRow, gridView1.Columns["Id"])); //根据下标选择列值
                    frm.Tag           = id; frm.UpdateEvent += frm_AddStorehouseEvent;
                    frm.StartPosition = FormStartPosition.CenterParent;
                    frm.ShowDialog();
                }
            }
            catch (Exception exception)
            {
                ErrorHandler.OnError(exception);
            }
        }