Ejemplo n.º 1
0
        private void toolStripButtonAlter_Click(object sender, EventArgs e)
        {
            var worksheet = this.reoGridControlProject.Worksheets[0];

            try
            {
                if (worksheet.SelectionRange.Rows != 1)
                {
                    throw new Exception();
                }
                int projectID             = int.Parse(worksheet[worksheet.SelectionRange.Row, 0].ToString());
                var formBaseProjectModify = new FormBaseProjectModify(projectID);
                formBaseProjectModify.SetModifyFinishedCallback((addedID) =>
                {
                    this.pagerWidget.Search(false, addedID);
                });
                //formBaseProjectModify.SetModifyFinishedCallback(this.Search);
                formBaseProjectModify.Show();
            }
            catch
            {
                MessageBox.Show("请选择一项进行修改", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
        }
Ejemplo n.º 2
0
        private void toolStripButtonAddProject_Click(object sender, EventArgs e)
        {
            var formBaseProjectModify = new FormBase.FormBaseProjectModify();

            formBaseProjectModify.SetMode(FormMode.ADD);
            formBaseProjectModify.SetAddFinishedCallback((addedID) =>
            {
                this.projectpagerWidget.Search(false, addedID);
                var worksheet = this.reoGridControlProject.Worksheets[0];
            });
            formBaseProjectModify.Show();
        }