public ActionResult Card(Guid id, Card model) { model.id = id; if (ModelState.IsValid && Context.UpdateCard(model)) { ViewBag.isPost = true; } ViewData["jobs"] = Context.Jobs(Context.FindJob(model.job_id).BoardId); return View(model); }
public bool UpdateCard(Card model) { Task.Run(async () => { try { await project_flux.API.Card.Update(model.id, model.job_id, model.title, model.description, model.weight_id, model.date, model.color); return true; } catch { return false; } }).Wait(); return false; }
public Card FindCard(Guid CardId) { Card card = new Card(); Task.Run(async () => { try { var iCard = await project_flux.API.Card.GetCardByID(CardId); card.id = iCard.Id; card.color = iCard.Color; card.date = iCard.DueDate; card.title = iCard.Name; card.description = iCard.Description; card.job_id = iCard.JobId; card.weight_id = iCard.Weight; } catch { } }).Wait(); return card; }
public ActionResult AddCard(Guid id, Card model) { if (ModelState.IsValid && Context.AddCard(model)) { ViewBag.isPost = true; } ViewData["jobs"] = Context.Jobs(id); return View(model); }