Exemplo n.º 1
0
        private void skinButton2_Click(object sender, EventArgs e)
        {
            var edit = new DictEdit();

            if (edit.ShowDialog() == DialogResult.OK)
            {
                Thread.Sleep(300);
                cmd.ShowOpaqueLayer();
                SearchData(true, 1, pageControl1.PageSize);
                MessageBoxUtils.Hint("保存成功!", MainForm);
            }
        }
Exemplo n.º 2
0
        private void btnUp_Click(object sender, EventArgs e)
        {
            var selectedRow = gridView1.GetFocusedRow() as DictEntity;

            if (selectedRow == null)
            {
                return;
            }
            var edit = new DictEdit();

            edit.dict = selectedRow;
            edit.Text = "字典修改";
            if (edit.ShowDialog() == DialogResult.OK)
            {
                Thread.Sleep(300);
                cmd.ShowOpaqueLayer();
                SearchData(true, pageControl1.CurrentPage, pageControl1.PageSize);
                MessageBoxUtils.Hint("修改成功!", MainForm);
            }
        }
Exemplo n.º 3
0
 private void gridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
 {
     if (e.Column.Caption != "操作")
     {
         var selectedRow = gridView1.GetFocusedRow() as DictEntity;
         if (selectedRow == null)
         {
             return;
         }
         var edit = new DictEdit();
         edit.dict = selectedRow;
         edit.Text = "字典修改";
         if (edit.ShowDialog() == DialogResult.OK)
         {
             Thread.Sleep(300);
             cmd.ShowOpaqueLayer();
             SearchData(true, pageControl1.CurrentPage, pageControl1.PageSize);
             MessageBoxUtils.Hint("修改成功!", MainForm);
         }
     }
 }
Exemplo n.º 4
0
        private void repositoryItemButtonEdit1_Click(object sender, EventArgs e)
        {
            var selectedRow = gridView1.GetFocusedRow() as DictEntity;

            if (selectedRow == null)
            {
                return;
            }
            var        edit = new DictEdit();
            DictEntity dict = new DictEntity();

            dict.type        = selectedRow.type;
            dict.description = selectedRow.description;
            dict.sort        = selectedRow.sort;
            edit.dict        = dict;
            if (edit.ShowDialog() == DialogResult.OK)
            {
                Thread.Sleep(300);
                cmd.ShowOpaqueLayer();
                SearchData(pageControl1.CurrentPage, pageControl1.PageSize);
                MessageBoxUtils.Hint("添加成功!", MainForm);
            }
        }