示例#1
0
        /// <summary>
        /// Get contract detail data
        /// </summary>
        /// <returns></returns>
        public ActionResult CTS261_GetContractDetail()
        {
            ObjectResultData res = new ObjectResultData();

            try
            {
                CTS261_ScreenParameter param       = GetScreenObject <CTS261_ScreenParameter>();
                IProjectHandler        ProjectHand = ServiceContainer.GetService <IProjectHandler>() as IProjectHandler;

                DataEntity.Common.ICommonHandler        comHand    = ServiceContainer.GetService <DataEntity.Common.ICommonHandler>() as DataEntity.Common.ICommonHandler;
                List <DataEntity.Common.doMiscTypeCode> currencies = comHand.GetMiscTypeCodeList(new List <DataEntity.Common.doMiscTypeCode>()
                {
                    new DataEntity.Common.doMiscTypeCode()
                    {
                        FieldName = MiscType.C_CURRENCT,
                        ValueCode = "%"
                    }
                });

                List <doProjectContractDetail> lstProjectContractDetail = new List <doProjectContractDetail>();
                if (param != null && param.strProjectCode != null)
                {
                    lstProjectContractDetail = ProjectHand.GetContractDetailList(param.strProjectCode, MiscType.C_DOC_AUDIT_RESULT);
                    CommonUtil.MappingObjectLanguage <doProjectContractDetail>(lstProjectContractDetail);

                    foreach (doProjectContractDetail pc in lstProjectContractDetail)
                    {
                        pc.Currencies = currencies;
                    }
                }
                res.ResultData = CommonUtil.ConvertToXml <doProjectContractDetail>(lstProjectContractDetail, CTS261_XML, CommonUtil.GRID_EMPTY_TYPE.VIEW);
                return(Json(res));
            }
            catch (Exception ex)
            {
                res.AddErrorMessage(ex);
                return(Json(res));
            }
        }