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

            db.magazines.Remove(magazine);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
        public async Task <ActionResult> Edit([Bind(Include = "C_id,name")] magazine magazine)
        {
            if (ModelState.IsValid)
            {
                db.Entry(magazine).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(magazine));
        }
        public async Task <ActionResult> Create([Bind(Include = "C_id,name")] magazine magazine)
        {
            if (ModelState.IsValid)
            {
                db.magazines.Add(magazine);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(magazine));
        }
Ejemplo n.º 4
0
 public contrats(int nc, String lac, int ec, bool ac, bool fc, double mc, double mnc, String dpc, pigiste np, magazine nm)
 {
     this.NumCollaboration          = nc;
     this.LettreAccordCollaboration = lac;
     this.EtatCollaboration         = ec;
     this.AgessaCollaboration       = ac;
     this.FactureCollaboration      = fc;
     this.MontantCollaboration      = mc;
     this.MontantNCollaboration     = mnc;
     this.DatePaiementCollaboration = dpc;
     this.PigisteContrats           = np;
     this.MagazineContrats          = nm;
 }
        public override void OnEnter()
        {
            var go = Fsm.GetOwnerDefaultTarget(gameObject);

            // you are grabbing the script from the game object and storing it in your custom variable type
            theScript = go.GetComponent <magazine>();

            if (!everyFrame.Value)
            {
                MakeItSo();
                Finish();
            }
        }
        // GET: magazines/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            magazine magazine = await db.magazines.FindAsync(id);

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