private ChatEditor GetEditorFromQuery() { var editor = new ChatEditor(true); if (Request.QueryString.AllKeys.Contains("IsArchive")) { editor.IsArchive = Request.QueryString["IsArchive"].ToBool(); } if (Request.QueryString.AllKeys.Contains("StartDate")) { editor.StartDate = Request.QueryString["StartDate"].ToDate("dd.MM.yyyy HH:mm"); } if (Request.QueryString.AllKeys.Contains("EndDate")) { editor.EndDate = Request.QueryString["EndDate"].ToDate("dd.MM.yyyy HH:mm"); } if (Request.QueryString.AllKeys.Contains("ChatID")) { editor.ChatID = Request.QueryString["ChatID"].ToNullInt(); } editor.InitProps(); return(editor); }
public PartialViewResult Editor(FormCollection collection) { var editor = new ChatEditor(true); editor.IsPost = true; editor.IsArchive = collection["IsArchive"].ToBool(); editor.StartDate = collection["StartDate"].ToDate("dd.MM.yyyy HH:mm"); editor.EndDate = collection["EndDate"].ToDate("dd.MM.yyyy HH:mm"); editor.InitProps(); return(PartialView(editor)); }