[HttpPost]//Gets the todo Lists.
 public JsonResult AgentList(string username, int?roleid, int jtStartIndex = 0, int jtPageSize = 0, string jtSorting = null)
 {
     try
     {
         var agentCount  = _iUserMaster.GetAgentCount(username, roleid);
         var listofagent = _iUserMaster.GetAgentList(username, roleid, jtStartIndex, jtPageSize, jtSorting);
         return(Json(new { Result = "OK", Records = listofagent, TotalRecordCount = agentCount }));
     }
     catch (Exception)
     {
         throw;
     }
 }