コード例 #1
0
        /// <summary>
        /// obtains a detail of mold
        /// </summary>
        /// <param name="id">identifier of mold</param>
        /// <returns>returns the result to action</returns>
        public ActionResult Detail(int?id)
        {
            MoldRepository objMold = new MoldRepository(SessionCustom);
            Mold           mold    = null;
            XmlDocument    xmlDoc  = null;

            if (id != null)
            {
                objMold.Entity.MoldId = id;
                objMold.Load();
                mold       = objMold.Entity;
                ViewBag.id = id;
                xmlDoc     = new XmlDocument();
                xmlDoc.LoadXml(objMold.Entity.Xmlcontent);
            }

            return(this.View(new Molde()
            {
                UserPrincipal = CustomUser,
                Module = this.Module,
                Mold = mold,
                ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext),
                CurrentLanguage = CurrentLanguage,
                Xmldocument = xmlDoc
            }));
        }
コード例 #2
0
        /// <summary>
        /// obtains a detail of modules module
        /// </summary>
        /// <param name="id">identifier of module</param>
        /// <returns>returns the result to action</returns>
        public ActionResult Detail(int?id)
        {
            ModulRepository objmod = new ModulRepository(SessionCustom);

            Domain.Entities.Modul objmodul = null;
            objmod.Entity.LanguageId = CurrentLanguage.LanguageId;

            if (id != null)
            {
                objmod.Entity.ModulId = id;
                objmod.Load();
                objmodul      = objmod.Entity;
                objmod.Entity = new Domain.Entities.Modul()
                {
                    LanguageId = CurrentLanguage.LanguageId
                };
                ViewBag.id = id;
            }

            return(this.View(new Modulos()
            {
                UserPrincipal = CustomUser,
                Module = this.Module,
                Modul = objmodul,
                ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext),
                CollModuls = objmod.GetAllReadOnly(),
                CurrentLanguage = CurrentLanguage
            }));
        }
コード例 #3
0
        /// <summary>
        /// obtains the role detail
        /// </summary>
        /// <param name="id">identifier of role</param>
        /// <returns>returns the result to action</returns>
        public ActionResult Detail(int?id)
        {
            RolRepository      objrol      = new RolRepository(SessionCustom);
            ModulRepository    objmod      = new ModulRepository(SessionCustom);
            RolmodulRepository objrolmodul = new RolmodulRepository(SessionCustom);

            objmod.Entity.LanguageId = CurrentLanguage.LanguageId.Value;
            Domain.Entities.Rol rol = null;

            if (id != null)
            {
                objrolmodul.Entity.RolId = objrol.Entity.RolId = id;
                objrol.Load();
                rol        = objrol.Entity;
                ViewBag.id = id;
            }

            return(this.View(new Roles()
            {
                UserPrincipal = CustomUser,
                Module = this.Module,
                RolCustom = rol,
                ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext),
                CollModuls = objmod.GetAllReadOnly(),
                CollRolmodul = id != null ? objrolmodul.GetAllReadOnly() : null,
                CurrentLanguage = CurrentLanguage
            }));
        }
コード例 #4
0
        /// <summary>
        /// gets the index of the idea report module
        /// </summary>
        /// <returns>returns the result to action</returns>
        public ActionResult Index()
        {
            IdeaReportRepository ideaReport = new IdeaReportRepository(SessionCustom);
            ModulRepository      modul      = new ModulRepository(SessionCustom);

            modul.Entity.ModulId    = 56;
            modul.Entity.LanguageId = CurrentLanguage.LanguageId;
            modul.Load();

            PaginInfo paginInfo = new PaginInfo()
            {
                PageIndex = 1
            };

            return(this.View(new Models.IdeaReport()
            {
                UserPrincipal = CustomUser,
                Module = modul.Entity,
                CollIdeaReport = ideaReport.GetAllPaging(null, paginInfo),
                ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext),
                Total = paginInfo.TotalCount,
                Controller = modul.Entity.Controller,
                CurrentLanguage = CurrentLanguage
            }));
        }
