コード例 #1
0
ファイル: MainFrm.cs プロジェクト: wongdaniel/haisan
        private void toolStripMenuItem4_Click(object sender, EventArgs e)
        {
            string title = getTitleFromMenuItem(sender);

            logDao.saveLog(Parameter.user, title);

            TypeOfProcessFrm typeFrm = new TypeOfProcessFrm();

            typeFrm.MdiParent = this;
            typeFrm.Text      = title;
            typeFrm.Show();
        }
コード例 #2
0
ファイル: PurchaseOrderFrm.cs プロジェクト: wongdaniel/haisan
        private void dataGridViewItem_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (-1 == e.RowIndex)
            {
                return;
            }

            string columnName = dataGridViewItem.Columns[e.ColumnIndex].Name;

            if (columnName.Equals("ColumnCategoryStone"))
            {
                PlainFrm plainFrm = new PlainFrm(dataGridViewItem.Rows[e.RowIndex].Cells[e.ColumnIndex]);
                plainFrm.setTableName("tb_category_stone");
                plainFrm.Text = "石材名称";
                plainFrm.ShowDialog();
            }
            else if (columnName.Equals("ColumnProductName"))
            {
                PlainFrm plainFrm = new PlainFrm(dataGridViewItem.Rows[e.RowIndex].Cells[e.ColumnIndex]);
                plainFrm.setTableName("tb_product_name");
                plainFrm.Text = "产品名称";
                plainFrm.ShowDialog();
            }
            else if (-1 != columnName.IndexOf("ColumnDiagram"))
            {
                if (checkParameterZeroBeforeClickNameXOrDiagramX(dataGridViewItem.Rows[e.RowIndex]))
                {
                    Util.showInformation("请先初始化长、宽、厚、件数");
                    return;
                }

                BrowseImage broImage = new BrowseImage(dataGridViewItem.Rows[e.RowIndex].Cells[e.ColumnIndex]);
                broImage.Text = "浏览图片";
                broImage.ShowDialog();
            }
            else if (-1 != columnName.IndexOf("ColumnName"))
            {
                if (checkParameterZeroBeforeClickNameXOrDiagramX(dataGridViewItem.Rows[e.RowIndex]))
                {
                    Util.showInformation("请先初始化长、宽、厚、件数");
                    return;
                }

                TypeOfProcessFrm typeOfProcessFrm = new TypeOfProcessFrm(this, e.ColumnIndex, e.RowIndex);
                typeOfProcessFrm.Text = "加工类型";
                typeOfProcessFrm.ShowDialog();
            }
        }