예제 #1
0
        public static Space GetSpace(SpaceDO spaceDO)
        {
            Space space = new Space(spaceDO.ID, spaceDO.SpaceDesc);

            //            {
            //                ID = spaceDO.ID,
            //                Name = spaceDO.SpaceDesc
            //            };
            return(space);
        }
예제 #2
0
        public static SpaceDO GetSpaceDO(Space space)
        {
            SpaceDO spaceDO = new SpaceDO()
            {
                ID        = space.id,
                SpaceDesc = space.name
            };

            return(spaceDO);
        }
예제 #3
0
        public int DeleteSpaces(Space space)
        {
            int result = 0;

            try
            {
                SpaceDO spaceDO = Converter.GetSpaceDO(space);
                result = spaceRepository.DeleteEntity(spaceDO.ID);
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Exception Occured in DeleteSpaces method due to " + ex.Message);
            }
            return(result);
        }
예제 #4
0
        public static IEnumerable <SpaceDO> GetMasterSpaceDO(IEnumerable <Model.ServiceModel.MasterSpace> spaces)
        {
            List <SpaceDO> spaceDO = new List <SpaceDO>();

            foreach (var spc in spaces)
            {
                SpaceDO spcDO = new SpaceDO()
                {
                    ID        = spc.SpaceID,
                    SpaceDesc = spc.SpaceDesc,
                    Priority  = spc.Priority
                };
                spaceDO.Add(spcDO);
            }
            return(spaceDO);
        }
예제 #5
0
        public Space GetSpace(int SpaceID)
        {
            Space space = new Space(-1, "");//

            try
            {
                SpaceDO spaceDO = spaceRepository.GetEntity(SpaceID);
                if (spaceDO != null)
                {
                    space = Converter.GetSpace(spaceDO);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Exception Occured in GetSpace method due to " + ex.Message);
            }
            return(space);
        }