示例#1
0
        public async Task <ActionResult> Edit([Bind(Include = "Id,OtherRebates,Owing,SourceCut,Blank,DateTime,InstitutionInfoId")] OtherCoordination otherCoordination)
        {
            if (ModelState.IsValid)
            {
                db.Entry(otherCoordination).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index", new { id = otherCoordination.InstitutionInfoId }));
            }
            return(View(otherCoordination));
        }
示例#2
0
        // GET: OtherCoordinations/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            OtherCoordination otherCoordination = await db.OtherCoordinations.FindAsync(id);

            if (otherCoordination == null)
            {
                return(HttpNotFound());
            }
            return(View(otherCoordination));
        }
示例#3
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            OtherCoordination otherCoordination = await db.OtherCoordinations.FindAsync(id);

            if (otherCoordination != null)
            {
                db.OtherCoordinations.Remove(otherCoordination);
            }
            await db.SaveChangesAsync();

            if (otherCoordination != null)
            {
                return(RedirectToAction("Index", new { id = otherCoordination.InstitutionInfoId }));
            }
            return(HttpNotFound());
        }
示例#4
0
        // GET: OtherCoordinations/Create
        public ActionResult Create(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            if (id == 0)
            {
                return(HttpNotFound());
            }

            var data = new OtherCoordination
            {
                InstitutionInfoId = (int)id
            };

            return(View(data));
        }
示例#5
0
        public async Task <ActionResult> Create([Bind(Include = "Id,OtherRebates,Owing,SourceCut,Blank,DateTime,InstitutionInfoId")] OtherCoordination otherCoordination)
        {
            if (ModelState.IsValid)
            {
                db.OtherCoordinations.Add(otherCoordination);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index", new { id = otherCoordination.InstitutionInfoId }));
            }

            if (otherCoordination.InstitutionInfoId != 0)
            {
                var data = new OtherCoordination
                {
                    InstitutionInfoId = otherCoordination.InstitutionInfoId
                };
                return(View(data));
            }
            return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
        }