public ActionResult AddTrainingAndSeminar(TrainingAndSeminar _trainingAndSeminar, string hdTrainingAndSeminarID)
 {
     if (hdTrainingAndSeminarID == "")
     {
         _trainingAndSeminar.OrganizationID = HCRGCLIENT.OrganizationID;
         var _trainingAndSeminarPolicyID = _NewsService.AddTrainingAndSeminar(Mapper.Map <HCRGUniversityMgtApp.NEPService.NewsService.TrainingAndSeminar>(_trainingAndSeminar));
         _trainingAndSeminar.OrganizationName     = (_clientService.GetOrganizationByID(HCRGCLIENT.OrganizationID)).OrganizationName;
         _trainingAndSeminar.TrainingAndSeminarID = _trainingAndSeminarPolicyID;
         _trainingAndSeminar.flag = true;
         Regex regex = new Regex("\\<[^\\>]*\\>");
         _trainingAndSeminar.DescriptionShort = regex.Replace(HttpUtility.HtmlDecode(_trainingAndSeminar.TrainingAndSeminarDesc), String.Empty);
         _trainingAndSeminar.DescriptionShort = _trainingAndSeminar.DescriptionShort.Replace("&nbsp;", "");
         if (_trainingAndSeminar.DescriptionShort.Length > 1000)
         {
             _trainingAndSeminar.DescriptionShort = _trainingAndSeminar.DescriptionShort.Substring(0, 1000);
         }
     }
     else
     {
         _trainingAndSeminar.TrainingAndSeminarID = Convert.ToInt32(hdTrainingAndSeminarID);
         var privacyPolicyID = _NewsService.UpdateTrainingAndSeminar(Mapper.Map <HCRGUniversityMgtApp.NEPService.NewsService.TrainingAndSeminar>(_trainingAndSeminar));
         _trainingAndSeminar.flag = false;
         Regex regex = new Regex("\\<[^\\>]*\\>");
         _trainingAndSeminar.DescriptionShort = regex.Replace(HttpUtility.HtmlDecode(_trainingAndSeminar.TrainingAndSeminarDesc), String.Empty);
         _trainingAndSeminar.DescriptionShort = _trainingAndSeminar.DescriptionShort.Replace("&nbsp;", "");
         if (_trainingAndSeminar.DescriptionShort.Length > 1000)
         {
             _trainingAndSeminar.DescriptionShort = _trainingAndSeminar.DescriptionShort.Substring(0, 1000);
         }
     }
     return(Json(_trainingAndSeminar, GlobalConst.Message.text_html));
 }
Example #2
0
        public ActionResult Index(string returnUrl, LoginViewModel model)
        {
            ModelState.Clear();


            if (Session["Org"] == null)
            {
                var          _organizationID = HCRGUser != null ? HCRGUser.OrganizationID : (Convert.ToInt32(_encryptionService.DecryptString2(System.Configuration.ConfigurationManager.AppSettings["OrganizationID"])));
                Organization objOrganization = new Organization();
                objOrganization           = Mapper.Map <Organization>(_clientService.GetOrganizationByID(_organizationID));
                objOrganization.LogoImage = GlobalConst.FolderName.Storage + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.FolderName.Org + _organizationID + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.FolderName.LogoImage + GlobalConst.ConstantChar.ForwardSlash + objOrganization.LogoImage;
                Session["Org"]            = objOrganization;
            }


            User user = new User();

            try
            {
                if (this.Request.RawUrl.ToLower() != "/studentportal/Index" && returnUrl == null)
                {
                    model.PreviousLog = this.Request.UrlReferrer.AbsolutePath;
                }
            }
            catch
            {
                model.PreviousLog = returnUrl;
            }
            return(View(model));
        }
