/// <summary> /// Get contract document data by contract code , OCC /// </summary> /// <param name="strContractCode"></param> /// <param name="strOCC"></param> /// <returns></returns> public ActionResult CMS131_SearchResponse(string strContractCode, string strOCC) { CommonUtil c = new CommonUtil(); ObjectResultData res = new ObjectResultData(); List <View_dtContractDocument> nlst = new List <View_dtContractDocument>(); try { strContractCode = c.ConvertContractCode(strContractCode, CommonUtil.CONVERT_TYPE.TO_LONG); IViewContractHandler handler = ServiceContainer.GetService <IViewContractHandler>() as IViewContractHandler; List <dtContractDocument> list = handler.GetContractDocDataListForView(strContractCode, strOCC, null, null); foreach (dtContractDocument item in list) { nlst.Add(CommonUtil.CloneObject <dtContractDocument, View_dtContractDocument>(item)); } // Select by language nlst = CommonUtil.ConvertObjectbyLanguage <View_dtContractDocument, View_dtContractDocument>(nlst, "DocumentTypeName", "DocStatusName_Extra", "DocAuditResultName_Extra", "ContractOfficeName_Extra", "DocumentName", "OperationOfficeName_Extra", "Saleman1" ); //return Json(CommonUtil.ConvertToXml<View_dtContractDocument>(nlst, "Common\\CMS131")); } catch (Exception ex) { nlst = new List <View_dtContractDocument>(); res.MessageType = MessageModel.MESSAGE_TYPE.INFORMATION; res.AddErrorMessage(ex); } res.ResultData = CommonUtil.ConvertToXml <View_dtContractDocument>(nlst, "Common\\CMS131"); return(Json(res)); }