示例#1
0
        //删除
        private void tsBtnDel_Click(object sender, EventArgs e)
        {
            txtOperateModule.Focus();
            gridView1.UpdateCurrentRow();

            DialogResult dr = MessageBox.Show("确定要删除所选择的记录吗", this.Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Information);

            if (dr == DialogResult.OK)
            {
                List <string> lst = new List <string>();

                if (gridView1.RowCount > 0)
                {
                    //int intRow = gridView1.GetSelectedRows()[0];
                    for (int i = 0; i < gridView1.RowCount; i++)
                    {
                        if (gridView1.GetRowCellValue(i, gridCheckBox).ToString() == "True")
                        {
                            lst.Add(gridView1.GetRowCellValue(i, gridGuid).ToString());
                        }
                    }
                }

                SystemLogManage SystemLogManage = new SystemLogManage();
                SystemLogManage.DeleteSyslog(lst);

                LoadData();
            }
        }
示例#2
0
        private void LoadData()
        {
            SystemLogManage SystemLogManage = new SystemLogManage();
            DataTable       dtl             = SystemLogManage.GetSystemLogInfo(GetSQL());

            gridControl1.DataSource = dtl;
        }