Example #3
0
        public ActionResult Pay()
        {
            ShippingPaymentViewModel _shippingPaymentViewModel = new ShippingPaymentViewModel();
            PaypalDetail             _paypalmodel = new PaypalDetail();

            _shippingPaymentViewModel.BillingAddressResults = Mapper.Map <HCRGUniversityApp.Domain.Models.ShippingPayment.BillingAddress>(_shippingPaymentService.getBillingAddressByUserID(HCRGUser.UID));
            string RegisteredEmail = _clientService.GetOrganizationByID(HCRGUser.OrganizationID).RegisteredPaypalEmailID;
            string statename       = _commonService.getStateByID(_shippingPaymentViewModel.BillingAddressResults.BAStateID);
            string coursenames     = _shoppingeducationService.GetShoppingCartCoursesByUserID(HCRGUser.UID);

            _paypalmodel.ProductName    = coursenames;
            _paypalmodel.email          = HCRGUser.EmailID;
            _paypalmodel.business       = RegisteredEmail;
            _paypalmodel.Amount         = Convert.ToDecimal(TempData["TotalAmount"]);
            _paypalmodel.CurrencyCode   = _iEncryptionService.EncryptString(System.Configuration.ConfigurationManager.AppSettings["CurrencyCode"]);
            _paypalmodel.CurrencySymbol = _iEncryptionService.EncryptString(System.Configuration.ConfigurationManager.AppSettings["CurrencySymbol"]);
            _paypalmodel.notify_url     = System.Configuration.ConfigurationManager.AppSettings["ReSetUrl"] + "/ShippingPayment/IPN";
            _paypalmodel.cancel_url     = System.Configuration.ConfigurationManager.AppSettings["ReSetUrl"] + "" + "/ShoppingCart/Index";
            _paypalmodel.return_url     = System.Configuration.ConfigurationManager.AppSettings["ReSetUrl"] + "" + "/ShippingPayment/IPN";
            _paypalmodel.first_name     = _shippingPaymentViewModel.BillingAddressResults.BAFirstName;
            _paypalmodel.last_name      = _shippingPaymentViewModel.BillingAddressResults.BALastName;
            _paypalmodel.address1       = _shippingPaymentViewModel.BillingAddressResults.BAAddress;
            _paypalmodel.city           = _shippingPaymentViewModel.BillingAddressResults.BACity;
            _paypalmodel.state          = statename;
            _paypalmodel.zip            = _shippingPaymentViewModel.BillingAddressResults.BAPostalCode;
            _paypalmodel.UserID         = HCRGUser.UID.ToString();
            _paypalmodel.cmd            = "_xclick";
            _paypalmodel.URL            = PaypalUrl();
            return(View(_paypalmodel));
        }
