public virtual ActionResult Create(int?DispatchListID)
        {
            var dispatch = DispatchListID.HasValue ? DispatchLists.GetDispatchListsByDispatchListID(DispatchListID.Value) : new DispatchListsTable {
                Editable = 1
            };

            return(View(dispatch));
        }
 public virtual ActionResult Edit(int?DispatchListID)
 {
     try
     {
         var dispatch = DispatchLists.GetDispatchListsByDispatchListID(Convert.ToInt32(DispatchListID));
         dispatch.Accounts = DispatchLists.GetDispatchListItemsById(Convert.ToInt32(DispatchListID));
         DispatchListsModel model = new DispatchListsModel(dispatch);
         return(View(model));
     }
     catch (Exception ex)
     {
         var exception = EntityExceptionHelper.GetAndLogNetStepsException(ex, NetSteps.Data.Entities.Constants.NetStepsExceptionType.NetStepsApplicationException);
         throw exception;
     }
 }