public ActionResult KusaklarKayit(KusaklarListViewModel kusaklars)
        {
            bool status = false;

            if (ModelState.IsValid)
            {
                if (kusaklars.kusaklarGet.Id > 0)
                {
                    //Edit
                    var model = new KusaklarListViewModel
                    {
                        kusaklarGet = _kusaklarService.Update(kusaklars.kusaklarGet)
                    };
                }
                else
                {
                    //Save
                    var model = new KusaklarListViewModel
                    {
                        kusaklarGet = _kusaklarService.Add(kusaklars.kusaklarGet)
                    };
                }

                status = true;
            }
            return(new JsonResult {
                Data = new { status = status }
            });
        }
        public ActionResult KusaklarSil(int id)
        {
            var model = new KusaklarListViewModel
            {
                kusaklarGet = _kusaklarService.GetById(id)
            };

            return(View(model));
        }
        public ActionResult KusaklarGetir()
        {
            var model = new KusaklarListViewModel
            {
                kusaklars = _kusaklarService.GetAll()
            };

            return(Json(new { data = model.kusaklars }, JsonRequestBehavior.AllowGet));
        }
        public ActionResult KusakOdemeleriKayit(int Id)
        {
            //kusaklar  drobdowlisti doldurma
            var modelkusak = new KusaklarListViewModel
            {
                kusaklars = _kusaklarService.GetAll()
            };

            ViewBag.kusaklargoster = modelkusak.kusaklars.OrderByDescending(i => i.Id);

            //kusaklar detay listeleme
            var model = new KusakOdemeleriListViewModel
            {
                kusakOdemeleriGet = _kusakOdemleriService.GetById(Id)
            };

            return(View(model));
        }