예제 #1
0
        public dlgSchedule(ScheduleEntry entry, Mediator mediator)
        {
            //Constructor
            try {
                //Required for Windows Form Designer support
                InitializeComponent();
                this.btnCancel.Text = CMD_CANCEL;
                this.btnOK.Text     = CMD_OK;

                //
                this.mEntry    = entry;
                this.mMediator = mediator;
                if (this.mEntry != null)
                {
                    this.mEntry.EntryChanged += new EventHandler(this.OnEntryChanged);
                }
                this.mToolTip = new System.Windows.Forms.ToolTip();
            }
            catch (Exception ex) { throw ex; }
        }
예제 #2
0
        public void CopyToFolder()
        {
            //Copy the selected entries to another schedule
            dlgMoveEntry dlgCopyTo = new dlgMoveEntry();

            if (dlgCopyTo.ShowDialog(this) == DialogResult.OK)
            {
                //Package data
                DispatchDS ds = new DispatchDS();
                for (int i = 0; i < this.grdSchedule.Selected.Rows.Count; i++)
                {
                    int           ID    = Convert.ToInt32(this.grdSchedule.Selected.Rows[i].Cells["ID"].Value);
                    ScheduleEntry entry = this.mSchedule.Item(ID);
                    ds.Merge(entry.ToDataSet());
                }

                //Get destination schedule and copy data
                DispatchSchedule schedule = dlgCopyTo.Schedule;
                schedule.AddList(ds);
            }
        }
예제 #3
0
        private void OnDragDropMouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            //Start drag\drop if user is dragging
            DataObject oData = null;

            try {
                switch (e.Button)
                {
                case MouseButtons.Left:
                    if (this.mIsDragging)
                    {
                        //Initiate drag drop operation from this schedule
                        DispatchDS ds = new DispatchDS();
                        for (int i = 0; i < this.grdSchedule.Selected.Rows.Count; i++)
                        {
                            int           ID    = Convert.ToInt32(this.grdSchedule.Selected.Rows[i].Cells["ID"].Value);
                            ScheduleEntry entry = this.mSchedule.Item(ID);
                            ds.Merge(entry.ToDataSet());
                        }
                        oData = new DataObject();
                        oData.SetData(ds);
                        DragDropEffects effect = this.grdSchedule.DoDragDrop(oData, DragDropEffects.All);

                        //After the drop- remove from this schedule on move
                        switch (effect)
                        {
                        case DragDropEffects.Move:      this.mSchedule.RemoveList(ds); break;

                        case DragDropEffects.Copy:      break;
                        }
                    }
                    break;
                }
            }
            catch (Exception ex) { reportError(ex); }
        }
예제 #4
0
파일: schedule.cs 프로젝트: jpheary/Argix08
 public abstract dlgSchedule ScheduleDialog(ScheduleEntry entry);
예제 #5
0
파일: schedule.cs 프로젝트: jpheary/Argix08
 public abstract bool Remove(ScheduleEntry entry);
예제 #6
0
파일: schedule.cs 프로젝트: jpheary/Argix08
 public abstract bool Add(ScheduleEntry entry);
예제 #7
0
 public override dlgSchedule ScheduleDialog(ScheduleEntry entry)
 {
     return(new dlgClientInboundFreight((ClientInboundFreight)entry, base.mMediator));
 }
예제 #8
0
 public override dlgSchedule ScheduleDialog(ScheduleEntry entry)
 {
     return(new dlgPickup((Pickup)entry, base.mMediator));
 }
예제 #9
0
 public override dlgSchedule ScheduleDialog(ScheduleEntry entry)
 {
     return(new dlgTrailerEntry((TrailerEntry)entry, base.mMediator));
 }
예제 #10
0
 public override dlgSchedule ScheduleDialog(ScheduleEntry entry)
 {
     return(new dlgArrival((Arrival)entry, base.mMediator));
 }