Exemplo n.º 1
0
        protected override DialogResult showEditDialog(Stage entity)
        {
            StageEditor editor = new StageEditor((StageDao)this.dao);

            try
            {
                editor.entity = entity;
                editor.renderEntity();
                return(editor.ShowDialog(this));
            }
            catch (Exception ex)
            {
                MyMessageBox msgBox = new MyMessageBox("Data error!", ex, MyConstants.BOX_TYPE_ERROR);
                msgBox.ShowDialog(this);
                return(DialogResult.Abort);
            }
        }
Exemplo n.º 2
0
        protected override DialogResult showAddDialog(Stage entity)
        {
            StageEditor editor = new StageEditor((StageDao)this.dao);

            try
            {
                Stage stage = new Stage();
                if (this.parentWindow.queryCondition != null)
                {
                    stage.project_id = this.parentWindow.queryCondition.project_id;
                }
                editor.entity = stage;
                editor.renderEntity();
                return(editor.ShowDialog(this));
            }
            catch (Exception ex)
            {
                MyMessageBox msgBox = new MyMessageBox("Data error!", ex, MyConstants.BOX_TYPE_ERROR);
                msgBox.ShowDialog(this);
                return(DialogResult.Abort);
            }
        }