Пример #1
0
        async private void 修改ToolStripButton1_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 1)
            {
                switch (lastTable)
                {
                case "台账报表":
                    FormInsertUpdateTools UT = new FormInsertUpdateTools();
                    UT.isUpdateTool = true;
                    UT.updateTool   = Global.ToolsList.list.Find(t => t.tool_id == dataGridView1.SelectedRows[0].Cells[0].Value as string);
                    UT.ShowDialog();
                    listViewLeft_DoubleClick(null, null);
                    break;

                case "综合管理":
                    break;

                case "预送检表":
                    break;

                case "预报废表":
                    break;

                case "定期检查":
                    break;

                case "送检反馈":
                    break;

                case "逾期记录":
                    break;

                case "增购申请":
                    FormInsertUpdateBuy buy = new FormInsertUpdateBuy();
                    buy.isUpdate    = true;
                    buy.BuyListItem = Global.BuyList.Find(t => t.buyplan_id == dataGridView1.SelectedRows[0].Cells[0].Value as string);
                    buy.ShowDialog();
                    await BuyList();

                    break;
                }
            }
            else
            {
                MessageBox.Show("请选择您要修改的数据");
            }
        }
Пример #2
0
        async private void 添加ToolStripButton1_Click(object sender, EventArgs e)
        {
            switch (lastTable)
            {
            case "台账报表":
                FormInsertUpdateTools UT = new FormInsertUpdateTools();                             //增加
                UT.ShowDialog();
                listViewLeft_DoubleClick(null, null);
                await TableToolsList(page);

                break;

            case "综合管理":
                break;

            case "预送检表":
                break;

            case "预报废表":
                break;

            case "定期检查":
                break;

            case "送检反馈":
                break;

            case "逾期记录":
                break;

            case "增购申请":
                FormInsertUpdateBuy buy = new FormInsertUpdateBuy();
                buy.ShowDialog();
                await BuyList();

                break;
            }
        }