예제 #1
0
        public async Task <ActionResult> DeleteConfirmed(Guid id)
        {
            SYS_DD sys_dd = await db.SYS_DD.FindAsync(id);

            db.SYS_DD.Remove(sys_dd);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
예제 #2
0
        public async Task <ActionResult> Edit([Bind(Include = "DDid,DDCode,DDName,DDType,DDSort")] SYS_DD sys_dd)
        {
            if (ModelState.IsValid)
            {
                db.Entry(sys_dd).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(sys_dd));
        }
예제 #3
0
        public async Task <ActionResult> Create([Bind(Include = "DDid,DDCode,DDName,DDType,DDSort")] SYS_DD sys_dd)
        {
            if (ModelState.IsValid)
            {
                sys_dd.DDid = Guid.NewGuid();
                db.SYS_DD.Add(sys_dd);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(sys_dd));
        }
예제 #4
0
        // GET: /SYS/SYS_DD/Delete/5
        public async Task <ActionResult> Delete(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SYS_DD sys_dd = await db.SYS_DD.FindAsync(id);

            if (sys_dd == null)
            {
                return(HttpNotFound());
            }
            return(View(sys_dd));
        }