コード例 #1
0
ファイル: CaseStudies.aspx.cs プロジェクト: nkdram/TestRep
    private void GetRequestQuote()
    {
        RequestQuoteRepository rightSectionRepository = new RequestQuoteRepository();
        requestQuote = rightSectionRepository.GetRequestQuote(GeneralExtensions.GetQueryStringId());

        rptquoteRequest.DataSource = requestQuote.GetQuoteRequest;
        rptquoteRequest.DataBind();
    }
コード例 #2
0
ファイル: EktronUpgrade.aspx.cs プロジェクト: nkdram/TestRep
    protected void Page_Load(object sender, EventArgs e)
    {
        string requestQuoteKey = "requestQuote";
        if (HttpContext.Current.Cache[requestQuoteKey] == null)
        {
            RequestQuoteRepository rightSectionRepository = new RequestQuoteRepository();
            long requestQuoteId = GeneralExtensions.GetQueryStringId();
            if (requestQuoteId == 0) requestQuoteId = 125;
            requestQuote = rightSectionRepository.GetRequestQuote(requestQuoteId);
            if (requestQuote != null)
                HttpContext.Current.Cache.Insert(requestQuoteKey, requestQuote, null, DateTime.Now.AddMinutes("CacheDuration".GetAppKeyDouble()), TimeSpan.Zero);
        }
        else
        {
            requestQuote = (RequestQuote)HttpContext.Current.Cache[requestQuoteKey];
        }

        rptquoteRequest.DataSource = requestQuote.GetQuoteRequest;
        rptquoteRequest.DataBind();
    }