Beispiel #1
0
        private void simpleButton_add_Click(object sender, EventArgs e)
        {
            SystemManageEditForm systemManageEditForm = new SystemManageEditForm();

            systemManageEditForm.ShowDialog();
            initData(formatWhere());
        }
Beispiel #2
0
        private void simpleButton_modify_Click(object sender, EventArgs e)
        {
            if (gridView.SelectedRowsCount != 1)
            {
                MessageBox.Show("请选择一条记录!", "警告");
                return;
            }
            //获取选中的行的行号
            int[]        rowNums = gridView.GetSelectedRows();
            DataTable    dt      = (DataTable)gridControl.DataSource;
            SystemManage sys     = new SystemManage();

            sys.Id       = Int32.Parse(dt.Rows[rowNums[0]][SystemManage.ID_COLUMN].ToString());
            sys.UserName = dt.Rows[rowNums[0]][SystemManage.USERNAME_COLUMN].ToString();
            sys.Password = dt.Rows[rowNums[0]][SystemManage.PASSWORD_COLUMN].ToString();
            sys.Type     = Int32.Parse(dt.Rows[rowNums[0]][SystemManage.TYPE_COLUMN].ToString());
            sys.TypeName = dt.Rows[rowNums[0]][SystemManage.TYPENAME_COLUMN].ToString();
            sys.Name     = dt.Rows[rowNums[0]][SystemManage.NAME_COLUMN].ToString();
            sys.IdCard   = dt.Rows[rowNums[0]][SystemManage.IDCARD_COLUMN].ToString();

            SystemManageEditForm systemManageEditForm = new SystemManageEditForm(sys);

            systemManageEditForm.ShowDialog();
            pageUpControl.GetDataTable();
        }
Beispiel #3
0
 private void simpleButton_add_Click(object sender, EventArgs e)
 {
     SystemManageEditForm systemManageEditForm = new SystemManageEditForm();
     systemManageEditForm.ShowDialog();
     initData(formatWhere());
 }
Beispiel #4
0
        private void simpleButton_modify_Click(object sender, EventArgs e)
        {
            if (gridView.SelectedRowsCount != 1)
            {
                MessageBox.Show("请选择一条记录!","警告");
                return;
            }
            //获取选中的行的行号
            int[] rowNums = gridView.GetSelectedRows();
            DataTable dt = (DataTable)gridControl.DataSource;
            SystemManage sys = new SystemManage();
            sys.Id = Int32.Parse(dt.Rows[rowNums[0]][SystemManage.ID_COLUMN].ToString());
            sys.UserName = dt.Rows[rowNums[0]][SystemManage.USERNAME_COLUMN].ToString();
            sys.Password = dt.Rows[rowNums[0]][SystemManage.PASSWORD_COLUMN].ToString();
            sys.Type = Int32.Parse(dt.Rows[rowNums[0]][SystemManage.TYPE_COLUMN].ToString());
            sys.TypeName = dt.Rows[rowNums[0]][SystemManage.TYPENAME_COLUMN].ToString();
            sys.Name = dt.Rows[rowNums[0]][SystemManage.NAME_COLUMN].ToString();
            sys.IdCard = dt.Rows[rowNums[0]][SystemManage.IDCARD_COLUMN].ToString();

            SystemManageEditForm systemManageEditForm = new SystemManageEditForm(sys);
            systemManageEditForm.ShowDialog();
            pageUpControl.GetDataTable();
        }