Example #4
0
        public ActionResult Login(Client _client)
        {
            ModelState.Clear();
            User _user  = new User();
            var  client = (_clientService.GetClientByClientName(_client.EmailID));

            if (client != null)
            {
                if (_client.EmailID == client.EmailID && _encryptionService.VerifyHashedPassword(_client.Password, client.Password))
                {
                    client.Password = null;
                    client.EmailID  = null;
                    HCRGCLIENT      = Mapper.Map <Client>(client);
                    int orgID    = Int16.Parse(client.OrganizationID);
                    var _orgData = _clientService.GetOrganizationByID(orgID);
                    if (client.ClientTypeID == 2 && _orgData.MenuIDs != null)
                    {
                        var _menuIDS = _orgData.MenuIDs.Split(',');
                        HCRGCLIENT.ClientMenuIDS = _menuIDS.ToList();
                    }
                    _clientService.UpdateClientSessionIDByClientID(client.ClientID, this.Session.SessionID);
                    if (_orgData.LogoImage != null)
                    {
                        HCRGCLIENT.LogoPath = GlobalConst.FolderName.Storage + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.FolderName.Org + orgID + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.FolderName.LogoImage + GlobalConst.ConstantChar.ForwardSlash + _orgData.LogoImage;
                    }
                    return(RedirectToAction(GlobalConst.Actions.HomeContentController.Index, GlobalConst.Controllers.Home, new { area = "" }));
                }
            }
            TempData["Message"] = GlobalConst.Message.InvalidCredentials;
            return(RedirectToAction("Index"));
        }
        public ActionResult IndustryResearch()
        {
            var _res = _clientService.GetOrganizationByID(HCRGUser != null ? HCRGUser.OrganizationID : int.Parse(_encryptionService.DecryptString2(System.Configuration.ConfigurationManager.AppSettings["OrganizationID"])));

            if (_res != null)
            {
                if (_res.MenuIDs != null)
                {
                    if (!_res.MenuIDs.Contains("5"))
                    {
                        return(RedirectToAction(GlobalConst.Actions.UserController.UnauthorisePage, GlobalConst.Controllers.User, new { area = "" }));
                    }
                }
            }
            IndustryResearch industryResearch = new IndustryResearch();

            industryResearch = Mapper.Map <IndustryResearch>(_newsService.GetIndustryResearchContent(HCRGUser != null ? HCRGUser.OrganizationID : (Convert.ToInt32(_encryptionService.DecryptString2(System.Configuration.ConfigurationManager.AppSettings["OrganizationID"])))));
            string decodedHTML = HttpUtility.HtmlDecode(industryResearch.IndustryResearchContent);

            if (decodedHTML != null)
            {
                industryResearch.IndustryResearchContent = decodedHTML.Replace(GlobalConst.Message.SlashStoragePath, GlobalConst.Message.StoragePath);
                industryResearch.IndustryResearchContent = industryResearch.IndustryResearchContent.Replace("/richtexteditor/", GlobalConst.Extension.http + GlobalConst.ConstantChar.Colon + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.ConstantChar.ForwardSlash + Request.Url.Host.ToLower() + GlobalConst.ConstantChar.Colon + Request.Url.Port + "/richtexteditor/");
                industryResearch.IndustryResearchContent = industryResearch.IndustryResearchContent.Replace("&nbsp;", "");
            }
            else
            {
                industryResearch.IndustryResearchContent = decodedHTML;
            }
            return(View(industryResearch));
        }
 public ActionResult Update(Certification Certification, string hdCertificationID)
 {
     if (hdCertificationID == "")
     {
         Certification.OrganizationID = HCRGCLIENT.OrganizationID;
         var certificateID = _NewsService.AddCertification(Mapper.Map <HCRGUniversityMgtApp.NEPService.NewsService.Certification>(Certification));
         Certification.OrganizationName = (_clientService.GetOrganizationByID(HCRGCLIENT.OrganizationID)).OrganizationName;
         Certification.CertificationID  = certificateID;
         Certification.flag             = true;
         Regex regex = new Regex("\\<[^\\>]*\\>");
         Certification.DescriptionShort = regex.Replace(HttpUtility.HtmlDecode(Certification.CertificationContent), String.Empty);
         Certification.DescriptionShort = Certification.DescriptionShort.Replace("&nbsp;", "");
         if (Certification.DescriptionShort.Length > 1000)
         {
             Certification.DescriptionShort = Certification.DescriptionShort.Substring(0, 1000);
         }
     }
     else
     {
         Certification.CertificationID = Convert.ToInt32(hdCertificationID);
         var certificateID = _NewsService.UpdateCertification(Mapper.Map <HCRGUniversityMgtApp.NEPService.NewsService.Certification>(Certification));
         Certification.flag = false;
         Regex regex = new Regex("\\<[^\\>]*\\>");
         Certification.DescriptionShort = regex.Replace(HttpUtility.HtmlDecode(Certification.CertificationContent), String.Empty);
         Certification.DescriptionShort = Certification.DescriptionShort.Replace("&nbsp;", "");
         if (Certification.DescriptionShort.Length > 1000)
         {
             Certification.DescriptionShort = Certification.DescriptionShort.Substring(0, 1000);
         }
     }
     return(Json(Certification, GlobalConst.Message.text_html));
 }
