Esempio n. 1
0
        public frmRoute(ScreenDimension win, CurrentDayRoute cdr)
        {
            Cdr = cdr;
            InitializeComponent();

            this.Text = win.WinTitle;
            this.Top = win.TopInt;
            this.Left = win.LeftInt;
            this.Height = win.HeightInt;
            this.Width = win.WidthInt;
            this.Tag = cdr.CDRRouteID;
            this.Name = cdr.CDRRouteID;

            lblDriverName.Text = cdr.CDRDriverLastName;
            txtDriverMessage.Text = cdr.CDRDriverMessage;
            {
                tooltipDriverMessage.AutoPopDelay = 5000;
                tooltipDriverMessage.InitialDelay = 1000;
                tooltipDriverMessage.ReshowDelay = 500;
                tooltipDriverMessage.ShowAlways = true;
                tooltipDriverMessage.IsBalloon = true;
                tooltipDriverMessage.SetToolTip(txtDriverMessage, cdr.CDRDriverMessage);
            }
        }
Esempio n. 2
0
 public static void Setup(int testItems)
 {
     SetTestRepo();
     for(int i=0;i<testItems;i++){
         CurrentDayRoute item=new CurrentDayRoute();
         _testRepo._items.Add(item);
     }
 }
Esempio n. 3
0
        // this may end up going away ???
        private void SaveToCurrentDayRoute(
             int PrimaryKey, string strRouteID, string sync,
             string strDriverID, string strDriverName, string strRouteName)
        {
            int key = PrimaryKey;
            string usr = Environment.UserName;
            string terminal = Properties.Settings.Default.terminal;
            int PostedCount = Properties.Settings.Default.ActiveStations - 1;

            CurrentDayRoute cdr = new DispatchAR.CurrentDayRoute
            {
                CDRDefaultDriverID = strDriverID,
                CDRDriverLastName = strDriverName,
                CDRDriverMessage = "",
                CDRRouteID = strRouteID,
                CDRRouteName = strRouteName,
                CDRStation = Environment.MachineName,
                Terminal = terminal,
                CurrentDayRouteID = key
            };
            // tried cdr.save and cdr.update
            // need to put something that works in CurrentDayRouteBLL ...
            //cdr.Save();
            cdr.Update();
            Program.CDRList.Clear();
            Program.CDRList = Program.GetCDRCollection();

            //CurrentDayRoute.Update(key, strRouteID, strRouteName, strDriverID, strDriverName,
            //"", Environment.MachineName, false, DateTime.Now, "", "",
            //DateTime.Now, "", DateTime.Now, true, DateTime.Now, false, DateTime.Now,
            //usr, PostedCount, terminal);
        }
Esempio n. 4
0
 public static void Setup(CurrentDayRoute item)
 {
     SetTestRepo();
     _testRepo._items.Add(item);
 }