More date range options in Order Manager
More date range options in Order Manager
We really need to be able to filter by more date ranges in the order manager. Finding the need for a "yesterday" option as well. "Today" and "Past Week" is to big of a jump.
- m_plugables
- Commander (CMDR)
- Posts: 149
- Joined: Tue Mar 11, 2008 12:44 am
- Contact:
Yesterday option for order manager
edit Admin/Orders/Default.aspx.cs file and following method to it
Now search the follwoing line in the file
when found then put the following line of code just below it
after this modification your code should look like
Now search the follwoing function
and put the following line of code just after the case 11: in that function.
After this modification your code should look like
Above code will make an extra option available "Yesterday" in the date filter.
Code: Select all
private void ApplyLastDateFilter()
{
_isCustomDateTime = false;
DateTime tempDate = DateTime.Now.AddDays(-1);
DateTime startDate = (new DateTime(tempDate.Year, tempDate.Month, tempDate.Day, 0, 0, 0));
DateTime endDate = (new DateTime(tempDate.Year, tempDate.Month, tempDate.Day,23, 59, 59));
HiddenStartDate.Value = startDate.ToString();
HiddenEndDate.Value = endDate.ToString();
}
Code: Select all
DateFilter.Items.Add(new ListItem("Today","0"));
Code: Select all
DateFilter.Items.Add(new ListItem("Yesterday", "12"));
Code: Select all
...
...
DateFilter.Items.Add(new ListItem("Today","0"));
DateFilter.Items.Add(new ListItem("Yesterday", "12"));
...
...
Code: Select all
protected void UpdateDateFilter()
Code: Select all
case 12:
//Last Day
ApplyLastDateFilter();
break;
Code: Select all
...
...
case 11:
//Custom Date
ApplyCustomDateFilter();
break;
case 12:
//Last Day
ApplyLastDateFilter();
break;
...
...