public async Task <ActionResult> DeleteConfirmed(int id)
        {
            Kids__Personal_Account kids__Personal_Account = await db.Kids__Personal_Account.FindAsync(id);

            db.Kids__Personal_Account.Remove(kids__Personal_Account);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
        public async Task <ActionResult> Create([Bind(Include = "ID_Personal_Account,Kid_Garden_Number,Parent_Tabel_Number,Kid_FIO,Paid")] Kids__Personal_Account kids__Personal_Account)
        {
            if (ModelState.IsValid)
            {
                db.Kids__Personal_Account.Add(kids__Personal_Account);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index/" + kids__Personal_Account.Kid_Garden_Number));
            }

            ViewBag.Kid_Garden_Number   = new SelectList(db.Kid_Gardens, "Kid_Garden_Number", "Kid_Garden_Name", kids__Personal_Account.Kid_Garden_Number);
            ViewBag.Parent_Tabel_Number = new SelectList(db.Parents, "ID_Tabel_number", "Parent_FIO", kids__Personal_Account.Parent_Tabel_Number);
            return(View(kids__Personal_Account));
        }
        // GET: Kids__Personal_Account/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Kids__Personal_Account kids__Personal_Account = await db.Kids__Personal_Account.FindAsync(id);

            if (kids__Personal_Account == null)
            {
                return(HttpNotFound());
            }
            return(View(kids__Personal_Account));
        }
        public async Task <ActionResult> Edit([Bind(Include = "ID_Personal_Account,ID_Tabel_number,ID_Visit_Tabel,Kid_Garden_Number,Parent_Tabel_Number,Kid_FIO,Paid")] Kids__Personal_Account kids__Personal_Account)
        {
            if (ModelState.IsValid)
            {
                db.Entry(kids__Personal_Account).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index/" + kids__Personal_Account.Kid_Garden_Number));
            }
            ViewBag.Kid_Garden_Number   = new SelectList(db.Kid_Gardens, "Kid_Garden_Number", "Kid_Garden_Name", kids__Personal_Account.Kid_Garden_Number);
            ViewBag.Parent_Tabel_Number = new SelectList(db.Parents, "ID_Tabel_number", "Parent_FIO", kids__Personal_Account.Parent_Tabel_Number);
            ViewBag.Visit_Tabel         = new SelectList(db.Visit_Tabel, "ID_Visit_Tabel", "Visit_Days_Amount", kids__Personal_Account.Visit_Tabel);
            ViewBag.Month = new SelectList(db.Visit_Tabel, "ID_Visit_Tabel", "Month", kids__Personal_Account.Visit_Tabel);
            return(View(kids__Personal_Account));
        }
        // GET: Kids__Personal_Account/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Kids__Personal_Account kids__Personal_Account = await db.Kids__Personal_Account.Where(x => x.ID_Personal_Account == id).Include(x => x.Parent).Include(x => x.Visit_Tabel).FirstAsync();

            if (kids__Personal_Account == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Kid_Garden_Number   = new SelectList(db.Kid_Gardens, "Kid_Garden_Number", "Kid_Garden_Name", kids__Personal_Account.Kid_Garden_Number);
            ViewBag.Parent_Tabel_Number = new SelectList(db.Parents, "ID_Tabel_number", "Parent_FIO", kids__Personal_Account.Parent_Tabel_Number);
            ViewBag.Visit_Tabel         = new SelectList(db.Visit_Tabel, "ID_Visit_Tabel", "Visit_Days_Amount", kids__Personal_Account.Visit_Tabel);
            ViewBag.Month = new SelectList(db.Visit_Tabel, "ID_Visit_Tabel", "Month_Code", kids__Personal_Account.Visit_Tabel);
            return(View(kids__Personal_Account));
        }