public ActionResult DeleteConfirmed(int id) { GOAL gOAL = db.GOALS.Find(id); db.GOALS.Remove(gOAL); db.SaveChanges(); return(RedirectToAction("Index")); }
// 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)); }
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()); }
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")); }
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")); }
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")); }
public ActionResult FilterByGoal(GOAL model, string goalName) { PopulateGoal("SELECT * FROM GOALS WHERE goalName=@goalName", model.goalName); return(View()); }
public ActionResult FilterByGoal() { var model = new GOAL(); return(View(model)); }
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")); }