Exemple #1
0
        public HttpResponseMessage InsertProjectMaster(ProjectMaster projectMaster)
        {
            var newObj = new ProjectMaster()
            {
                Id                    = Guid.NewGuid(),
                ProjectCode           = projectMaster.ProjectCode,
                BuildProjectCode      = projectMaster.BuildProjectCode,
                ContractorOrgCode     = projectMaster.ContractorOrgCode,
                GeneralContractorCode = projectMaster.GeneralContractorCode,
                GeneralContractorName = projectMaster.GeneralContractorName,
                ProjectName           = projectMaster.ProjectName,
                ProjectActivityType   = projectMaster.ProjectActivityType,
                ProjectDescription    = projectMaster.ProjectDescription,
                ProjectCategory       = projectMaster.ProjectCategory,
                IsMajorProject        = projectMaster.IsMajorProject,
                OwnerName             = projectMaster.OwnerName,
                BuildCorporationCode  = projectMaster.BuildCorporationCode,
                BuilderLicenceNum     = projectMaster.BuilderLicenceNum,
                AreaCode              = projectMaster.AreaCode,
                TotalContractAmt      = projectMaster.TotalContractAmt,
                BuildingArea          = projectMaster.BuildingArea,
                StartDate             = projectMaster.StartDate,
                CompleteDate          = projectMaster.CompleteDate,
                ProjectSource         = projectMaster.ProjectSource,
                ProjectStatus         = projectMaster.ProjectStatus
            };
            var result = _projectMaster.InsertProjectMaster(newObj);

            if (result)
            {
                return(toJson(null, OperatingState.Success, "添加成功"));
            }
            return(toJson(null, OperatingState.Failure, "添加失败"));
        }