Example #7
0
        public ActionResult AddUserSubscription(UserSubscription _userSubscription)
        {
            UserSubscription userSubscription = new UserSubscription();

            if (_userSubscription.EncryptedUserSubscriptionID != null)
            {
                _userSubscription.UserSubscriptionID = Convert.ToInt32(DecryptString(_userSubscription.EncryptedUserSubscriptionID));
                userSubscription = Mapper.Map <UserSubscription>(_userService.GetUserSubscriptionByID(_userSubscription.UserSubscriptionID));
            }
            _userSubscription.CreatedOn = DateTime.Now;
            _userSubscription.IndividualAccessTermsOfService = _userSubscription.AllAccessTermsOfService;
            if (!_userSubscription.AllAccessIncludeProgram.HasValue)
            {
                _userSubscription.AllAccessIncludeProgram = false;
            }


            if (userSubscription != null)
            {
                if ((
                        _userSubscription.AllAccessParametersCoursePriceEnd == userSubscription.AllAccessParametersCoursePriceEnd) &&
                    (_userSubscription.AllAccessParametersCoursePriceStart == userSubscription.AllAccessParametersCoursePriceStart) &&
                    (_userSubscription.AllAccessPassPricing == userSubscription.AllAccessPassPricing) &&
                    (_userSubscription.EnterprisePricing == userSubscription.EnterprisePricing)
                    )
                {
                    _userSubscription.UserSubscriptionID = Convert.ToInt32(DecryptString(_userSubscription.EncryptedUserSubscriptionID));;
                    var _UserSubscriptionID = _userService.UpdateUserSubscription(Mapper.Map <HCRGUniversityMgtApp.NEPService.UserService.UserSubscription>(_userSubscription));
                    _userSubscription.Mode = "Update";
                }
                else
                {
                    var OrgData = Mapper.Map <Organization>(_clientService.GetOrganizationByID(HCRGCLIENT.OrganizationID));
                    _userSubscription.OrganizationID = OrgData.OrganizationID;
                    var _UserSubscriptionID = _userService.AddUserSubscription(Mapper.Map <HCRGUniversityMgtApp.NEPService.UserService.UserSubscription>(_userSubscription));
                    _userSubscription.Mode = "Add";
                }
            }
            else
            {
                var OrgData = Mapper.Map <Organization>(_clientService.GetOrganizationByID(HCRGCLIENT.OrganizationID));
                _userSubscription.OrganizationID = OrgData.OrganizationID;
                var _UserSubscriptionID = _userService.AddUserSubscription(Mapper.Map <HCRGUniversityMgtApp.NEPService.UserService.UserSubscription>(_userSubscription));
                _userSubscription.Mode = "Add";
            }
            return(Json(_userSubscription, GlobalConst.Message.text_html));
        }
Example #8
0
 public ActionResult Add(Event _Event)
 {
     if (_Event.EventID == 0)
     {
         _Event.OrganizationID   = HCRGCLIENT.OrganizationID;
         _Event.OrganizationName = (_clientService.GetOrganizationByID(HCRGCLIENT.OrganizationID)).OrganizationName;
         _Event.EventID          = _NewsService.AddEvent(Mapper.Map <HCRGUniversityMgtApp.NEPService.NewsService.Event>(_Event));
         _Event.flag             = true;
     }
     else
     {
         _Event.OrganizationID   = _Event.OrganizationID;
         _Event.OrganizationName = (_clientService.GetOrganizationByID(_Event.OrganizationID)).OrganizationName;
         int EventID = _NewsService.UpdateEvent(Mapper.Map <HCRGUniversityMgtApp.NEPService.NewsService.Event>(_Event));
         _Event.flag = false;
     }
     return(Json(_Event, GlobalConst.Message.text_html));
 }
