Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            GOAL gOAL = db.GOALS.Find(id);

            db.GOALS.Remove(gOAL);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        // GET: GOALs1/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            GOAL gOAL = db.GOALS.Find(id);

            if (gOAL == null)
            {
                return(HttpNotFound());
            }
            return(View(gOAL));
        }
Ejemplo n.º 3
0
    public void DecreaseGoal(string gameObject, bool isBreakable)
    {
        sm.PlayPlayerSound(PLAYERSOUNDTYPE.MATCH);

        if (isBreakable)
        {
            DecreaseGoal("Breakable(Clone)", false);
        }

        int cnt = 0;

        foreach (GOAL goal in goals.ToArray())
        {
            string str = goal.name + "(Clone)";
            if (str.Equals(gameObject))
            {
                score += 10;
                GOAL g = new GOAL(goal.name, goal.count - 1);
                foreach (GameObject go in goalList)
                {
                    if (g.name.Equals(go.name))
                    {
                        g.count = (g.count <= 0) ? 0 : g.count;
                        score  += (g.count <= 0) ? 40 : 20;
                        go.transform.Find("count").GetComponent <Text>().text = g.count.ToString();

                        goals.Add(g);
                        goals.RemoveAt(cnt);
                    }
                }
            }
            cnt++;
        }


        foreach (GOAL goal in goals.ToArray())
        {
            if (goal.count != 0)
            {
                return;
            }
        }

        StartCoroutine(Clear());
    }
Ejemplo n.º 4
0
 public ActionResult Edit([Bind(Include = "goalID,period,actualValue,goalValue,fiscalYear,subcategory,category,workstream,team")] GOAL gOAL)
 {
     db.Entry(gOAL).State = EntityState.Modified;
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
Ejemplo n.º 5
0
 public ActionResult Create([Bind(Include = "goalID,period,actualValue,goalValue,fiscalYear,subcategory,category,workstream,team")] GOAL gOAL)
 {
     db.GOALS.Add(gOAL);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
Ejemplo n.º 6
0
 public ActionResult Create([Bind(Include = "goalID,goalName,goalValue,FYstart,FYend,subcategory,category,workstream,team")] GOAL gOAL)
 {
     db.GOALS.Add(gOAL);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
Ejemplo n.º 7
0
 public ActionResult FilterByGoal(GOAL model, string goalName)
 {
     PopulateGoal("SELECT * FROM GOALS WHERE goalName=@goalName", model.goalName);
     return(View());
 }
Ejemplo n.º 8
0
        public ActionResult FilterByGoal()
        {
            var model = new GOAL();

            return(View(model));
        }
Ejemplo n.º 9
0
 public ActionResult Edit([Bind(Include = "goalID,goalName,goalValue,FYstart,FYend,subcategory,category,workstream,team")] GOAL gOAL)
 {
     db.Entry(gOAL).State = EntityState.Modified;
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }