Exemple #1
0
        public CollectSchedule GetCollectSchedule(Reserve reserve)
        {
            var r1 = (from a in Relations
                      where a.ReserveCode == reserve.ReserveCode
                      select a).FirstOrDefault();

            if (r1 == null)
            {
                return(null);
            }

            var r2 = (from b in CollectSchedules
                      where b.RelationCode == r1.RelationCode
                      select b).FirstOrDefault();

            return(r2);
        }
Exemple #2
0
            public static CollectState GetTypeForReserve(Reserve res)
            {
                var cs = DBAccessor.Instance.GetCollectSchedule(res);

                if (cs == null)
                {
                    return(CollectStates.Undecided);
                }

                if (cs.CollectTime == null)
                {
                    return(CollectStates.Appointment);
                }
                else
                {
                    return(CollectStates.Done);
                }
            }
Exemple #3
0
 public CollectState(Reserve res)
 {
     this.type = GetTypeForReserve(res);
 }
 public void SetResult(Reserve res)
 {
     Reserve                 = res;
     txtReserveCode.Text     = Reserve.ReserveCode.ToString();
     btnReserveClear.Enabled = Reserve != null;
 }