Ejemplo n.º 1
0
        public ActionResult AddOurTeam(OurTeam OurTeammodel, HttpPostedFileBase uploadfile, string txtdate)
        {
            var languages = LanguageManager.GetLanguages();
            var list      = new SelectList(languages, "Culture", "Language");

            ViewBag.LanguageList = list;
            if (ModelState.IsValid)
            {
                if (Session["ModifiedImageId"] != null)
                {
                    OurTeammodel.Image = "/Content/images/userfiles/" + Session["ModifiedImageId"].ToString() + Session["WorkingImageExtension"].ToString();
                    ImageHelperNew.DestroyImageCashAndSession(0, 0);
                }
                else
                {
                    OurTeammodel.Image = "/Content/images/front/noimage.jpeg";
                }

                OurTeammodel.PageSlug    = Utility.SetPagePlug(OurTeammodel.Name);
                OurTeammodel.TimeCreated = Utility.ControlDateTime(txtdate);
                ViewBag.ProcessMessage   = OurTeamManager.AddOurTeam(OurTeammodel);
                ModelState.Clear();
                return(View());
            }
            else
            {
                return(View());
            }
        }
Ejemplo n.º 2
0
        public JsonResult OurTeamEditStatus(int id)
        {
            string NowState;
            bool   isupdate = OurTeamManager.UpdateStatus(id);

            return(Json(isupdate));
        }
Ejemplo n.º 3
0
        public ActionResult Index()
        {
            string sellang = FillLanguagesList();
            var    OurTeam = OurTeamManager.GetOurTeamList(sellang);

            return(View(OurTeam));
        }
Ejemplo n.º 4
0
        public ActionResult EditOurTeam()
        {
            ImageHelperNew.DestroyImageCashAndSession(175, 175);
            var languages = LanguageManager.GetLanguages();
            var list      = new SelectList(languages, "Culture", "Language");

            ViewBag.LanguageList = list;
            if (RouteData.Values["id"] != null)
            {
                int  nid      = 0;
                bool isnumber = int.TryParse(RouteData.Values["id"].ToString(), out nid);
                if (isnumber)
                {
                    OurTeam editOurTeam = OurTeamManager.GetOurTeamById(nid);
                    return(View(editOurTeam));
                }
                else
                {
                    return(View());
                }
            }
            else
            {
                return(View());
            }
        }
Ejemplo n.º 5
0
        public JsonResult DeleteOurTeam(int id)
        {
            bool isdelete = OurTeamManager.Delete(id);

            //if (isdelete)
            return(Json(isdelete));
            //  else return false;
        }
Ejemplo n.º 6
0
        public JsonResult SortRecords(string list)
        {
            JsonList psl = (new JavaScriptSerializer()).Deserialize <JsonList>(list);

            string[] idsList  = psl.list;
            bool     issorted = OurTeamManager.SortRecords(idsList);

            return(Json(issorted));
        }
Ejemplo n.º 7
0
        public ActionResult Index()
        {
            MainContext db   = new MainContext();
            Tags        stag = db.Tags.Where(x => x.PageId == 4 && x.Lang == lang).FirstOrDefault();

            if (stag != null)
            {
                ViewBag.Title       = stag.Title;
                ViewBag.Description = stag.Description;
                ViewBag.Keywords    = stag.Keyword;
            }

            var list = OurTeamManager.GetOurTeamListForFront(lang);
            var dan  = InstituionalManager.GetInstationalByLanguage(lang, (int)EnumInstituionalTypes.Danismanlarimiz);
            var uzm  = InstituionalManager.GetInstationalByLanguage(lang, (int)EnumInstituionalTypes.UzmanlikAlanlarimiz);
            OurTeamWrapperModel m = new OurTeamWrapperModel(list, dan, uzm);

            return(View(m));
        }
Ejemplo n.º 8
0
        public ActionResult EditOurTeam(OurTeam OurTeammodel, HttpPostedFileBase uploadfile)
        {
            var languages = LanguageManager.GetLanguages();
            var list      = new SelectList(languages, "Culture", "Language");

            ViewBag.LanguageList = list;
            if (ModelState.IsValid)
            {
                if (Session["ModifiedImageId"] != null)
                {
                    OurTeammodel.Image = "/Content/images/userfiles/" + Session["ModifiedImageId"].ToString() + Session["WorkingImageExtension"].ToString();
                    ImageHelperNew.DestroyImageCashAndSession(0, 0);
                }

                OurTeammodel.PageSlug = Utility.SetPagePlug(OurTeammodel.Name);

                if (RouteData.Values["id"] != null)
                {
                    int  nid      = 0;
                    bool isnumber = int.TryParse(RouteData.Values["id"].ToString(), out nid);
                    if (isnumber)
                    {
                        OurTeammodel.OurTeamId = nid;
                        ViewBag.ProcessMessage = OurTeamManager.EditOurTeam(OurTeammodel);
                        return(View(OurTeammodel));
                    }
                    else
                    {
                        ViewBag.ProcessMessage = false;
                        return(View(OurTeammodel));
                    }
                }

                return(View());
            }
            else
            {
                return(View());
            }
        }