Example #9
0
        public JsonResult AddNews(string newsTitle, string newsSectionID, string newsDescription, string newsEditorPick, string newsType, string newsVideo, int newsID, string newsAuthor, string organizationName, int organizationID)
        {
            News news = new News();

            if (newsID == 0)
            {
                NewsVideo newsVideoobj = new NewsVideo();
                news.NewsSectionID    = Convert.ToInt32(newsSectionID);
                news.NewsTitle        = newsTitle;
                news.NewsType         = newsType;
                news.NewsDate         = DateTime.Now;
                news.NewsDescription  = newsDescription;
                news.NewsAuthor       = newsAuthor;
                news.OrganizationName = (_clientService.GetOrganizationByID(HCRGCLIENT.OrganizationID)).OrganizationName;
                news.NewsEditorPick   = Convert.ToBoolean(newsEditorPick);
                Regex regex = new Regex("\\<[^\\>]*\\>");
                news.NewsDescriptionShort = regex.Replace(HttpUtility.HtmlDecode(newsDescription), String.Empty);
                news.NewsDescriptionShort = news.NewsDescriptionShort.Replace("&nbsp;", "");
                if (news.NewsDescriptionShort.Length > 1000)
                {
                    news.NewsDescriptionShort = news.NewsDescriptionShort.Substring(0, 1000);
                }
                news.OrganizationID = HCRGCLIENT.OrganizationID;
                news.NewsID         = _NewsService.AddNews(Mapper.Map <HCRGUniversityMgtApp.NEPService.NewsService.News>(news));
                if (newsType == "Video")
                {
                    newsVideoobj.NewsID     = news.NewsID;
                    newsVideoobj.NewsVideos = newsVideo;
                    var NewsVideoID = _NewsService.AddNewsVideo(Mapper.Map <HCRGUniversityMgtApp.NEPService.NewsService.NewsVideo>(newsVideoobj));
                }
                news.msg = news.NewsID.ToString() + "," + "Added";
            }
            else
            {
                news.NewsSectionID    = Convert.ToInt32(newsSectionID);
                news.NewsTitle        = newsTitle;
                news.NewsDescription  = newsDescription;
                news.NewsAuthor       = newsAuthor;
                news.NewsEditorPick   = Convert.ToBoolean(newsEditorPick);
                news.NewsID           = Convert.ToInt32(newsID);
                news.NewsType         = newsType;
                news.NewsDate         = DateTime.Now;
                news.OrganizationName = organizationName;
                news.OrganizationID   = organizationID;
                Regex regex = new Regex("\\<[^\\>]*\\>");
                news.NewsDescriptionShort = regex.Replace(HttpUtility.HtmlDecode(newsDescription), String.Empty);
                news.NewsDescriptionShort = news.NewsDescriptionShort.Replace("&nbsp;", "");
                if (news.NewsDescriptionShort.Length > 1000)
                {
                    news.NewsDescriptionShort = news.NewsDescriptionShort.Substring(0, 1000);
                }
                _NewsService.UpdateNews(Mapper.Map <HCRGUniversityMgtApp.NEPService.NewsService.News>(news));
                news.msg = news.NewsID.ToString() + "," + "Updated";
            }
            return(Json(news, JsonRequestBehavior.AllowGet));
        }
Example #10
0
        public ActionResult Detail(string _OrganizationID)
        {
            Organization objOrganization = new Organization();

            if (_OrganizationID != "")
            {
                int _id = Convert.ToInt16(DecryptString(_OrganizationID.ToString()));
                objOrganization           = Mapper.Map <Organization>(_clientService.GetOrganizationByID(_id));
                objOrganization.LogoImage = GlobalConst.FolderName.Storage + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.FolderName.Org + objOrganization.OrganizationID + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.FolderName.LogoImage + GlobalConst.ConstantChar.ForwardSlash + objOrganization.LogoImage;
                if (objOrganization.FaviconImage != null)
                {
                    objOrganization.FaviconImage = GlobalConst.FolderName.Storage + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.FolderName.Org + objOrganization.OrganizationID + GlobalConst.ConstantChar.ForwardSlash + GlobalConst.FolderName.FaviconImage + GlobalConst.ConstantChar.ForwardSlash + objOrganization.FaviconImage;
                }
                objOrganization.EncryptedOrganizationID = _OrganizationID;
                objOrganization.ClientTypeID            = HCRGCLIENT.ClientTypeID;
            }
            else
            {
                objOrganization.ClientTypeID = HCRGCLIENT.ClientTypeID;
            }
            return(View(objOrganization));
        }