コード例 #5
0
        /// <summary>
        /// Obtiene las postulaciones
        /// </summary>
        /// <param name="page">page index</param>
        /// <param name="mod">Identificador del modulo</param>
        /// <param name="sectionId">Identificador de la seccion</param>
        /// <returns>Vista de las postulaciones</returns>
        public ActionResult List(int?page, int?mod, int?sectionId)
        {
            int total      = 0;
            int pageSize   = 10;
            int pageNumber = page ?? 1;
            SuccessStoryPostulateFacade        postulates = new SuccessStoryPostulateFacade();
            ModulRepository                    modul      = new ModulRepository(SessionCustom);
            List <SuccessStoryPostulatePaging> paging     = postulates.GetPaging(pageNumber, pageSize, out total, this.CurrentLanguage.LanguageId.Value).ToList();

            modul.Entity.ModulId    = mod;
            modul.Entity.LanguageId = this.CurrentLanguage.LanguageId;
            modul.Load();
            decimal nropagesdec = decimal.Parse(total.ToString()) / decimal.Parse(pageSize.ToString());
            decimal nropagesint = (int)(total / pageSize);

            this.ViewBag.CurrentPage = pageNumber;
            this.ViewBag.TotalRows   = total;
            this.ViewBag.SizePage    = pageSize;
            this.ViewBag.NroPages    = nropagesdec > nropagesint ? nropagesint + 1 : nropagesint;
            this.ViewBag.SectionId   = sectionId;

            return(this.View(
                       "List",
                       new SuccessStoryPostulateModel()
            {
                UserPrincipal = this.CustomUser,
                ListaSuccessStoryPostulate = paging,
                ColModul = CustomMemberShipProvider.GetModuls(this.CustomUser.UserId, this.SessionCustom, HttpContext),

                Module = modul.Entity,
                CurrentLanguage = this.CurrentLanguage,
            }));
        }
コード例 #6
0
        public ActionResult Detail(int id, int?mod, int?sectionId)
        {
            SuccessStoryPostulateFacade successStoryPostulateFacade = new SuccessStoryPostulateFacade();
            TagFacade       tagFacade = new TagFacade();
            ModulRepository modul     = new ModulRepository(SessionCustom);

            modul.Entity.ModulId    = mod;
            modul.Entity.LanguageId = this.CurrentLanguage.LanguageId;
            modul.Load();
            this.ViewBag.SectionId = sectionId;

            SuccessStoryPostulate successStoryPostulate = successStoryPostulateFacade.GetById(id, (int)this.CurrentLanguage.LanguageId);

            successStoryPostulate.State = (byte)SuccessStoryPostulateStateEnum.Pending;
            successStoryPostulateFacade.Update(successStoryPostulate);

            return(this.View(new DetailModel
            {
                SuccessStoryPostulate = successStoryPostulate,
                TagsText = string.Join(", ", tagFacade.GetBySuccessStoryPostulate(id).Select(t => t.Name)),
                UserPrincipal = this.CustomUser,
                ColModul = CustomMemberShipProvider.GetModuls(this.CustomUser.UserId, this.SessionCustom, HttpContext),
                Module = modul.Entity,
                CurrentLanguage = this.CurrentLanguage,
            }));
        }
