public ActionResult GetAllPagedAboutus(int skip, int?take)
        {
            HCRGUniversityMgtApp.Domain.Models.Client.Client clientSession = (HCRGUniversityMgtApp.Domain.Models.Client.Client)Session[GlobalConst.SessionKeys.CLIENT];
            PagedAboutUs aboutusModel = new PagedAboutUs();

            if (take == null)
            {
                aboutusModel = Mapper.Map <PagedAboutUs>(_aboutusService.GetAllPagedAboutus(skip, GlobalConst.Records.Take, clientSession.ClientID));
            }
            else
            {
                aboutusModel = Mapper.Map <PagedAboutUs>(_aboutusService.GetAllPagedAboutus(skip, take.Value, clientSession.ClientID));
            }

            foreach (AboutUs viewmodel in aboutusModel.AboutUsRecords)
            {
                Regex regex = new Regex("\\<[^\\>]*\\>");
                viewmodel.DescriptionShort = regex.Replace(HttpUtility.HtmlDecode(viewmodel.Description), String.Empty);
                viewmodel.DescriptionShort = viewmodel.DescriptionShort.Replace("&nbsp;", "");
                if (viewmodel.DescriptionShort.Length > 1000)
                {
                    viewmodel.DescriptionShort = viewmodel.DescriptionShort.Substring(0, 1000);
                }
            }
            aboutusModel.PagedRecords = GlobalConst.Records.Take;
            return(Json(aboutusModel, GlobalConst.Message.text_html));
        }
        public ActionResult Index()
        {
            Editor Editor1 = new Editor(System.Web.HttpContext.Current, "Editor1");

            Editor1.ClientFolder = "/richtexteditor/";
            Editor1.Width        = Unit.Pixel(1050);
            Editor1.Height       = Unit.Pixel(660);
            Editor1.ResizeMode   = RTEResizeMode.Disabled;

            Editor1.SetSecurity("Gallery", "newimagepath", "AllowAccess", "true");
            Editor1.SetSecurity("Gallery", "newimagepath", "StoragePath", "~" + GlobalConst.FolderName.Storage + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.FolderName.Org + HCRGCLIENT.OrganizationID + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.FolderName.RTEUpload, true);
            Editor1.SetSecurity("Gallery", "newimagepath ", "StorageName", "Image Files");

            Editor1.SetSecurity("Image", "newimagepath", "AllowAccess", "true");
            Editor1.SetSecurity("Image", "newimagepath", "StoragePath", "~" + GlobalConst.FolderName.Storage + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.FolderName.Org + HCRGCLIENT.OrganizationID + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.FolderName.RTEUpload, true);
            Editor1.SetSecurity("Image", "newimagepath ", "StorageName", "Image Files");

            Editor1.SetSecurity("Video", "newimagepath", "AllowAccess", "true");
            Editor1.SetSecurity("Video", "newimagepath", "StoragePath", "~" + GlobalConst.FolderName.Storage + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.FolderName.Org + HCRGCLIENT.OrganizationID + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.FolderName.RTEUpload, true);
            Editor1.SetSecurity("Video", "newimagepath ", "StorageName", "Video Files");

            Editor1.SetSecurity("Document", "newimagepath", "AllowAccess", "true");
            Editor1.SetSecurity("Document", "newimagepath", "StoragePath", "~" + GlobalConst.FolderName.Storage + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.FolderName.Org + HCRGCLIENT.OrganizationID + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.FolderName.RTEUpload, true);
            Editor1.SetSecurity("Document", "newimagepath ", "StorageName", "Document Files");

            Editor1.SetSecurity("Template", "newimagepath", "AllowAccess", "true");
            Editor1.SetSecurity("Template", "newimagepath", "StoragePath", "~" + GlobalConst.FolderName.Storage + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.FolderName.Org + HCRGCLIENT.OrganizationID + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.FolderName.RTEUpload, true);
            Editor1.SetSecurity("Template", "newimagepath ", "StorageName", "Templates");


            Editor1.DisabledItems = "save, help";
            string content = Request.Form["Editor1"];

            Editor1.MvcInit();
            ViewData["Editor"] = Editor1.MvcGetString();

            PagedAboutUs aboutusModel = new PagedAboutUs();

            aboutusModel.AboutUsRecords = Mapper.Map <IEnumerable <AboutUs> >(_aboutusService.GetAllAboutUsByOrganizationID(0, HCRGCLIENT.ClientID));

            //aboutusModel = Mapper.Map<PagedAboutUs>(_aboutusService.GetAllPagedAboutus(GlobalConst.Records.Skip, GlobalConst.Records.Take, HCRGCLIENT.OrganizationID));
            foreach (AboutUs viewmodel in aboutusModel.AboutUsRecords)
            {
                Regex regex = new Regex("\\<[^\\>]*\\>");
                viewmodel.DescriptionShort = regex.Replace(HttpUtility.HtmlDecode(viewmodel.Description), String.Empty);
                viewmodel.DescriptionShort = viewmodel.DescriptionShort.Replace("&nbsp;", "");
                if (viewmodel.DescriptionShort.Length > 1000)
                {
                    viewmodel.DescriptionShort = viewmodel.DescriptionShort.Substring(0, 1000);
                }
            }
            if (HCRGCLIENT.ClientTypeID == 1)
            {
                aboutusModel.IsHCRGAdmin = true;
            }
            else
            {
                aboutusModel.IsHCRGAdmin = false;
            }
            aboutusModel.PagedRecords = GlobalConst.Records.Take;
            return(View(aboutusModel));
        }