Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            BankerType bankerType = db.BankerType.Find(id);

            db.BankerType.Remove(bankerType);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "ID,Name")] BankerType bankerType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bankerType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bankerType));
 }
Exemplo n.º 3
0
        public ActionResult Create([Bind(Include = "ID,Name")] BankerType bankerType)
        {
            if (ModelState.IsValid)
            {
                db.BankerType.Add(bankerType);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(bankerType));
        }
Exemplo n.º 4
0
        // GET: BankerTypes/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BankerType bankerType = db.BankerType.Find(id);

            if (bankerType == null)
            {
                return(HttpNotFound());
            }
            return(View(bankerType));
        }
Exemplo n.º 5
0
        /// <summary>
        /// 设置庄状态
        /// </summary>
        /// <param name="bt"></param>
        public void SetBankerType(BankerType bt)
        {
            CurBankerType = bt;
            switch (CurBankerType)
            {
            case BankerType.StayedBanker:
                SetApplyBankerBtnActive(false);
                break;

            case BankerType.CanBecomeBanker:
            case BankerType.CanNotBeBanker:
                SetApplyBankerBtnActive(true);
                break;
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// 设置庄状态
        /// </summary>
        /// <param name="bt"></param>
        public void SetBankerType(BankerType bt)
        {
            CurBankerType = bt;
            switch (CurBankerType)
            {
            case BankerType.StayedBanker:
                BtnImage.GetComponent <UISprite>().spriteName    = "60";
                BankerBtn.GetComponent <UIButton>().normalSprite = "60";
                break;

            case BankerType.CanBecomeBanker:
                BtnImage.GetComponent <UISprite>().spriteName    = "4";
                BankerBtn.GetComponent <UIButton>().normalSprite = "4";
                break;

            case BankerType.CanNotBeBanker:
                BtnImage.GetComponent <UISprite>().spriteName    = "2"; //允许玩家点击按钮
                BankerBtn.GetComponent <UIButton>().normalSprite = "2";
                break;
            }
        }