4.1.
Лістинг 8.4.1 - Отримання таблиці з оценкаміDataTable MarkPupil (Connection con, int PupilID, string Table_MarkPupil, string Mark_ID, string MarkPupil_ID, string MarkClass_ID, string MarkSyn_ID)
{com = new SqlCommand ();. Connection = con.Con; table = new DataTable (); count;. CommandText = "SELECT COUNT (*) FROM" + Table_MarkPupil;. Open (); = (int) com.ExecuteScalar ();. Close ();
# region Отримання списку рівнів классовcountLayerClass;. CommandText = "SELECT COUNT (*) FROM TABLE_LAYERCLASS";. Open (); = (int) com.ExecuteScalar ();. Close (); [ ] LayerClassIDMas = new int [countLayerClass]; [] LayerClassMas = new string [countLayerClass]; k = 0;. CommandText = "SELECT LAYERCLASSID FROM TABLE_LAYERCLASS";. Open (); LayerClassIDReader = com.ExecuteReader (CommandBehavior.CloseConnection); (LayerClassIDReader.Read ())
{[k] = LayerClassIDReader.GetInt32 (0); + +;
}. Close ();. Close (); = 0;. CommandText = "SELECT LAYERCLASS FROM TABLE_LAYERCLASS";. Open (); LayerClassReader = com.ExecuteReader (CommandBehavior.CloseConnection); ( LayerClassReader.Read ())
{[k] = LayerClassReader.GetString (0); + +;
}. Close ();. Close (); = 0;
# endregion
# region Отримання списку предметовcountSyn;. CommandText = "SELECT COUNT (*) FROM TABLE_SYN";. Open (); = (int) com.ExecuteScalar ();. Close (); [] SynMasID = new int [countSyn];. CommandText = "SELECT SYNID FROM TABLE_SYN";. Open (); SynIDReader = com.ExecuteReader (CommandBehavior.CloseConnection); (SynIDReader.Read ())
{[k] = SynIDReader.GetInt32 (0); + +;
}. Close ();. Close (); = 0; [] SynMas = new string [countSyn];. CommandText = "SELECT SYN FROM TABLE_SYN";. Open (); SynReader = com.ExecuteReader (CommandBehavior.CloseConnection); (SynReader.Read ())
{[k] = SynReader.GetString (0); + +;
}. Close ();. Close (); = 0;
# endregion
# region Отримання списку оценокcountMark;. CommandText = "SELECT COUNT (*) FROM TABLE_MARK";. Open (); = (int) com.ExecuteScalar ();. Close (); [] MarkMasID = new int [countMark];. CommandText = "SELECT MARKID FROM TABLE_MARK";. Open (); MarkIDReader = com.ExecuteReader (CommandBehavior.CloseConnection); (MarkIDReader.Read ())
{[k] = MarkIDReader.GetInt32 (0); + +;
}. Close ();. Close (); = 0; [] MarkMas = new string [countMark];. CommandText = "SELECT MARK FROM TABLE_MARK";. Open (); MarkReader = com.ExecuteReader (CommandBehavior.CloseConnection); (MarkReader.Read ())
{[k] = MarkReader.GetString (0); + +;
}. Close ();. Close (); = 0;
# endregion.Columns.Add ("Предмет", typeof...