﻿// JScript File

function getTotalRecord()
{
	return processinfo.getTotalRecord();
}
function getListCategoryByIndex(index)
{
	return  processinfo.getListCategoryByIndex(index);
}

function countItemRootByIndex(index)
{
  return processinfo.countItemRootByIndex(index);
}
function getTopListCategory(top)
{
	return processinfo.getTopListCategory(top);
}

function getUtilityInfo(style)
{
	return processinfo.getUtilityInfo(style);
}

function getPageConfigInfo()
{
	return processinfo.getPageConfigInfo();			
}

function chao()
{
    return processinfo.chao();
}
function Sessioninfo()
{
    return processinfo.Sessioninfo();
}
function formatStyleDate(dateformat,style)
{
	var objDate= new Date(dateformat);
	var myDate = objDate.getDate();
	var myMonth = objDate.getMonth() + 1;
	
	if(myDate<10)
	{
		myDate = "0" + myDate; 
	}
	
	if(myMonth<10)
	{
		myMonth="0" + myMonth;
	}
	var myYear = objDate.getFullYear();
	
	switch(style.toLowerCase())
	{
		case 'dd/mm/yyyy' :
		{
			return (myDate + '/' + myMonth + '/' + myYear);
			break;
		}
		case 'mm/dd/yyyy' :
		{
			return  (myMonth + '/' + myDate + '/' + myYear);
			break;
		}
		case 'yyyy/mm/dd' :
		{
			return  (myYear + '/' + myMonth + '/' + myDate);
			break;
		} 
	}
}
function getListDistrictByCityProvince(cityID)
{
	return processinfo.getListDistrictByCityProvince(cityID);
}

function getListDealerByTypePage(tID,numberRecordOnPage,currentPageIndex,totalRecord)
{
    return processinfo.getListDealerByTypePage(tID,numberRecordOnPage,currentPageIndex,totalRecord);
}

function getDealerListByCitytype(cityID,typeID,numberRecordOnPage,currentPageIndex,totalRecord)
{
    return processinfo.getDealerListByCitytype(cityID,typeID,numberRecordOnPage,currentPageIndex,totalRecord);
}

function getDealerListByCityProvinceAndDistandtype(cityID,distID,typeID,numberRecordOnPage,currentPageIndex,totalRecord)
{
    return processinfo.getDealerListByCityProvinceAndDistandtype(cityID,distID,typeID,numberRecordOnPage,currentPageIndex,totalRecord);
}

function getDealerListByCityProvinceAndDist(cityID,distID,numberRecordOnPage,currentPageIndex,totalRecord)
{
    return processinfo.getDealerListByCityProvinceAndDist(cityID,distID,numberRecordOnPage,currentPageIndex,totalRecord);
}

function getDealerListByCityProvince(cityID,numberRecordOnPage,currentPageIndex,totalRecord)
{
    return processinfo.getDealerListByCityProvince(cityID,numberRecordOnPage,currentPageIndex,totalRecord);
}

function getListCityByArea(AreaID)
{
    return processinfo.getListCityByArea(AreaID);
}

function getListDealerBySearch(cityID,distID,typeID,numberRecordOnPage,currentPageIndex,totalRecord)
{
    return processinfo.getListDealerBySearch(cityID,distID,typeID,numberRecordOnPage,currentPageIndex,totalRecord);
}

function getListServiceBySearch(cityID,distID,typeID,numberRecordOnPage,currentPageIndex,totalRecord)
{
    return processinfo.getListServiceBySearch(cityID,distID,typeID,numberRecordOnPage,currentPageIndex,totalRecord);
}