I have an opening page which lets user to enter SupervisorList page
<li>
<a href="/Moderation/SupervisorList?StartTime=@DateTime.Now.AddDays(-2).ToString("yyyy-MM-dd")&EndTime=@DateTime.Now.AddDays(1).ToString("yyyy-MM-dd")">
<i class="icon-legal"></i>
Supervisor List
</a>
</li>
After entering this page, user may change StartTime and EndTime submit a form via this function:
function acceptDenyFinalBtn() {
$('#FlowCatId').val($("#modalFlowCatList").val());
$('#ModCategoryId').val($("#modalModCategory").val());
$('#PositiveInd').val($("#modalPositiveInd").val());
$('#ContentForm').submit();
}
And here is the submit action in controller:
public ActionResult SubmitModSupervised(Content model)
{
string status = "";
status = ModerationBLL.ContentStatus.MODERATIONCOMPLETE.ToString();
ModerationDM.Content updateContent = contentBLL.GetContent(model.ModId, model.ContentSeqNum);
if (updateContent.Status != ContentStatus.MODERATIONCOMPLETE.ToString())
{
updateContent.ModifiedTime = DateTime.Now;
}
updateContent.ResultCode = model.ResultCode;
updateContent.Status = status;
updateContent.ModCategoryId = model.ModCategoryId;
updateContent.PositiveInd = model.PositiveInd;
updateContent.ModUserName = ((ModerationDM.User)Session["UserProfile"]).UserName;
contentBLL.UpdateContent(updateContent);
TempData["Notification Type"] = "S";
return RedirectToAction("SupervisorList", "Moderation", new { StartTime=DateTime.Now.AddDays(-2).Date, EndTime=DateTime.Now.AddDays(1) });
}
As you can see in last line, I redirect to SupervisorList action again, but this time with new StartTime and EndTime. What I'm trying to do is to keep the chosen StartTime and EndTime if the user changed it. How can I achieve this?