示例#1
0
        /// <summary>
        /// 编辑列表数据
        /// </summary>
        private void EditData()
        {
            string        ID     = this.winGridViewPager1.gridView1.GetFocusedRowCellDisplayText("设备id");
            List <string> IDList = new List <string>();

            for (int i = 0; i < this.winGridViewPager1.gridView1.RowCount; i++)
            {
                string strTemp = this.winGridViewPager1.GridView1.GetRowCellDisplayText(i, "设备id");
                IDList.Add(strTemp);
            }

            if (!string.IsNullOrEmpty(ID))
            {
                FrmEdit设备表 dlg = new FrmEdit设备表();
                dlg.ID           = ID;
                dlg.IDList       = IDList;
                dlg.OnDataSaved += new EventHandler(dlg_OnDataSaved);
                dlg.InitFunction(LoginUserInfo, FunctionDict);//给子窗体赋值用户权限信息

                if (DialogResult.OK == dlg.ShowDialog())
                {
                    BindData();
                }
            }
        }
示例#2
0
        /// <summary>
        /// 添加数据
        /// </summary>
        private void AddData()
        {
            FrmEdit设备表 dlg = new FrmEdit设备表();

            dlg.OnDataSaved += new EventHandler(dlg_OnDataSaved);
            dlg.InitFunction(LoginUserInfo, FunctionDict);//给子窗体赋值用户权限信息

            if (DialogResult.OK == dlg.ShowDialog())
            {
                BindData();
            }
        }