// GET: ViewKQs public ActionResult Index() { StatisticMainModel model = new StatisticMainModel(); var list = context.ListAll(); model.listKQ = list; return(View(model)); }
public static List <ViewKQ> show_New_Result() { StatisticModel model = new StatisticModel(); List <ViewKQ> newList = new List <ViewKQ>(); initFlag(model); //string[] text = new string[2]; var list = model.ListAll(); int number = compare(list); if (number == 0) { return(null); } else { var i = number; for (i = number; i >= 1; i--) { int index = list.Count - i; newList.Add(list[index]); } return(newList); } }
private static void initFlag(StatisticModel model) { if (flag == 0) { var list = model.ListAll(); oldNumber = list.Count; flag = 1; } else { // } }