public override int GetHashCode() { int hashCode = -1945719542; hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Id); hashCode = hashCode * -1521134295 + EqualityComparer <InlineKeyboardMarkup> .Default.GetHashCode(ReplyMarkup); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ParseMode); hashCode = hashCode * -1521134295 + EqualityComparer <IEnumerable <MessageEntity> > .Default.GetHashCode(CaptionEntities); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Type); hashCode = hashCode * -1521134295 + Longitude.GetHashCode(); hashCode = hashCode * -1521134295 + Latitude.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Title); hashCode = hashCode * -1521134295 + HorizontalAccuracy.GetHashCode(); hashCode = hashCode * -1521134295 + LivePeriod.GetHashCode(); hashCode = hashCode * -1521134295 + Heading.GetHashCode(); hashCode = hashCode * -1521134295 + ProximityAlertRadius.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <InputMessageContent> .Default.GetHashCode(InputMessageContent); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ThumbUrl); hashCode = hashCode * -1521134295 + ThumbWidth.GetHashCode(); hashCode = hashCode * -1521134295 + ThumbHeight.GetHashCode(); return(hashCode); }
public ActionResult Edit(int?id) { LivePeriod info = new LivePeriod(); using (MyContext db = new MyContext()) { info = db.LivePeriods.Where(x => x.LPID == id).FirstOrDefault(); } return(View(info)); }
public override int GetHashCode() { int hashCode = 1466495924; hashCode = hashCode * -1521134295 + Longitude.GetHashCode(); hashCode = hashCode * -1521134295 + Latitude.GetHashCode(); hashCode = hashCode * -1521134295 + HorizontalAccuracy.GetHashCode(); hashCode = hashCode * -1521134295 + LivePeriod.GetHashCode(); hashCode = hashCode * -1521134295 + Heading.GetHashCode(); hashCode = hashCode * -1521134295 + ProximityAlertRadius.GetHashCode(); return(hashCode); }
public ActionResult AddAnnouncer(LivePeriod info) { string result = "Fail"; using (MyContext db = new MyContext()) { db.LivePeriods.Add(info); int r = db.SaveChanges(); if (r > 0) { result = "Success"; } } return(Content(result)); }
public ActionResult DelAnnouncer(LivePeriod info) { string result = "Fail"; using (MyContext db = new MyContext()) { LivePeriod aninfo = db.LivePeriods.Where(x => x.RoomID == info.RoomID).FirstOrDefault(); db.LivePeriods.Remove(aninfo); int r = db.SaveChanges(); if (r > 0) { result = "Success"; } } return(Content(result)); }
public ActionResult EditAnnouncer(LivePeriod info) { string result = "Fail"; using (MyContext db = new MyContext()) { LivePeriod uinfo = db.LivePeriods.Where(x => x.LPID == info.LPID).FirstOrDefault(); uinfo.RoomID = info.RoomID; uinfo.TimeLong = info.TimeLong; uinfo.TimeBegin = info.TimeBegin; uinfo.TimeEnd = info.TimeEnd; uinfo.Remake = info.Remake; int i = db.SaveChanges(); if (i > 0) { result = "Success"; } } return(Content(result)); }