コード例 #7
0
        /// <summary>
        /// gets the home of BlogEntry module
        /// </summary>
        /// <returns>returns the result to action</returns>
        public ActionResult Index()
        {
            SetLabel();
            Business.Services.CustomPrincipal currentUserInfo = (Business.Services.CustomPrincipal)User;
            if (Utils.IsBlogAdmin(currentUserInfo.UserId))
            {
                int mod       = 54;
                int sectionId = 34;

                ContentManagement  objcontentman = new ContentManagement(this.SessionCustom, HttpContext);
                SectionRepository  objsection    = new SectionRepository(this.SessionCustom);
                TemplateRepository objtemplate   = new TemplateRepository(this.SessionCustom);
                objtemplate.Entity.Type = 0;

                return(this.View(new BlogEntryModel()
                {
                    UserPrincipal = this.CustomUser,
                    Module = this.Module,
                    ColModul = CustomMemberShipProvider.GetModuls(this.CustomUser.UserId, this.SessionCustom, HttpContext),
                    Templates = objtemplate.GetAll().Select(t => t.TemplateId),
                    DeepFollower = Business.Utils.GetDeepFollower(objsection.GetAll(), sectionId),
                    IContent = new Domain.Entities.Content()
                    {
                        ModulId = mod,
                        SectionId = sectionId
                    },
                    CurrentLanguage = this.CurrentLanguage
                }));
            }

            return(null);
        }
コード例 #8
0
        /// <summary>
        /// gets the home of challenge module
        /// </summary>
        /// <param name="mod">identifier of module</param>
        /// <param name="sectionId">identifier of section</param>
        /// <returns>returns the result to action</returns>
        public ActionResult Index(int mod, int?sectionId)
        {
            ContentManagement  objcontentman = new ContentManagement(this.SessionCustom, HttpContext);
            SectionRepository  objsection    = new SectionRepository(this.SessionCustom);
            TemplateRepository objtemplate   = new TemplateRepository(this.SessionCustom);
            ContentRepository  objcontent    = new ContentRepository(SessionCustom);
            TagFacade          tagFacade     = new TagFacade();

            objtemplate.Entity.Type = 0;

            return(this.View(new ChallengeModel()
            {
                UserPrincipal = this.CustomUser,
                Module = this.Module,
                ColModul = CustomMemberShipProvider.GetModuls(this.CustomUser.UserId, this.SessionCustom, HttpContext),
                Templates = objtemplate.GetAll().Select(t => t.TemplateId),
                DeepFollower = sectionId != null ? Business.Utils.GetDeepFollower(objsection.GetAll(), sectionId.Value) : null,
                IContent = new Domain.Entities.Content()
                {
                    ModulId = mod,
                    SectionId = sectionId
                },
                CurrentLanguage = this.CurrentLanguage,
                Categories = objcontent.Categories(),
                Tags = tagFacade.GetAll().Select(t => new SelectListItem {
                    Text = t.Name, Value = t.TagId.ToString()
                })
            }));
        }
コード例 #9
0
        /// <summary>
        /// gets the home of report module
        /// </summary>
        /// <returns>returns the result to action</returns>
        public ActionResult Index()
        {
            ContentManagement  objcontentman = new ContentManagement(this.SessionCustom, HttpContext);
            SectionRepository  objsection    = new SectionRepository(this.SessionCustom);
            TemplateRepository objtemplate   = new TemplateRepository(this.SessionCustom);

            objtemplate.Entity.Type = 0;

            ContentRepository     content     = new ContentRepository(SessionCustom);
            DataTable             pulsesTable = content.ReportPulses();
            List <SelectListItem> pulses      = new List <SelectListItem>();

            foreach (DataRow dr in pulsesTable.Rows)
            {
                pulses.Add(new SelectListItem()
                {
                    Value = dr["ContentId"].ToString(), Text = dr["Nombre"].ToString()
                });
            }

            pulsesTable.Dispose();
            ViewBag.Pulses = pulses;

            return(this.View(new NotificationSettingsModel()
            {
                UserPrincipal = this.CustomUser,
                Module = this.Module,
                ColModul = CustomMemberShipProvider.GetModuls(this.CustomUser.UserId, this.SessionCustom, HttpContext),
                Templates = objtemplate.GetAll().Select(t => t.TemplateId),

                CurrentLanguage = this.CurrentLanguage
            }));
        }
