Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            SimCardTypes m = db.SimCardTypes.Find(id);

            db.SimCardTypes.Remove(m);
            db.SaveChanges();
            return(RedirectToAction("Index", "SimCardTypes"));
        }
Esempio n. 2
0
 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));
 }
Esempio n. 3
0
        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));
        }
Esempio n. 4
0
        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));
        }
Esempio n. 5
0
        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);
            }
        }
Esempio n. 6
0
        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);
        }
Esempio n. 7
0
 public RealSimCard(SimCardTypes sctype) : base(sctype)
 {
 }
Esempio n. 8
0
 public SimCard(SimCardTypes simCardType, int[] pin, int[] puk)
 {
     this.Type = simCardType;
     this.PIN  = pin;
     this.PUK  = puk;
 }
 public OneSimCardSlot(SimCardTypes simCardType1) : base(simCardType1)
 {
 }
Esempio n. 10
0
 public DualSimCardSlot(SimCardTypes simCardType1, SimCardTypes simCardType2) : base(simCardType1)
 {
     SimCardType2 = simCardType2;
 }
Esempio n. 11
0
 public BaseSimCardSlot(SimCardTypes simCardType)
 {
     SimCardType1 = simCardType;
 }
Esempio n. 12
0
 public BaseSimCard(SimCardTypes sctype)
 {
     SimCardType = sctype;
 }