Пример #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            T_Match_PlayerMappingTable t_Match_PlayerMappingTable = await db.T_Match_PlayerMappingTable.FindAsync(id);

            db.T_Match_PlayerMappingTable.Remove(t_Match_PlayerMappingTable);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Пример #2
0
        // GET: Match_PlayerMappingTable/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            T_Match_PlayerMappingTable t_Match_PlayerMappingTable = await db.T_Match_PlayerMappingTable.FindAsync(id);

            if (t_Match_PlayerMappingTable == null)
            {
                return(HttpNotFound());
            }
            return(View(t_Match_PlayerMappingTable));
        }
Пример #3
0
        public async Task <ActionResult> Edit([Bind(Include = "PlayerMatchID,MatchID,PlayerID,PlayerPosition,CreatedBy,CreatedDate,Active")] T_Match_PlayerMappingTable t_Match_PlayerMappingTable)
        {
            if (ModelState.IsValid)
            {
                t_Match_PlayerMappingTable.ModifiedBy      = "System";
                t_Match_PlayerMappingTable.ModifiedDate    = DateTime.Now;
                db.Entry(t_Match_PlayerMappingTable).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.MatchID  = new SelectList(db.M_MatchInfoMaters, "MatchID", "MatchLocation", t_Match_PlayerMappingTable.MatchID);
            ViewBag.PlayerID = new SelectList(db.M_PlayerInfoMaster, "PlayerID", "PlayerName", t_Match_PlayerMappingTable.PlayerID);
            return(View(t_Match_PlayerMappingTable));
        }
Пример #4
0
        // GET: Match_PlayerMappingTable/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            T_Match_PlayerMappingTable t_Match_PlayerMappingTable = await db.T_Match_PlayerMappingTable.FindAsync(id);

            if (t_Match_PlayerMappingTable == null)
            {
                return(HttpNotFound());
            }
            ViewBag.MatchID  = new SelectList(db.M_MatchInfoMaters, "MatchID", "MatchLocation", t_Match_PlayerMappingTable.MatchID);
            ViewBag.PlayerID = new SelectList(db.M_PlayerInfoMaster, "PlayerID", "PlayerName", t_Match_PlayerMappingTable.PlayerID);
            return(View(t_Match_PlayerMappingTable));
        }