コード例 #10
0
        /// <summary>
        /// obtains the idea detail
        /// </summary>
        /// <param name="mod">identifier of module</param>
        /// <param name="id">identifier of section</param>
        /// <returns>returns the result to action</returns>
        public ActionResult Detail(int mod, int id)
        {
            QuestionRepository   objquestion   = new QuestionRepository(SessionCustom);
            ContentManagement    objcontentman = new ContentManagement(SessionCustom, HttpContext);
            ContentRepository    objcontent    = new ContentRepository(SessionCustom);
            IdeaRepository       objidea       = new IdeaRepository(SessionCustom);
            FileattachRepository objfiles      = new FileattachRepository(SessionCustom);
            TagRepository        objtag        = new TagRepository(SessionCustom);
            SectionRepository    objsection    = new SectionRepository(SessionCustom);
            TemplateRepository   objtemplate   = new TemplateRepository(SessionCustom);
            CommentRepository    objcomment    = new CommentRepository(SessionCustom);

            objtemplate.Entity.Type = 0;

            objidea.Entity.IdeaId        =
                objcomment.Entity.IdeaId = id;
            objidea.LoadByKey();

            objquestion.Entity.ContentId    =
                objcontent.Entity.ContentId = objidea.Entity.ContentId;
            objcontent.LoadByKey();
            objquestion.LoadByKey();

            if (objquestion.Entity != null && objquestion.Entity.Type.Equals(Domain.Entities.Question.TypeQuestion.Ubicacion))
            {
                ViewBag.Location = true;
            }
            else
            {
                ViewBag.Location = false;
            }

            int totalComments = 0;
            List <CommentsPaging> comments = objcomment.CommentsPaging(0, 50, out totalComments, id);

            ViewBag.TotalComments = totalComments;

            IEnumerable <Tag> SelectedTags = objtag.GetTagbycontent(id);

            this.ViewBag.SelectedTags = string.Join("|", SelectedTags.Select(t => t.TagId));
            this.ViewBag.NewsTags     = string.Empty;

            return(this.View(
                       "Detail",
                       new IdeaModel()
            {
                UserPrincipal = this.CustomUser,
                ColModul = CustomMemberShipProvider.GetModuls(this.CustomUser.UserId, this.SessionCustom, HttpContext),
                Module = this.Module,
                ListFiles = objfiles.GetAllReadOnly(),
                Idea = objidea.Entity,
                IContent = objcontent.Entity,
                Templates = objtemplate.GetAll().Select(t => t.TemplateId),
                ListContent = objcontent.GetContentRelation(CurrentLanguage.LanguageId.Value),
                ListTags = SelectedTags,
                DeepFollower = Business.Utils.GetDeepFollower(objsection.GetAll(), objcontent.Entity.SectionId.Value),
                CurrentLanguage = this.CurrentLanguage,
                ListComments = comments
            }));
        }
コード例 #11
0
        /// <summary>
        /// delete a user
        /// </summary>
        /// <param name="id">identifier of user</param>
        /// <returns>returns the result to action</returns>
        public ActionResult Delete(int id)
        {
            CustomMemberShipProvider objCustom = new CustomMemberShipProvider(SessionCustom, HttpContext);

            objCustom.DeleteUser(id);

            return(this.RedirectToAction("Index", "Usuarios"));
        }
コード例 #12
0
 /// <summary>
 /// gets the home of audit module
 /// </summary>
 /// <returns>returns the result to action</returns>
 public ActionResult Index()
 {
     return(this.View(new Auditoria()
     {
         UserPrincipal = this.CustomUser,
         Module = this.Module,
         ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, this.SessionCustom, HttpContext),
         CurrentLanguage = CurrentLanguage
     }));
 }
コード例 #13
0
        /// <summary>
        /// gets the home of administrator
        /// </summary>
        /// <returns>returns the result to action</returns>
        public ActionResult Index()
        {
            if (HttpContext.User.Identity.IsAuthenticated)
            {
                if (CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext).Count > 0)
                {
                    return(this.RedirectToAction("Inicio", "Home", null));
                }
            }

            return(this.View());
        }
