예제 #1
0
        public IActionResult Create(ElectionWard ew)
        {
            int i = ewrepo.Create(ew);

            if (i > 0)
            {
                return(RedirectToAction("index"));
            }
            return(View());
        }
예제 #2
0
        public IActionResult Edit(ElectionWard ew)
        {
            int i = ewrepo.Update(ew);

            if (i > 0)
            {
                return(RedirectToAction("index"));
            }
            return(View(ew));
        }
예제 #3
0
 private static void WriteResults(ref List <string> messages, ElectionWard c, int result)
 {
     if (result > 0)
     {
         messages.Add($"{c.Name} updated with {c.ElectionWardId} wardid");
     }
     else
     {
         messages.Add($"Error Occured");
     }
 }