/// <summary> /// This method sets Session Variables /// </summary> private void LoadMasterDataIntoSession() { try { if (SessionManager.PromotionList == null) { List <Promotion> promotionList = new MasterService().GetPromotions(); SessionManager.PromotionList = promotionList; } if (SessionManager.PromotionDetailsList == null) { List <PromotionDetails> promotionDetailsList = new MasterService().GetAllPromotionDetailsByPromotionId(); SessionManager.PromotionDetailsList = promotionDetailsList; } if (SessionManager.PromotionTypeList == null) { List <PromotionType> promotionTypeList = new MasterService().GetPromotionTypes(); SessionManager.PromotionTypeList = promotionTypeList; } if (SessionManager.SkuList == null) { List <SkuModel> skuList = new MasterService().GetAllSku(); SessionManager.SkuList = skuList; } SessionManager.IsItemLocked = false; } catch (Exception ex) { ///Handle Method Specific Exception if any.... ///Log4Net or NLog packages can be used for logging events... } }
public PurchaseOrderService() { _service = new MasterService(); }