Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            tbl_Hesaplar tbl_Hesaplar = db.tbl_Hesaplar.Find(id);

            db.tbl_Hesaplar.Remove(tbl_Hesaplar);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "hesapId,IBAN,musteriNo,hesapNumarasi,aktiflik,hesapTipi,bakiye,paraTipi,krediLimiti,hesapAcilisTarihi,hesapKapanisTarihi,hesapPuani,ekNo")] tbl_Hesaplar tbl_Hesaplar)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_Hesaplar).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.musteriNo = new SelectList(db.tbl_Musteriler, "musteriNo", "TCKN", tbl_Hesaplar.musteriNo);
     return(View(tbl_Hesaplar));
 }
Exemplo n.º 3
0
        // GET: hesap/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_Hesaplar tbl_Hesaplar = db.tbl_Hesaplar.Find(id);

            if (tbl_Hesaplar == null)
            {
                return(HttpNotFound());
            }
            return(View(tbl_Hesaplar));
        }
Exemplo n.º 4
0
        public JsonResult Create(string hesapNo)
        {
            int          hesapSayisi = db.tbl_Hesaplar.Where(t => t.musteriNo == hesapNo).Count();
            tbl_Hesaplar hesap       = new tbl_Hesaplar();

            hesap.musteriNo         = hesapNo;
            hesap.bakiye            = 0;
            hesap.ekNo              = 1000 + hesapSayisi;
            hesap.hesapNumarasi     = hesapNo + "-" + hesap.ekNo;
            hesap.hesapAcilisTarihi = DateTime.Now;
            hesap.aktiflik          = true;
            db.tbl_Hesaplar.Add(hesap);
            db.SaveChanges();
            return(Json("basarili", JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 5
0
        public ActionResult sil(int ekNo)
        {
            tbl_Hesaplar hesap = db.tbl_Hesaplar.FirstOrDefault(t => t.musteriNo == User.Identity.Name && t.ekNo == ekNo);

            hesap.aktiflik           = false;
            hesap.hesapKapanisTarihi = DateTime.Now;
            if (hesap.bakiye == 0)
            {
                db.tbl_Hesaplar.AddOrUpdate(hesap);
                db.SaveChanges();
                return(Json("silindi", JsonRequestBehavior.AllowGet));
            }

            return(HttpNotFound());
        }
Exemplo n.º 6
0
        // POST: hesap/Create
        // To protect from overposting attacks, please enable the specific properties you want to bind to, for
        // more details see https://go.microsoft.com/fwlink/?LinkId=317598.

        // GET: hesap/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_Hesaplar tbl_Hesaplar = db.tbl_Hesaplar.Find(id);

            if (tbl_Hesaplar == null)
            {
                return(HttpNotFound());
            }
            ViewBag.musteriNo = new SelectList(db.tbl_Musteriler, "musteriNo", "TCKN", tbl_Hesaplar.musteriNo);
            return(View(tbl_Hesaplar));
        }