Ejemplo n.º 1
0
        public virtual ActionResult NotEkle(NotModel model, bool düzenlemeyeDevam, string grup, int grupId, string returnUrl)
        {
            var Not = _notServisi.NotAlId(model.Id);

            if (ModelState.IsValid)
            {
                Not             = model.ToEntity();
                Not.Grup        = grup;
                Not.GrupId      = grupId;
                Not.KullanıcıId = _workContext.MevcutKullanıcı.Id;
                _notServisi.NotEkle(Not);
                BaşarılıBildirimi("Not başarıyla eklenmiştir.");
                _kullanıcıİşlemServisi.İşlemEkle("NotEkle", "Not eklendi", Not.Icerik);
                if (grup == "HariciTeklif")
                {
                    var teklif = _hariciTeklifServisi.TeklifAlId(grupId);
                    teklif.Not.Add(Not);
                    _hariciTeklifServisi.TeklifGüncelle(teklif);
                }
                if (düzenlemeyeDevam)
                {
                    return(RedirectToAction("NotDüzenle", new { id = Not.Id }));
                }
                return(RedirectToAction(returnUrl));
            }
            return(View(model));
        }
Ejemplo n.º 2
0
 public Not(NotModel not, ExecutionEngine logic)
 {
     this.create = () =>
     {
         var operand = logic.Operators.CreateFrom(not.Operand).As <bool>();
         return(Expression.MakeUnary(ExpressionType.Not, operand.Expression, typeof(bool)));
     };
 }
Ejemplo n.º 3
0
        public virtual ActionResult NotDüzenle(NotModel model, bool düzenlemeyeDevam, string returnUrl)
        {
            var Not = _notServisi.NotAlId(model.Id);

            if (ModelState.IsValid)
            {
                model.Grup        = Not.Grup;
                model.GrupId      = Not.GrupId;
                model.KullanıcıId = Not.KullanıcıId;
                Not = model.ToEntity(Not);
                _notServisi.NotGüncelle(Not);
                BaşarılıBildirimi("Not başarıyla güncellenmiştir.");
                _kullanıcıİşlemServisi.İşlemEkle("NotGüncelle", "Not güncellendi", Not.Icerik);
                if (düzenlemeyeDevam)
                {
                    return(RedirectToAction("NotDüzenle", new { id = Not.Id }));
                }
                return(RedirectToAction(returnUrl));
            }
            return(View(model));
        }
Ejemplo n.º 4
0
        public virtual ActionResult NotEkle(string grup, int grupId, string returnUrl)
        {
            var model = new NotModel();

            return(View(model));
        }
Ejemplo n.º 5
0
 public static Not ToEntity(this NotModel model, Not destination)
 {
     return(model.MapTo(destination));
 }
Ejemplo n.º 6
0
 public static Not ToEntity(this NotModel model)
 {
     return(model.MapTo <NotModel, Not>());
 }