public ActionResult DeleteConfirmed(int id) { SimCardTypes m = db.SimCardTypes.Find(id); db.SimCardTypes.Remove(m); db.SaveChanges(); return(RedirectToAction("Index", "SimCardTypes")); }
public ActionResult Edit([Bind(Include = "SIM_CardTypeID,Name")] SimCardTypes m) { if (ModelState.IsValid) { db.Entry(m).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index", "SimCardTypes")); } return(View(m)); }
public ActionResult Create([Bind(Include = "SIM_CardTypeID,Name")] SimCardTypes m) { if (ModelState.IsValid) { db.SimCardTypes.Add(m); db.SaveChanges(); return(RedirectToAction("Index", "SimCardTypes")); } return(View(m)); }
public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } SimCardTypes m = db.SimCardTypes.Find(id); if (m == null) { return(HttpNotFound()); } return(View(m)); }
public void GetAndProcessUserSelectionOfSimCard(SimCorpMobile simCorpMobile) { SimCardHandler simCardHandler = new SimCardHandler(Output); string enteredSimCardTypeIndex = Input.ReadLine(); try { SimCardTypes simCardType = simCardHandler.GetSimCardType(enteredSimCardTypeIndex); ISimCard simCardComponent = simCardHandler.GetSimCard(simCardType); simCardHandler.SetAndConnectSimCard(simCorpMobile, simCardComponent); } catch (Exception e) { Output.Write(e.Message); } }
public ISimCard GetSimCard(SimCardTypes simCardType) { ISimCard simCard = null; switch (simCardType) { case SimCardTypes.KyivstarSimCard: simCard = new KyivstarSimCard(Output); Output.WriteLine($"{nameof(KyivstarSimCard)} selected"); break; case SimCardTypes.LifecellSimCard: simCard = new LifecellSimCard(Output); Output.WriteLine($"{nameof(LifecellSimCard)} selected"); break; case SimCardTypes.VodafoneSimCard: simCard = new VodafoneSimCard(Output); Output.WriteLine($"{nameof(VodafoneSimCard)} selected"); break; } return(simCard); }
public RealSimCard(SimCardTypes sctype) : base(sctype) { }
public SimCard(SimCardTypes simCardType, int[] pin, int[] puk) { this.Type = simCardType; this.PIN = pin; this.PUK = puk; }
public OneSimCardSlot(SimCardTypes simCardType1) : base(simCardType1) { }
public DualSimCardSlot(SimCardTypes simCardType1, SimCardTypes simCardType2) : base(simCardType1) { SimCardType2 = simCardType2; }
public BaseSimCardSlot(SimCardTypes simCardType) { SimCardType1 = simCardType; }
public BaseSimCard(SimCardTypes sctype) { SimCardType = sctype; }