public ActionResult Edit(long?id)
 {
     try
     {
         if (id != null)
         {
             var createUserViewModel = _iUserMaster.EditAgentbyUserId(id);
             createUserViewModel.CategoryId     = _category.GetCategoryIdsByUserId(createUserViewModel.UserId);
             createUserViewModel.ListofCategory = _category.GetAllActiveSelectListItemCategory();
             return(View(createUserViewModel));
         }
         else
         {
             return(RedirectToAction("Show", "AllUsers"));
         }
     }
     catch (Exception)
     {
         throw;
     }
 }