public ActionResult Details(BasePath b) { if (b.Date != null) { return(View(DayStory.GetSingleDay(b))); } return(null); }
public ActionResult DayEdit(string category, string id) { var b = new BasePath() { Category = category, Date = id }; var d = DayStory.GetSingleDay(b); return(View("Day", d)); }
public ActionResult UploadEdit(string category, string id) { var b = new BasePath() { Date = id, Category = category }; var d = DayStory.GetSingleDay(b); //var day = DayStory.GetSingleDay(new BasePath(){Category = d.Category, Date = d.Day, Path = ConfigurationManager.AppSettings["UploadUrl"]}) ?? new DayStory {Day = d.Day}; return(View("Upload", d)); }
public ActionResult Adm(string id) { var list = new List <DayStory>(); var dirs = new DirectoryInfo(_root); var fldrs = dirs.GetDirectories(); foreach (var dirInfo in fldrs) { var d = new DayStory().GetAllDays(dirInfo.Name); list.AddRange(d); } return(View(list)); }
public ActionResult SaveDay(FormCollection collection) { var d = new DayStory { Day = collection[0], Header = collection[1], Text = collection[3], Category = collection[2] }; try { DayStory.Save(d); return(Redirect("/Home/UploadEdit/" + d.Category + "/" + d.Day)); } catch (Exception ex) { throw ex; } }
public ActionResult Day(BasePath b) { var d = new DayStory(); if (b.Date == null) { d.Day = DateTime.Now.ToShortDateString(); //d.Category = "main"; } else { d = DayStory.GetSingleDay(b); } return(View("Day", d)); }
public ActionResult Upload(DayStory d) { return(View("Upload", d)); }
public ActionResult Refresh(BasePath b) { var d = DayStory.GetSingleDay(b); return(View("Upload", d)); }