public static int GetCountOfTactics(Manager manager, int Line) { int opr = Opredelitel(manager, Line, false); return(TableOfTacticOfLine.Select("Определитель = " + opr).Length); }
//TODO internal static ManagerInfo GetManagerInfo(Manager Manager) { DataRow p = TableOfPerson.FindByКод(Manager.Code); DataRow mi = TableOfManagerInfo.FindByКод(Manager.Code); object Name = p["Имя"]; object Country1 = p["Страна1"]; object Country2 = p["Страна2"]; object tacticIndex = mi["Тактика"]; object defIndex = mi["Расстановка защиты"]; object midIndex = mi["Расстановка полузащиты"]; object frwIndex = mi["Расстановка нападения"]; if (Name is DBNull) { Name = ""; } if (Country1 is DBNull) { System.Random RND = new System.Random(); Country1 = RND.Next(1, 221); } if (Country2 is DBNull) { Country2 = 0; } if (tacticIndex is DBNull) { tacticIndex = 4; } if (defIndex is DBNull) { defIndex = 1; } if (midIndex is DBNull) { midIndex = 1; } if (frwIndex is DBNull) { frwIndex = 1; } RingBuffer Tactic = new RingBuffer(7, (int)tacticIndex); //TODO RingBuffer Def = new RingBuffer(0, (int)defIndex); RingBuffer Mid = new RingBuffer(0, (int)midIndex); RingBuffer Frw = new RingBuffer(0, (int)frwIndex); return(new ManagerInfo( Manager.Code, (string)Name, (string)p["Фамилия"], (int)p["Репутация"], p["ДР"].ToString(), (int)Country1, (int)Country2, (RingBuffer)Tactic, (RingBuffer)Def, (RingBuffer)Mid, (RingBuffer)Frw )); }