private void repositoryItemSpinEditADRate_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            using (ToolForms.FormAdNotes form = new ToolForms.FormAdNotes())
            {
                form.laID.Text        = this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].ID;
                form.laDate.Text      = this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].Date.ToString("ddd, MM/dd/yy");
                form.Date             = this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].Date;
                form.laFinalRate.Text = this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].FinalRate.ToString("$#,###.00");
                form.Comment          = this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].Comment;
                form.Section          = this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].Section;
                form.Deadline         = this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].Deadline;
                if (form.ShowDialog() == DialogResult.OK)
                {
                    if (form.ckCommentAll.Checked)
                    {
                        foreach (var insert in this.Publication.Inserts)
                        {
                            insert.Comment = form.Comment;
                        }
                    }
                    else
                    {
                        this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].Comment = form.Comment;
                    }

                    if (form.ckSectionAll.Checked)
                    {
                        foreach (var insert in this.Publication.Inserts)
                        {
                            insert.Section = form.Section;
                        }
                    }
                    else
                    {
                        this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].Section = form.Section;
                    }

                    if (form.ckDeadlineAll.Checked)
                    {
                        foreach (var insert in this.Publication.Inserts)
                        {
                            insert.Deadline = form.Deadline;
                        }
                    }
                    else
                    {
                        this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].Deadline = form.Deadline;
                    }

                    if (form.ckCommentAll.Checked || form.ckSectionAll.Checked || form.ckDeadlineAll.Checked)
                    {
                        RefreshInserts();
                    }

                    advBandedGridViewPublication.CloseEditor();
                    ScheduleBuilderControl.Instance.SettingsNotSaved = true;
                }
            }
        }
        private void repositoryItemSpinEditADRate_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            using (ToolForms.FormAdNotes form = new ToolForms.FormAdNotes())
            {
                form.laID.Text = this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].ID;
                form.laDate.Text = this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].Date.ToString("ddd, MM/dd/yy");
                form.Date = this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].Date;
                form.laFinalRate.Text = this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].FinalRate.ToString("$#,###.00");
                form.Comment = this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].Comment;
                form.Section = this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].Section;
                form.Deadline = this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].Deadline;
                if (form.ShowDialog() == DialogResult.OK)
                {
                    if (form.ckCommentAll.Checked)
                    {
                        foreach (var insert in this.Publication.Inserts)
                            insert.Comment = form.Comment;
                    }
                    else
                        this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].Comment = form.Comment;

                    if (form.ckSectionAll.Checked)
                    {
                        foreach (var insert in this.Publication.Inserts)
                            insert.Section = form.Section;
                    }
                    else
                        this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].Section = form.Section;

                    if (form.ckDeadlineAll.Checked)
                    {
                        foreach (var insert in this.Publication.Inserts)
                            insert.Deadline = form.Deadline;
                    }
                    else
                        this.Publication.Inserts[advBandedGridViewPublication.GetFocusedDataSourceRowIndex()].Deadline = form.Deadline;

                    if (form.ckCommentAll.Checked || form.ckSectionAll.Checked || form.ckDeadlineAll.Checked)
                        RefreshInserts();

                    advBandedGridViewPublication.CloseEditor();
                    ScheduleBuilderControl.Instance.SettingsNotSaved = true;
                }
            }
        }