예제 #1
0
        public async Task Put(SIDE_PLM_BLR_BuyWindow model)
        {
            SIDE_PLM_BLR_BuyWindow entity = null;

            if (model.ID > 0)
            {
                entity = await buyRepository.GetModel(model.ID);
            }
            else if (string.IsNullOrEmpty(model.Year) && string.IsNullOrEmpty(model.Season))
            {
                entity = await buyRepository.GetModel(model.Year, model.Season);
            }
            if (entity != null)
            {
                entity.POSConfirmationStartDate       = model.POSConfirmationStartDate;
                entity.POSConfirmationEndDate         = model.POSConfirmationEndDate;
                entity.TargetPOSConfirmationStartDate = model.TargetPOSConfirmationStartDate;
                entity.TargetPOSConfirmationEndDate   = model.TargetPOSConfirmationEndDate;
                entity.Segment_POSTypeStartDate       = model.Segment_POSTypeStartDate;
                entity.Segment_POSTypeEndDate         = model.Segment_POSTypeEndDate;
                entity.STC_MandatoryStartDate         = model.STC_MandatoryStartDate;
                entity.STC_MandatoryEndDate           = model.STC_MandatoryEndDate;
                entity.TradingMeetingStartDate        = model.TradingMeetingStartDate;
                entity.TradingMeetingEndDate          = model.TradingMeetingEndDate;
                entity.V1StartDate = model.V1StartDate;
                entity.V1EndDate   = model.V1EndDate;
                entity.V2StartDate = model.V2StartDate;
                entity.V2EndDate   = model.V2EndDate;
                await buyRepository.UpdateEntity(entity);
            }
        }
예제 #2
0
        public async Task <object> GetModel(string Year, string Season)
        {
            SIDE_PLM_BLR_BuyWindow model = await buyRepository.GetModel(Year, Season);

            return(Ok(model));
        }
예제 #3
0
        public async Task <object> GetModel(int id)
        {
            SIDE_PLM_BLR_BuyWindow model = await buyRepository.GetModel(id);

            return(Ok(model));
        }
예제 #4
0
        public async Task <object> GetNewestBuyWindow()
        {
            SIDE_PLM_BLR_BuyWindow entity = await buyRepository.GetNewestBuyWindow();

            return(Ok(entity));
        }
예제 #5
0
 public string NewBuyingWindow(SIDE_PLM_BLR_BuyWindow model)
 {
     return(JsonConvert.SerializeObject(buyRepository.NewBuyWindowSP(model)));
 }