示例#1
0
        private void View_toolStrip_Click(object sender, EventArgs e)
        {
            Dictionary <string, ObjItem> drX = this.dataGView2.getRowData();
            Dictionary <string, ObjItem> drZ = this.dataGView1.getRowData();

            if (drX == null)
            {
                WJs.alert("请选择需要修改的设备使用信息!");
                return;
            }
            if (drX != null)
            {
                EQUseManagEdit form = new EQUseManagEdit(drZ, drX, 0);
                form.ShowDialog();
            }
        }
示例#2
0
        private void Add_toolStrip_Click(object sender, EventArgs e)
        {
            Dictionary <string, ObjItem> drZ = this.dataGView1.getRowData();

            if (drZ == null)
            {
                WJs.alert("请在信息表中选择需要增加使用信息的设备ID!");
                dataGView1.Focus();
                return;
            }
            if (drZ["状态"].ToString() == "2")
            {
                EQUseManagEdit form = new EQUseManagEdit(drZ, null, 2);
                form.ShowDialog();
                if (selTextInpt1.Text != "" || selTextInpt1.Value != "")
                {
                    refresh_toolStrip_Click(null, null);
                }
            }
            else
            {
                WJs.alert("只能对已启用的卡片设备添加使用信息!");
            }
        }
示例#3
0
        private void Edit_toolStrip_Click(object sender, EventArgs e)
        {
            Dictionary <string, ObjItem> drX = this.dataGView2.getRowData();
            Dictionary <string, ObjItem> drZ = this.dataGView1.getRowData();

            if (drX == null)
            {
                WJs.alert("请选择需要修改的设备使用信息!");
                return;
            }
            if (drX != null)
            {
                if (drX["状态"].ToString() == "1")
                {
                    EQUseManagEdit form = new EQUseManagEdit(drZ, drX, 1);
                    form.ShowDialog();
                    refresh_toolStrip_Click(null, null);
                }
                else
                {
                    WJs.alert("无效的设备使用信息不能再进行修改!");
                }
            }
        }