예제 #1
0
        public ContractStatusResult Find(long id)
        {
            Data.Entity.ContractStatus entity = ContractStatusDao.Find(id);
            ContractStatusResult       result = ContractStatusResultConverter.Convert(entity);

            return(result);
        }
예제 #2
0
        public Data.Entity.ContractStatus Save(Data.Entity.ContractStatus entity)
        {
            ContractStatusStorage.ContractStatusList.Add(entity);
            ContractStatusStorage.ContractStatusDictionary.Add(entity.Id, entity);

            return(entity);
        }
예제 #3
0
        public ContractStatusResult Create(ContractStatusParam param)
        {
            Data.Entity.ContractStatus entity = ContractStatusParamConverter.Convert(param, null);
            ContractStatusDao.Save(entity);

            return(ContractStatusResultConverter.Convert(entity));
        }
예제 #4
0
        static ContractStatusStorage()
        {
            Data.Entity.ContractStatus ContractStatus1 = new Data.Entity.ContractStatus
            {
            };

            Data.Entity.ContractStatus ContractStatus2 = new Data.Entity.ContractStatus
            {
            };

            Data.Entity.ContractStatus ContractStatus3 = new Data.Entity.ContractStatus
            {
            };
            Data.Entity.ContractStatus ContractStatus4 = new Data.Entity.ContractStatus
            {
            };
            Data.Entity.ContractStatus ContractStatus5 = new Data.Entity.ContractStatus
            {
            };
            Data.Entity.ContractStatus ContractStatus6 = new Data.Entity.ContractStatus
            {
            };
            Data.Entity.ContractStatus ContractStatus7 = new Data.Entity.ContractStatus
            {
            };
            Data.Entity.ContractStatus ContractStatus8 = new Data.Entity.ContractStatus
            {
            };
            Data.Entity.ContractStatus ContractStatus9 = new Data.Entity.ContractStatus
            {
            };
            Data.Entity.ContractStatus ContractStatus10 = new Data.Entity.ContractStatus
            {
            };

            ContractStatusList.Add(ContractStatus1);
            ContractStatusList.Add(ContractStatus2);
            ContractStatusList.Add(ContractStatus3);
            ContractStatusList.Add(ContractStatus4);
            ContractStatusList.Add(ContractStatus5);
            ContractStatusList.Add(ContractStatus6);
            ContractStatusList.Add(ContractStatus7);
            ContractStatusList.Add(ContractStatus8);
            ContractStatusList.Add(ContractStatus9);
            ContractStatusList.Add(ContractStatus10);

            ContractStatusDictionary.Add(ContractStatus1.Id, ContractStatus1);
            ContractStatusDictionary.Add(ContractStatus2.Id, ContractStatus2);
            ContractStatusDictionary.Add(ContractStatus3.Id, ContractStatus3);
            ContractStatusDictionary.Add(ContractStatus4.Id, ContractStatus4);
            ContractStatusDictionary.Add(ContractStatus5.Id, ContractStatus5);
            ContractStatusDictionary.Add(ContractStatus6.Id, ContractStatus6);
            ContractStatusDictionary.Add(ContractStatus7.Id, ContractStatus7);
            ContractStatusDictionary.Add(ContractStatus8.Id, ContractStatus8);
            ContractStatusDictionary.Add(ContractStatus9.Id, ContractStatus9);
            ContractStatusDictionary.Add(ContractStatus10.Id, ContractStatus10);
        }
예제 #5
0
        public void Update(List <ContractStatusParam> param)
        {
            List <Data.Entity.ContractStatus> entity = new List <Data.Entity.ContractStatus>();

            foreach (var item in param)
            {
                Data.Entity.ContractStatus oldEntity = ContractStatusDao.Find(item.Id);
                Data.Entity.ContractStatus newEntity = ContractStatusParamConverter.Convert(item, null);
                ContractStatusDao.Update(newEntity);
            }
        }
예제 #6
0
        public ContractStatusResult Convert(Data.Entity.ContractStatus param)
        {
            ContractStatusResult result = new ContractStatusResult()
            {
                Code        = param.Code,
                Id          = param.Id,
                Description = param.Description,
                Name        = param.Name
            };

            return(result);
        }
        public Data.Entity.ContractStatus Convert(ContractStatusParam param, Data.Entity.ContractStatus oldentity)
        {
            Data.Entity.ContractStatus entity = null;

            if (oldentity != null)
            {
                entity = oldentity;
            }
            else
            {
                entity = new Data.Entity.ContractStatus
                {
                    Code        = param.Code,
                    Id          = param.Id,
                    Description = param.Description,
                    Name        = param.Name
                };
            }

            return(entity);
        }
예제 #8
0
 public void Update(long id, ContractStatusParam param)
 {
     Data.Entity.ContractStatus oldEntity = ContractStatusDao.Find(id);
     Data.Entity.ContractStatus newEntity = ContractStatusParamConverter.Convert(param, null);
     ContractStatusDao.Update(newEntity);
 }
예제 #9
0
 public Data.Entity.ContractStatus Update(Data.Entity.ContractStatus entity)
 {
     Delete(entity.Id);
     Save(entity);
     return(entity);
 }
예제 #10
0
 public void Delete(Data.Entity.ContractStatus entity)
 {
     ContractStatusStorage.ContractStatusList.Remove(entity);
     ContractStatusStorage.ContractStatusDictionary.Remove(entity.Id);
 }
예제 #11
0
 public void Delete(long id)
 {
     Data.Entity.ContractStatus entity = Find(id);
     Delete(entity);
 }