示例#1
0
        public ActionResult RetrieveImage(int AdId)
        {
            HttpCookie UserIdCookie = Request.Cookies["_RRUID"];
            Utility    en           = new Utility();

            if (UserIdCookie != null)
            {
                AdDetailsModel ModelINPUT = new AdDetailsModel();
                AdDetailsModel ModelOut   = new AdDetailsModel();
                ModelINPUT.AdID   = AdId;
                ModelINPUT.UserID = Convert.ToInt32(en.Decrypt(UserIdCookie["_RRUID"]));
                InformationServiceWrapper InfoObj = new InformationServiceWrapper();
                ModelOut = InfoObj.GetImage(ModelINPUT);

                if (ModelOut != null)
                {
                    return(File(ModelOut.Image, "image/jpg"));
                }
                else
                {
                    return(null);
                }
            }
            else
            {
                return(null);
            }
        }