/// <summary> /// Get site data for view /// </summary> /// <param name="type"></param> /// <param name="contractPrefix"></param> /// <returns></returns> public ActionResult CMS100_LoadSite(string type, string contractPrefix) { ObjectResultData res = new ObjectResultData(); try { CMS100_ScreenParameter CMS100Param = GetScreenObject <CMS100_ScreenParameter>(); IViewContractHandler hand = ServiceContainer.GetService <IViewContractHandler>() as IViewContractHandler; List <dtsiteListGrp> lst = new List <dtsiteListGrp>(); if (type.Contains("CT")) { if (type.Contains("Rental")) { lst = hand.GetSiteListForViewCustGrp_CT_Rental(CMS100Param.GroupCode, contractPrefix); } else { lst = hand.GetSiteListForViewCustGrp_CT_Sale(CMS100Param.GroupCode, contractPrefix); } } else { if (type.Contains("Rental")) { lst = hand.GetSiteListForViewCustGrp_R_Rental(CMS100Param.GroupCode, contractPrefix); } else { lst = hand.GetSiteListForViewCustGrp_R_Sale(CMS100Param.GroupCode, contractPrefix); } } res.ResultData = CommonUtil.ConvertToXml <dtsiteListGrp>(lst, "Common\\CMS100_SiteList", CommonUtil.GRID_EMPTY_TYPE.VIEW); } catch (Exception ex) { res.AddErrorMessage(ex); } return(Json(res)); }