コード例 #14
0
        /// <summary>
        /// obtains the challenge detail
        /// </summary>
        /// <param name="mod">identifier of module</param>
        /// <param name="id">identifier of section</param>
        /// <param name="sectionId">seccion del molulo</param>
        /// <returns>returns the result to action</returns>
        public ActionResult Detail(int mod, int id, int?sectionId)
        {
            ContentManagement      objcontentman   = new ContentManagement(SessionCustom, HttpContext);
            ContentRepository      objcontent      = new ContentRepository(SessionCustom);
            SuccessStoryRepository objSuccessStory = new SuccessStoryRepository(SessionCustom);
            FileattachRepository   objfiles        = new FileattachRepository(SessionCustom);
            TagRepository          objtag          = new TagRepository(SessionCustom);
            SectionRepository      objsection      = new SectionRepository(SessionCustom);
            TemplateRepository     objtemplate     = new TemplateRepository(SessionCustom);
            CommentRepository      objcomment      = new CommentRepository(SessionCustom);
            TagFacade tagFacade = new TagFacade();

            objtemplate.Entity.Type = 0;

            objSuccessStory.Entity.ContentId        =
                objfiles.Entity.ContentId           =
                    objcomment.Entity.ContentId     =
                        objcontent.Entity.ContentId = id;

            objSuccessStory.LoadByKey();
            objcontent.LoadByKey();

            int totalComments = 0;
            List <CommentsPaging> comments = objcomment.CommentsPagingContent(0, 50, out totalComments, id);

            ViewBag.TotalComments = totalComments;

            IEnumerable <Tag> SelectedTags = objtag.GetTagbycontent(id);

            this.ViewBag.SelectedTags = string.Join("|", SelectedTags.Select(t => t.TagId));
            this.ViewBag.NewsTags     = string.Empty;

            return(this.View(
                       "Index",
                       new SuccessStoryModel()
            {
                UserPrincipal = this.CustomUser,
                ColModul = CustomMemberShipProvider.GetModuls(this.CustomUser.UserId, this.SessionCustom, HttpContext),
                Module = this.Module,
                ListFiles = objfiles.GetAllReadOnly(),
                SuccessStory = objSuccessStory.Entity,
                IContent = objcontent.Entity,
                Templates = objtemplate.GetAll().Select(t => t.TemplateId),
                ListContent = objcontent.GetContentRelation(CurrentLanguage.LanguageId.Value),
                ListTags = SelectedTags,
                DeepFollower = Business.Utils.GetDeepFollower(objsection.GetAll(), objcontent.Entity.SectionId.Value),
                CurrentLanguage = this.CurrentLanguage,
                ListComments = comments,
                Tags = tagFacade.GetAll().Select(t => new SelectListItem {
                    Text = t.Name, Value = t.TagId.ToString()
                })
            }));
        }
