예제 #1
0
        public ActionResult ExecuteNewsArticles(NewsInfo pNewsInfo)
        {
            try
            {
                if (SessionData.CurrentUser == null)
                {
                    return(Redirect("/"));
                }

                decimal preturn = 0;
                if (pNewsInfo == null)
                {
                    return(Json(new { status = -99 }));
                }
                string language     = AppsCommon.GetCurrentLang();
                var    ModifiedBy   = SessionData.CurrentUser == null ? "" : SessionData.CurrentUser.Username;
                var    ModifiedDate = CommonFuc.CurrentDate();
                if (pNewsInfo.pfileLogo != null)
                {
                    pNewsInfo.Imageheader = AppLoadHelpers.PushFileToServer(pNewsInfo.pfileLogo, AppUpload.Logo);
                }
                pNewsInfo.Languagecode = language;
                pNewsInfo.Modifiedby   = ModifiedBy;
                pNewsInfo.Modifieddate = ModifiedDate;
                var objNewsBL = new NewsBL();
                preturn = objNewsBL.ArticlesUpdate(pNewsInfo);

                return(Json(new { status = preturn }));
            }
            catch (Exception ex)
            {
                Logger.LogException(ex);
                return(View());
            }
        }