public ViewResult ChangeMobileBindingOnDate(string SearchStartDate, string SearchEndDate) { IEnumerable <UserChangeBindMobileLog> changeMobileBindingLogs = new List <UserChangeBindMobileLog>(); if (!string.IsNullOrEmpty(SearchStartDate) && !string.IsNullOrEmpty(SearchEndDate)) { DateTime startTime, endTime; if (DateTime.TryParse(SearchStartDate, out startTime) && DateTime.TryParse(SearchEndDate, out endTime)) { try { using (var client = new UserAccountClient()) { var result = client.QueryChangeBindMobileLogByDateTime(startTime, endTime); result.ThrowIfException(true); if (result.Success && result.Result != null) { changeMobileBindingLogs = result.Result; } } } catch (Exception ex) { WebLog.LogException(ex); } } } ViewBag.SearchStartDate = SearchStartDate; ViewBag.SearchEndDate = SearchEndDate; return(View("ChangeMobileBinding", changeMobileBindingLogs)); }