コード例 #15
0
        public ActionResult Detail(int?id, Usuarios model, HttpPostedFileBase userimage, List <int> colrols)
        {
            CustomMemberShipProvider objCustom  = new CustomMemberShipProvider(SessionCustom, HttpContext);
            RolUserRepository        objuserrol = new RolUserRepository(SessionCustom);

            model.UserCustom.LanguageId = 2;

            if (model.UserCustom.Password != null)
            {
                model.UserCustom.Password = Utils.EncriptSHA1(model.UserCustom.Password);
            }

            if (userimage != null && userimage.ContentLength > 0)
            {
                string userImage = Utils.UploadFile(
                    userimage,
                    HttpContext.Server.MapPath("~"),
                    @"resources\imagesuser\",
                    null);

                ImageResize objresize = new ImageResize(HttpContext.Server.MapPath("~"));
                objresize.Width  = 100;
                objresize.Height = 95;
                objresize.Prefix = "_";
                objresize.Resize(@"resources\imagesuser\" + userImage, ImageResize.TypeResize.BackgroundProportional);

                System.IO.File.Delete(System.IO.Path.Combine(HttpContext.Server.MapPath("~"), @"resources\imagesuser\" + userImage));
                model.UserCustom.Image = "_" + userImage;
            }

            if (id != null)
            {
                objuserrol.Entity.UserId = model.UserCustom.UserId = id;
                objCustom.ChangeData(model.UserCustom);
                objuserrol.Delete();
            }
            else
            {
                model.UserCustom.Joindate = DateTime.Now;
                objuserrol.Entity.UserId  = objCustom.CreateUser(model.UserCustom);
            }

            if (colrols != null)
            {
                foreach (int item in colrols)
                {
                    objuserrol.Entity.RolId = item;
                    objuserrol.Insert();
                }
            }

            return(this.RedirectToAction("Index", "Usuarios"));
        }
コード例 #16
0
        /// <summary>
        /// gets the home of language module
        /// </summary>
        /// <returns>returns the result to action</returns>
        public ActionResult Index()
        {
            LanguageRepository objlang = new LanguageRepository(SessionCustom);

            return(this.View(new Lenguaje()
            {
                UserPrincipal = CustomUser,
                Module = this.Module,
                CollLanguage = objlang.GetAll(),
                ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext),
                CurrentLanguage = CurrentLanguage
            }));
        }
コード例 #17
0
        /// <summary>
        /// gets the home of position module
        /// </summary>
        /// <returns>returns the result to action</returns>
        public ActionResult Index()
        {
            PositionRepository objposition = new PositionRepository(SessionCustom);

            return(this.View(new Models.Posiciones()
            {
                Module = this.Module,
                UserPrincipal = CustomUser,
                CollPositions = objposition.GetAll(),
                ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext),
                CurrentLanguage = CurrentLanguage
            }));
        }
コード例 #18
0
        /// <summary>
        /// gets the home of parameters module
        /// </summary>
        /// <returns>returns the result to action</returns>
        public ActionResult Index()
        {
            Configuration myConfiguration = WebConfigurationManager.OpenWebConfiguration("~");

            return(this.View(new Parametros()
            {
                UserPrincipal = CustomUser,
                Module = this.Module,
                ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext),
                CollValues = myConfiguration.AppSettings.Settings,
                CurrentLanguage = CurrentLanguage
            }));
        }
コード例 #19
0
        /// <summary>
        /// gets the home of modules module
        /// </summary>
        /// <returns>returns the result to action</returns>
        public ActionResult Index()
        {
            ModulRepository objmod = new ModulRepository(SessionCustom);

            objmod.Entity.LanguageId = CurrentLanguage.LanguageId;
            return(this.View(new Modulos()
            {
                UserPrincipal = CustomUser,
                Module = this.Module,
                CollModuls = objmod.GetAll(),
                ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext),
                CurrentLanguage = CurrentLanguage
            }));
        }
コード例 #20
0
 /// <summary>
 /// obtains the parameter detail
 /// </summary>
 /// <param name="key">key of parameter</param>
 /// <returns>returns the result to action</returns>
 public ActionResult Detail(string key)
 {
     return(this.View(new Models.Parametros()
     {
         UserPrincipal = CustomUser,
         Module = this.Module,
         ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext),
         Keyvalue = new KeyValue()
         {
             Key = key, Value = ConfigurationManager.AppSettings[key]
         },
         CurrentLanguage = CurrentLanguage
     }));
 }
コード例 #21
0
        /// <summary>
        /// gets the home of section module
        /// </summary>
        /// <returns>returns the result to action</returns>
        public ActionResult Index()
        {
            SectionManagement objSection = new SectionManagement(SessionCustom, HttpContext);

            return(this.View(new Secciones()
            {
                UserPrincipal = CustomUser,
                Module = this.Module,
                CollSections = objSection.GetSectionsParentNull(CurrentLanguage.LanguageId.Value),
                ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext),
                CollLayouts = objSection.GetLayouts(),
                CollTemplates = objSection.GetTemplates(),
                CurrentLanguage = CurrentLanguage
            }));
        }
