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); } }
public async Task <object> GetModel(string Year, string Season) { SIDE_PLM_BLR_BuyWindow model = await buyRepository.GetModel(Year, Season); return(Ok(model)); }
public async Task <object> GetModel(int id) { SIDE_PLM_BLR_BuyWindow model = await buyRepository.GetModel(id); return(Ok(model)); }
public async Task <object> GetNewestBuyWindow() { SIDE_PLM_BLR_BuyWindow entity = await buyRepository.GetNewestBuyWindow(); return(Ok(entity)); }
public string NewBuyingWindow(SIDE_PLM_BLR_BuyWindow model) { return(JsonConvert.SerializeObject(buyRepository.NewBuyWindowSP(model))); }