コード例 #1
0
        protected void changeSimpleTaskMultiView_Click( object sender, EventArgs e )
        {
            CheckReadOnly( );
              if ( this.simpleTaskMultiView.GetActiveView( ) == this.simpleTaskShowView )
              {
            this.simpleTaskMultiView.SetActiveView( this.simpleTaskEditView );
            this.showTaskCheckBox.Checked =
              AssignedTaskId.HasValue &&
              DefEventId.HasValue &&
              AssignedTaskId.Value == DefEventId.Value;
              }
              else
              {
            if ( sender == this.updateSimpleTaskButton )
            {
              TrackerDataSetTableAdapters.ProcsAdapter procsAdapter = new FlyTrace.TrackerDataSetTableAdapters.ProcsAdapter( );
              int? defaultEventId = null;

              if ( this.showTaskCheckBox.Checked )
              {
            procsAdapter.EnsureDefaultTask( Global.UserId, ref defaultEventId );
              }

              procsAdapter.AssignEventToGroup( defaultEventId, GroupId );
              AssignedTaskId = defaultEventId;
            }

            this.simpleTaskMultiView.SetActiveView( this.simpleTaskShowView );
              }
        }