コード例 #22
0
        public ActionResult Busqueda(string search)
        {
            ContentRepository objcontent = new ContentRepository(SessionCustom);

            Module.Name = "Busqueda";

            return(this.View(new Modelsearch()
            {
                Module = this.Module,
                UserPrincipal = CustomUser,
                ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext),
                CollResult = objcontent.GetSearchGeneral(search, CurrentLanguage.LanguageId.Value),
                Criteria = search,
                CurrentLanguage = CurrentLanguage
            }));
        }
コード例 #23
0
        public ActionResult Inicio()
        {
            AuditRepository objaudit = new AuditRepository(SessionCustom);

            objaudit.Entity.Username = CustomUser.UserId;
            Module.Name = "CMS";

            return(this.View(new Principal()
            {
                Module = this.Module,
                UserPrincipal = CustomUser,
                ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext),
                CollRols = CustomMemberShipProvider.GetRols(SessionCustom, HttpContext),
                CollAudit = objaudit.GetAutidtop(),
                CurrentLanguage = CurrentLanguage
            }));
        }
コード例 #24
0
        /// <summary>
        /// gets the home of tag module
        /// </summary>
        /// <param name="page">page index</param>
        /// <param name="name">criteria search</param>
        /// <returns>returns the result to action</returns>
        public ActionResult Index(int?page, string name)
        {
            TagRepository objtag    = new TagRepository(SessionCustom);
            PaginInfo     paginInfo = new PaginInfo()
            {
                PageIndex = page != null ? page.Value : 1
            };

            return(this.View(new Tags()
            {
                UserPrincipal = CustomUser,
                Module = this.Module,
                CollTags = objtag.GetAllPaging(name, paginInfo, CurrentLanguage.LanguageId.Value),
                ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext),
                Pagininfo = paginInfo,
                CurrentLanguage = CurrentLanguage
            }));
        }
コード例 #25
0
        public ActionResult Index(Login objLogin, string returnUrl)
        {
            CustomMemberShipProvider objmember = new CustomMemberShipProvider(SessionCustom, HttpContext);

            try
            {
                CustomMemberShipProvider.AuthencReturn result = objmember.ValidateUser(HttpContext, objLogin.Email, objLogin.Password, null);
                string message = null;

                switch (result)
                {
                case CustomMemberShipProvider.AuthencReturn.USER_OK:
                    if (returnUrl == null)
                    {
                        return(this.RedirectToAction("Inicio", "Home", null));
                    }
                    else
                    {
                        return(this.Redirect(returnUrl));
                    }

                case CustomMemberShipProvider.AuthencReturn.NOT_FOUND:
                    message = Resources.Extend.Messages.USER_NOT_FOUND;
                    break;

                case CustomMemberShipProvider.AuthencReturn.BAD_PASSWORD:
                    message = Resources.Extend.Messages.USER_BAD_PASSWORD;
                    break;

                default:
                    message = Resources.Extend.Messages.SYSTEM_ERROR;
                    break;
                }

                ModelState.AddModelError("UserNotFound", message);
                return(this.View(objLogin));
            }
            catch (Exception)
            {
                ModelState.AddModelError("Applicationerror", Resources.Extend.Messages.FAILED_INFORMATION);
                return(this.View(objLogin));
            }
        }
