コード例 #1
0
ファイル: BasicTraffic.cs プロジェクト: ImanRezaeipour/GTS
 public BasicTraffic(DateTime _date, decimal _precard, int _time)
 {
     Precard precard = new Precard();
     precard.ID = _precard;
     precard.Active = true;
     this.Date = _date;
     this.Time = _time;
     this.Precard = precard;
     Used = false;
 }
コード例 #2
0
        public void ImportBasicTraffic(BasicTraffic basic1, BasicTraffic basic2, Precard precard, bool forceFilled)
        {
            if (basic1.Time == 0 && basic2.Time == 0)
            {
                return;
            }
            edingTrafficPair.From = basic1.Time;
            edingTrafficPair.BasicTrafficIdFrom     = basic1.ID;
            edingTrafficPair.BasicTrafficIdFromDate = basic1.Date;

            edingTrafficPair.To = basic2.Time;
            edingTrafficPair.BasicTrafficIdTo     = basic2.ID;
            edingTrafficPair.BasicTrafficIdToDate = basic2.Date;
            edingTrafficPair.IsFilled             = true;
            if (basic2.ID == 0 && !forceFilled)
            {
                edingTrafficPair.IsFilled = false;
            }
            edingTrafficPair.Precard = precard;
        }
コード例 #3
0
        public void ImportBasicTraffic(DateTime date1, int time1, DateTime date2, int time2, Precard precard)
        {
            IsInited = true;
            //  basic1.Used = true;
            edingTrafficPair.From = time1;
            edingTrafficPair.BasicTrafficIdFrom     = 0;
            edingTrafficPair.BasicTrafficIdFromDate = date1.Date;

            edingTrafficPair.IsFilled = true;
            edingTrafficPair.Precard  = precard;

            edingTrafficPair.To = time2;
            edingTrafficPair.BasicTrafficIdTo     = 0;
            edingTrafficPair.BasicTrafficIdToDate = date2.Date;
        }