Exemplo n.º 1
0
 public static bool InsertOutDate(OutDate model)
 {
     using (LazlwEntities entities = new LazlwEntities())
     {
         entities.OutDates.Add(model);
         return entities.SaveChanges() > 0;
     }
 }
Exemplo n.º 2
0
 public bool DeadLine()
 {
     if (DateTime.Today > OutDate.AddDays(3))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
        public override int GetHashCode()
        {
            var hashCode = 1081298760;

            hashCode = hashCode * -1521134295 + EqualityComparer <Airport> .Default.GetHashCode(OriginAirport);

            hashCode = hashCode * -1521134295 + EqualityComparer <Airport> .Default.GetHashCode(DestinationAirport);

            hashCode = hashCode * -1521134295 + OutDate.GetHashCode();
            hashCode = hashCode * -1521134295 + InDate.GetHashCode();
            hashCode = hashCode * -1521134295 + Return.GetHashCode();
            return(hashCode);
        }
Exemplo n.º 4
0
        internal EsiResponseHeaders(HttpResponseHeaders ResponseHeaders)
        {
            IEnumerable <string> OutContentType;
            IEnumerable <string> OutDate;
            IEnumerable <string> OutExpires;
            IEnumerable <string> OutLastModified;
            IEnumerable <string> OutPages;
            IEnumerable <string> OutWarning;

            if (ResponseHeaders.TryGetValues("Content-Type", out OutContentType))
            {
                ContentType = OutContentType.First();
            }

            if (ResponseHeaders.TryGetValues("Date", out OutDate))
            {
                Date = DateTime.Parse(OutDate.First());
            }

            if (ResponseHeaders.TryGetValues("Expires", out OutExpires))
            {
                Expires = DateTime.Parse(OutExpires.First());
            }

            if (ResponseHeaders.TryGetValues("Last-Modified", out OutLastModified))
            {
                LastModified = DateTime.Parse(OutLastModified.First());
            }

            if (ResponseHeaders.TryGetValues("X-Pages", out OutPages))
            {
                Pages = int.Parse(OutPages.First());
            }

            if (ResponseHeaders.TryGetValues("Warning", out OutWarning))
            {
                Warning = OutWarning.First();
            }
        }
Exemplo n.º 5
0
 public static bool UpdateOutDate(OutDate model, OutDate oldModel)
 {
     using (LazlwEntities entities = new LazlwEntities())
     {
         entities.OutDates.Attach(oldModel);
         ClassValueCopier.Copy(oldModel, model);
         return entities.SaveChanges() > 0;
     }
 }