Ejemplo n.º 1
0
        public ActionResult AcceptMission(bgk_gorev_uye model)
        {
            var bgk_gorev_uye = Db.bgk_gorev_uye.Find(model.Id);

            bgk_gorev_uye.Kabul = true;
            BGKFunction.GetMember(bgk_gorev_uye.UyeID).Puan += bgk_gorev_uye.bgk_gorev.Puan;
            Db.SaveChanges();
            return(Content("<script>$.BGK.SuccessModal('Görevi başarıyla kabul ettiniz.', function (){ window.location.reload(); }, 1500);</script>"));
        }
Ejemplo n.º 2
0
        public ActionResult UnapproveMission(bgk_gorev_uye model)
        {
            int memberID      = (int)Session["memberID"];
            var bgk_gorev_uye = Db.bgk_gorev_uye.SingleOrDefault(x => x.GorevID == model.Id && x.UyeID == memberID);

            bgk_gorev_uye.Onay = false;
            BGKFunction.GetMember(bgk_gorev_uye.UyeID).CezaPuani += bgk_gorev_uye.bgk_gorev.Puan;
            Db.SaveChanges();
            return(Content("<script>$.BGK.SuccessModal('Görevi başarılı bir şekilde geri çevirdiniz.', function (){ window.location.reload(); }, 1500);</script>"));
        }
Ejemplo n.º 3
0
        public ActionResult Uploads(int id, int page, string seo)
        {
            int take    = 10;
            int skip    = take * (page - 1);
            var uploads = Db.bgk_dosya.Where(x => x.YukleyenID == id).OrderByDescending(x => x.YuklenmeTarihi).ToList();

            ViewBag.Title    = BGKFunction.GetMember(id).AdSoyad + " Adlı Üyenin Yüklemeleri";
            ViewBag.count    = uploads.Count();
            ViewBag.take     = take;
            ViewBag.memberID = id;
            return(View(uploads.Skip(skip).Take(take)));
        }
Ejemplo n.º 4
0
        public ActionResult Comments(int id, int page, string seo)
        {
            int take  = 10;
            int skip  = take * (page - 1);
            var posts = Db.bgk_yorum.Where(x => x.UyeID == id && x.bgk_yazi.Onay == true && x.Onay == true).OrderByDescending(x => x.YazilmaTarihi).ToList();

            ViewBag.Title    = BGKFunction.GetMember(id).AdSoyad + " > Yorumları";
            ViewBag.count    = posts.Count();
            ViewBag.take     = take;
            ViewBag.memberID = id;
            return(View(posts.Skip(skip).Take(take)));
        }
Ejemplo n.º 5
0
        public ActionResult Groups(int id, int page, string seo)
        {
            int take  = 10;
            int skip  = take * (page - 1);
            var posts = Db.bgk_grup_uye.Where(x => x.UyeID == id).OrderByDescending(x => x.BitisTarihi).ToList();

            ViewBag.Title    = BGKFunction.GetMember(id).AdSoyad + " > Gruplar";
            ViewBag.count    = posts.Count();
            ViewBag.take     = take;
            ViewBag.memberID = id;
            return(View(posts.Skip(skip).Take(take)));
        }
Ejemplo n.º 6
0
        public ActionResult SendMessage(bgk_mesaj message)
        {
            message.YazimTarihi = DateTime.Now;
            message.Tip         = 1;
            message.Okundu      = false;
            Db.bgk_mesaj.Add(message);
            Db.SaveChanges();
            TextWriter  tw          = new StringWriter();
            ViewContext viewContext = new ViewContext(this.ControllerContext, new RazorView(this.ControllerContext, "anything", null, false, null), new ViewDataDictionary(), new TempDataDictionary(), tw);
            var         h           = new HtmlHelper(viewContext, new ViewPage());

            return(Content("<div class=\"message outgoing\"><span class=\"writer\">" + BGKFunction.GetMember(message.GonderenID).AdSoyad.Split(' ')[0] + "</span><span class=\"date\">" + h.ShortDateTime(message.YazimTarihi, true).ToString() + "</span><span class=\"message\">" + message.Mesaj + "</span></div>"));
        }