Example #11
0
 public ActionResult AddCarousel(DomainModelCarousel.CarouselSetUp modelCarouselSetup)
 {
     modelCarouselSetup.OrganizationID = HCRGCLIENT.OrganizationID;
     if (modelCarouselSetup.CarouselID == 0)
     {
         modelCarouselSetup.OrganizationName = (_clientService.GetOrganizationByID(HCRGCLIENT.OrganizationID)).OrganizationName;
         var result = _carouselNewsService.AddCarouselSetup(Mapper.Map <HCRGUniversityMgtApp.NEPService.NewsService.CarouselSetUp>(modelCarouselSetup));
         modelCarouselSetup.CarouselID      = result;
         modelCarouselSetup.NewsDescription = "Add";
     }
     else if (modelCarouselSetup.CarouselID != 0)
     {
         var result = _carouselNewsService.UpdateCarouselSetUp(Mapper.Map <HCRGUniversityMgtApp.NEPService.NewsService.CarouselSetUp>(modelCarouselSetup));
         modelCarouselSetup.NewsDescription = "Update";
     }
     return(Json(modelCarouselSetup));
 }
 public ActionResult Add(Accreditor accreditor)
 {
     if (accreditor.AccreditorID == 0)
     {
         accreditor.IsActive         = true;
         accreditor.OrganizationID   = HCRGCLIENT.OrganizationID;
         accreditor.OrganizationName = (_clientService.GetOrganizationByID(HCRGCLIENT.OrganizationID)).OrganizationName;
         accreditor.AccreditorID     = _educationService.AddAccreditor(Mapper.Map <HCRGUniversityMgtApp.NEPService.EducationService.Accreditor>(accreditor));
         accreditor.flag             = true;
     }
     else
     {
         int accreditorId = _educationService.UpdateAccreditor(Mapper.Map <HCRGUniversityMgtApp.NEPService.EducationService.Accreditor>(accreditor));
         accreditor.flag = false;
     }
     return(Json(accreditor, GlobalConst.Message.text_html));
 }
 public ActionResult Add(FAQ Faq, string hdFAQID)
 {
     if (hdFAQID == "")
     {
         var FaqID = _NewsService.AddFAQ(Mapper.Map <HCRGUniversityMgtApp.NEPService.NewsService.FAQ>(Faq));
         Faq.OrganizationName = (_clientService.GetOrganizationByID(HCRGCLIENT.OrganizationID)).OrganizationName;
         Faq.FAQID            = FaqID;
         Faq.flag             = true;
     }
     else
     {
         Faq.OrganizationID = Faq.OrganizationID;
         Faq.FAQID          = Convert.ToInt32(hdFAQID);
         var FaqID = _NewsService.UpdateFAQ(Mapper.Map <HCRGUniversityMgtApp.NEPService.NewsService.FAQ>(Faq));
         Faq.flag = false;
     }
     return(Json(Faq, GlobalConst.Message.text_html));
 }
Example #14
0
 public ActionResult Add(College college, string CollegeID)
 {
     if (CollegeID == "")
     {
         college.OrganizationName = (_clientService.GetOrganizationByID(HCRGCLIENT.OrganizationID)).OrganizationName;
         college.ClientID         = HCRGCLIENT.ClientID;
         college.IsActive         = true;
         college.flag             = true;
         college.ClientID         = HCRGCLIENT.ClientID;
         var collegeID = _CollegeService.AddCollege(Mapper.Map <HCRGUniversityMgtApp.NEPService.CollegeService.College>(college));
         college.CollegeID = collegeID;
     }
     else
     {
         var collegeID = _CollegeService.UpdateCollege(Mapper.Map <HCRGUniversityMgtApp.NEPService.CollegeService.College>(college));
         college.CollegeID = Convert.ToInt32(CollegeID);
         college.flag      = false;
     }
     return(Json(college, GlobalConst.Message.text_html));
 }
