public JsonResult GetDescription(int typeID)
        {
            var objENContent = new enContent()
            {
                Type = typeID
            };
            var objBLContent = new blContent(objENContent);

            try
            {
                objBLContent.Read();
            }
            catch (Exception ex)
            {
            }
            return(Json(objENContent, JsonRequestBehavior.AllowGet));
        }
        public ActionResult Create(enContent enContent_)
        {
            var objENContent = new enContent()
            {
                Type = enContent_.Type
            };
            var objBLContent = new blContent(objENContent);

            try
            {
                objBLContent.Read();
            }
            catch (Exception ex)
            {
            }

            if (objENContent.ID > 0)
            {
                objBLContent          = new blContent(enContent_);
                enContent_.ID         = objENContent.ID;
                enContent_.InsertedOn = objENContent.InsertedOn;
                try
                {
                    objBLContent.Update();
                }
                catch (Exception ex)
                {
                }
            }

            else
            {
                objBLContent = new blContent(enContent_);
                try
                {
                    objBLContent.Create();
                }
                catch (Exception ex)
                {
                }
            }

            ViewBag.typeID = enContent_.Type;
            return(View());
        }
        public ActionResult TermsAndConditions()
        {
            var objENContent = new enContent()
            {
                Type = (int)ContentType.TermAndCondition
            };
            var objBLContent = new blContent(objENContent);

            try
            {
                objBLContent.Read();
            }
            catch (Exception ex)
            {
                Log.Error("Hangout.UI.Content.TermsAndConditions() Error while Read() Content");
            }

            //Advertisement Panel
            var objENAdvertisement = new enAdvertisement()
            {
                Content_ID = (int)ContentType.TermAndCondition
            };
            var objBLAdvertisement = new blAdvertisement(objENAdvertisement);
            List <enAdvertisement> listOfAdvertisements = new List <enAdvertisement>();

            try
            {
                listOfAdvertisements = objBLAdvertisement.ReadAll();
            }
            catch (Exception ex)
            {
                Log.Error("Hangout.UI.Content.About() Error while Read() Advertisement  Exception:- " + ex.ToString());
            }

            List <enAdvertisement> leftAdvPanel  = new List <enAdvertisement>();
            List <enAdvertisement> rightAdvPanel = new List <enAdvertisement>();

            foreach (var item in listOfAdvertisements.FindAll(x => x.Position == (int)PagePosition.LEFT))
            {
                if (item.Date_To <= DateTime.Now && item.Date_From >= DateTime.Now)
                {
                    if (item.Time_To <= DateTime.Now.TimeOfDay && item.Time_From >= DateTime.Now.TimeOfDay)
                    {
                        leftAdvPanel.Add(item);
                    }
                }
            }

            foreach (var item in listOfAdvertisements.FindAll(x => x.Position == (int)PagePosition.RIGHT))
            {
                if (item.Date_To <= DateTime.Now && item.Date_From >= DateTime.Now)
                {
                    if (item.Time_To <= DateTime.Now.TimeOfDay && item.Time_From >= DateTime.Now.TimeOfDay)
                    {
                        rightAdvPanel.Add(item);
                    }
                }
            }

            if (leftAdvPanel.Count > 0)
            {
                ViewBag.LeftAdvPanel = leftAdvPanel.FirstOrDefault();
            }
            if (rightAdvPanel.Count > 0)
            {
                ViewBag.RightAdvPanel = rightAdvPanel.FirstOrDefault();
            }
            return(View(objENContent));
        }