コード例 #1
0
        public DirectorWSDTO Translate(ControllerLayer.DirectorDTO director)
        {
            DirectorWSDTO Output = new DirectorWSDTO();

            Output.DID          = director.DID;
            Output.DirectorName = director.DirectorName;
            return(Output);
        }
コード例 #2
0
        public ControllerLayer.DirectorDTO Translate(DirectorWSDTO Director)
        {
            if (Director.DID != null || Director.DirectorName != null)
            {
                return(new ControllerLayer.DirectorDTO((int)Director.DID, Director.DirectorName));
            }

            throw new System.Web.HttpRequestValidationException("Invalid Director");
        }