Example #15
0
        public ActionResult Add(EducationFormat educationformat, string hdEducationFormatID)
        {
            EducationFormatViewModel educationModel = new EducationFormatViewModel();

            if (hdEducationFormatID == "")
            {
                educationformat.OrganizationName = (_clientService.GetOrganizationByID(HCRGCLIENT.OrganizationID)).OrganizationName;
                educationformat.ClientID         = HCRGCLIENT.ClientID;
                var educationFormatID = _educationService.AddEducationFormat(Mapper.Map <HCRGUniversityMgtApp.NEPService.EducationService.EducationFormat>(educationformat));
                educationformat.EducationFormatID = educationFormatID;

                educationformat.flag = true;
            }
            else
            {
                educationformat.EducationFormatID = Convert.ToInt32(hdEducationFormatID);
                var aboutusID = _educationService.UpdateEducationFormat(Mapper.Map <HCRGUniversityMgtApp.NEPService.EducationService.EducationFormat>(educationformat));
                educationformat.flag = false;
            }
            return(Json(educationformat, GlobalConst.Message.text_html));
        }
        public ActionResult Add(Profession profession, string hdProfessionID)
        {
            ProfessionViewModel ProfessionModel = new ProfessionViewModel();

            if (hdProfessionID == "")
            {
                profession.ClientID         = HCRGCLIENT.ClientID;
                profession.OrganizationName = (_clientService.GetOrganizationByID(HCRGCLIENT.OrganizationID)).OrganizationName;
                profession.IsActive         = true;
                var ProfessionID = _educationService.AddProfession(Mapper.Map <HCRGUniversityMgtApp.NEPService.EducationService.Profession>(profession));
                profession.ProfessionID = ProfessionID;

                profession.flag = true;
            }
            else
            {
                profession.ProfessionID = Convert.ToInt32(hdProfessionID);
                var ProfessionID = _educationService.UpdateProfession(Mapper.Map <HCRGUniversityMgtApp.NEPService.EducationService.Profession>(profession));
                profession.flag = false;
            }
            return(Json(profession, GlobalConst.Message.text_html));
        }
        public ActionResult Add(AboutUs aboutus, string hdAboutUsID)
        {
            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();

            AboutUsViewModel aboutusModel = new AboutUsViewModel();

            if (hdAboutUsID == "")
            {
                aboutus.OrganizationID = HCRGCLIENT.OrganizationID;
                var aboutusID = _aboutusService.AddAboutUs(Mapper.Map <HCRGUniversityMgtApp.NEPService.AboutUsService.AboutUs>(aboutus));
                aboutus.AboutUsID        = aboutusID;
                aboutus.OrganizationName = (_clientService.GetOrganizationByID(HCRGCLIENT.OrganizationID)).OrganizationName;
                aboutus.flag             = true;
                Regex regex = new Regex("\\<[^\\>]*\\>");
                aboutus.DescriptionShort = regex.Replace(HttpUtility.HtmlDecode(aboutus.Description), String.Empty);
                aboutus.DescriptionShort = aboutus.DescriptionShort.Replace("&nbsp;", "");
                if (aboutus.DescriptionShort.Length > 1000)
                {
                    aboutus.DescriptionShort = aboutus.DescriptionShort.Substring(0, 1000);
                }
            }
            else
            {
                aboutus.AboutUsID = Convert.ToInt32(hdAboutUsID);
                var aboutusID = _aboutusService.UpdateAboutUs(Mapper.Map <HCRGUniversityMgtApp.NEPService.AboutUsService.AboutUs>(aboutus));
                aboutus.flag = false;
                Regex regex = new Regex("\\<[^\\>]*\\>");
                aboutus.DescriptionShort = regex.Replace(HttpUtility.HtmlDecode(aboutus.Description), String.Empty);
                aboutus.DescriptionShort = aboutus.DescriptionShort.Replace("&nbsp;", "");
                if (aboutus.DescriptionShort.Length > 1000)
                {
                    aboutus.DescriptionShort = aboutus.DescriptionShort.Substring(0, 1000);
                }
            }
            return(Json(aboutus, GlobalConst.Message.text_html));
        }