def vm_get_all_projects(request):
     try:
         pageindex = int(request.POST['pageindex'])
         projectid=request.POST["projectid"]
         result = DAL_ProjectVersion.get_all().filter(PVProjectID=int(projectid))
     except Exception as ex:
         print(ex)
     return result[12 * (pageindex - 1):12 * pageindex]
 def get_projectversion_pagecounts(request):
     pagecounts=1
     try:
         pageindex = int(request.POST['pageindex'])
         projectid=request.POST["projectid"]
         result = DAL_ProjectVersion.get_all().filter(PVProjectID=int(projectid))
         if len(result):
             pagecounts=len(result)/12+1
     except Exception as ex:
         print(ex)
     return pagecounts