public ActionResult Mc(int id) { //var tableName = "m"; //DataRow row = MyExcel.GetDetails(tableName, id); var oldFunds = MyExcel.GetDetailsList("f_2", $"[Номер УК]='{id}' And [действующие]=0"); var curFunds = MyExcel.GetDetailsList("f_2", $"[Номер УК]='{id}' And [действующие]=1"); CabinetUkData data = MyExcel.GetDataFromDataSource(id); ViewBag.oldFunds = oldFunds; ViewBag.curFunds = curFunds; return(View(data)); }
public ActionResult Exit(int id) { var tableName = "e"; DataRow row = MyExcel.GetDetails(tableName, id); var fundsTmp = MyExcel.GetDetailsList("fe", $"[Номер выхода]='{id}'"); var fundsIds = String.Join(", ", fundsTmp.Select(x => $"'{x["Id"]}'").ToArray()); fundsIds = fundsIds != "" ? fundsIds : "NULL"; var funds = MyExcel.GetDetailsList("f_2", $"[Id] In ({fundsIds})"); ViewBag.funds = funds; return(View(row)); }