コード例 #26
0
        /// <summary>
        /// gets the detail of a banner
        /// </summary>
        /// <param name="id">identifier of banner</param>
        /// <returns>returns the result to action</returns>
        public ActionResult Detail(int?id)
        {
            BannerRepository   objbanner         = new BannerRepository(SessionCustom);
            SectionManagement  objsection        = new SectionManagement(SessionCustom, HttpContext);
            SectionRepository  sectionrepository = new SectionRepository(SessionCustom);
            PositionRepository objposition       = new PositionRepository(SessionCustom);

            Domain.Entities.Banner banner = null;
            bool?isHome = null;

            if (id != null)
            {
                objbanner.Entity.BannerId = id;
                objbanner.Load();
                banner     = objbanner.Entity;
                ViewBag.id = id;

                BannersectionRepository objbannersection = new BannersectionRepository(SessionCustom);
                objbannersection.Entity.BannerId = id;

                List <Bannersection> collsections = objbannersection.GetAll();
                objsection.CreateTreeViewCheck(sectionrepository.GetAll().FindAll(t => t.LanguageId == CurrentLanguage.LanguageId), collsections);
                isHome = collsections.Exists(t => t.SectionId == 0);
            }
            else
            {
                objsection.CreateTreeViewCheck(sectionrepository.GetAll().FindAll(t => t.LanguageId == CurrentLanguage.LanguageId), null);
            }

            return(this.View(new Banners()
            {
                UserPrincipal = CustomUser,
                Banner = banner,
                ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext),
                Module = this.Module,
                TreeView = objsection.Tree,
                Collposition = objposition.GetAll(),
                IsHome = isHome,
                CurrentLanguage = CurrentLanguage
            }));
        }
コード例 #27
0
        public ActionResult Index()
        {
            DirectoryInfo objdir = new DirectoryInfo(Server.MapPath("~"));
            Dictionary <string, string> coldic = new Dictionary <string, string>();

            DirectoryInfo[] arrdir = objdir.GetDirectories();

            foreach (DirectoryInfo item in arrdir)
            {
                coldic.Add(item.Name, item.FullName);
            }

            return(this.View(new Gestorftp()
            {
                UserPrincipal = CustomUser,
                Module = this.Module,
                ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext),
                CollDirectory = coldic,
                CurrentLanguage = CurrentLanguage
            }));
        }
コード例 #28
0
        /// <summary>
        /// obtains the tag detail
        /// </summary>
        /// <param name="id">identifier of tag</param>
        /// <returns>returns the result to action</returns>
        public ActionResult Detail(int?id)
        {
            TagRepository objtag = new TagRepository(SessionCustom);

            Domain.Entities.Tag tag = null;

            if (id != null)
            {
                objtag.Entity.TagId = id;
                objtag.Load();
                tag        = objtag.Entity;
                ViewBag.id = id;
            }

            return(this.View(new Tags()
            {
                UserPrincipal = CustomUser,
                Module = this.Module,
                TagCustom = tag,
                ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext),
                CurrentLanguage = CurrentLanguage
            }));
        }
コード例 #29
0
        /// <summary>
        /// obtains the position detail
        /// </summary>
        /// <param name="id">identifier of position</param>
        /// <returns>returns the result to action</returns>
        public ActionResult Detail(int?id)
        {
            PositionRepository objposition = new PositionRepository(SessionCustom);

            Domain.Entities.Position position = null;

            if (id != null)
            {
                objposition.Entity.PositionId = id;
                objposition.Load();
                position   = objposition.Entity;
                ViewBag.id = id;
            }

            return(this.View(new Models.Posiciones()
            {
                UserPrincipal = CustomUser,
                Module = this.Module,
                Position = position,
                ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext),
                CurrentLanguage = CurrentLanguage
            }));
        }
コード例 #30
0
        /// <summary>
        /// obtains the template detail
        /// </summary>
        /// <param name="key">criteria search</param>
        /// <returns>returns the result to action</returns>
        public ActionResult Detail(string key)
        {
            TemplateRepository objtemplate = new TemplateRepository(SessionCustom);

            Domain.Entities.Template template = null;

            if (key != null)
            {
                objtemplate.Entity.TemplateId = key;
                objtemplate.Load();
                template   = objtemplate.Entity;
                ViewBag.id = key;
            }

            return(this.View(new Templates()
            {
                UserPrincipal = CustomUser,
                Module = this.Module,
                TemplateCustom = template,
                ColModul = CustomMemberShipProvider.GetModuls(CustomUser.UserId, SessionCustom, HttpContext),
                CurrentLanguage = CurrentLanguage
            }));
        }