Exemplo n.º 1
0
        private void pnlChart_MouseClick(object sender, MouseEventArgs e)
        {
            int i     = e.Y < top[1] ? 0 : 1;
            int shelf = currentPage * 2 + i - 1;

            int column = 83 - (e.X - left) / cellWidth;
            int row    = rows - (e.Y - top[i]) / cellHeight + 1;

            if (column <= columns && row <= rows)
            {
                DataRow[] cellRows = cellTable.Select(string.Format("SHELF_CODE='{0}' AND CELL_COLUMN='{1}' AND CELL_ROW='{2}'", ShelfCode[shelf], column, row));
                if (cellRows.Length != 0)
                {
                    Dictionary <string, Dictionary <string, object> > properties = new Dictionary <string, Dictionary <string, object> >();
                    Dictionary <string, object> property = new Dictionary <string, object>();
                    property.Add("产品名称", cellRows[0]["PRODUCT_NAME"]);
                    property.Add("重量", cellRows[0]["REAL_WEIGHT"]);
                    property.Add("条码", cellRows[0]["PRODUCT_BARCODE"]);
                    property.Add("托盘", cellRows[0]["PALLET_CODE"]);

                    property.Add("单据号", cellRows[0]["BILL_NO"]);
                    property.Add("入库时间", cellRows[0]["IN_DATE"]);
                    properties.Add("产品信息", property);

                    property = new Dictionary <string, object>();
                    property.Add("库区名称", cellRows[0]["AREA_NAME"]);
                    property.Add("货架名称", cellRows[0]["SHELF_NAME"]);
                    property.Add("列", column);
                    property.Add("层", row);
                    property.Add("状态", cellRows[0]["IS_LOCK"].ToString() == "0" ? "正常" : "锁定");
                    properties.Add("货位信息", property);

                    CellDialog cellDialog = new CellDialog(properties);
                    cellDialog.ShowDialog();
                }
            }
        }
Exemplo n.º 2
0
        private void pnlChart_MouseClick(object sender, MouseEventArgs e)
        {
            int i = e.Y < top[1] ? 0 : 1;
            int shelf = currentPage * 2 + i- 1;

            int column = 83 - (e.X - left) / cellWidth;
            int row = rows - (e.Y - top[i]) / cellHeight + 1;

            if (column <= columns && row <= rows)
            {
                DataRow[] cellRows = cellTable.Select(string.Format("SHELF_CODE='{0}' AND CELL_COLUMN='{1}' AND CELL_ROW='{2}'", ShelfCode[shelf], column, row));
                if (cellRows.Length != 0)
                {
                    Dictionary<string, Dictionary<string, object>> properties = new Dictionary<string, Dictionary<string, object>>();
                    Dictionary<string, object> property = new Dictionary<string, object>();
                    property.Add("��Ʒ����", cellRows[0]["PRODUCT_NAME"]);
                    property.Add("����", cellRows[0]["REAL_WEIGHT"]);
                    property.Add("����", cellRows[0]["PRODUCT_BARCODE"]);
                    property.Add("����", cellRows[0]["PALLET_CODE"]);

                    property.Add("���ݺ�", cellRows[0]["BILL_NO"]);
                    property.Add("���ʱ��", cellRows[0]["IN_DATE"]);
                    properties.Add("��Ʒ��Ϣ", property);

                    property = new Dictionary<string, object>();
                    property.Add("��������", cellRows[0]["AREA_NAME"]);
                    property.Add("��������", cellRows[0]["SHELF_NAME"]);
                    property.Add("��", column);
                    property.Add("��", row);
                    property.Add("״̬", cellRows[0]["IS_LOCK"].ToString() == "0" ? "����" : "����");
                    properties.Add("��λ��Ϣ", property);

                    CellDialog cellDialog = new CellDialog(properties);
                    cellDialog.ShowDialog();
                }
            }
        }