private void out_place() { CPlace clPlace; List <STPlace> list; List <STSmartBookPlace> lst_smart = new List <STSmartBookPlace>(); STSmartBookPlace item; try { clPlace = new CPlace(connect); list = clPlace.GetListPlace(); foreach (STPlace row in list) { item = new STSmartBookPlace(); item.id = row.id; item.place = row.name; lst_smart.Add(item); } CSmartBookPlace clSmart = new CSmartBookPlace(pathbook); clSmart.Write(lst_smart); } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } }
private STGameDays GetSelectionData() { STGameDays ret = new STGameDays(); CPlace clPlace; int n; int idplace = 0; try { foreach (DataGridViewRow item in dataGridViewGameDays.SelectedRows) { if (item.Cells[0].Value != null) { n = int.Parse(item.Cells[0].Value.ToString()); if (item.Cells[2].Value.ToString() != null) { clPlace = new CPlace(connect, item.Cells[2].Value.ToString()); idplace = clPlace.stPlace.id; } ret = clWork.GetRecord(IS.idseason, n, idplace); } } } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } return(ret); }
/* инициализаци¤ списка площадок */ private void init_combo_place() { try { comboBoxPlace.Items.Clear(); clPlace = new CPlace(connect); List <STPlace> list = clPlace.GetListPlace(); comboBoxPlace.Items.Add(""); if (list.Count > 0) { foreach (STPlace item in list) { if (item.vf == 1) { comboBoxPlace.Items.Add(item.name); } } } else { comboBoxPlace.Enabled = false; } } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } }
private void DlgPlace_Load(object sender, EventArgs e) { this.Text = caption; clPlace = new CPlace(connect); textBoxName.Focus(); }
public DlgGameDays(SqlConnection cn, STInfoSeason si, STGameDays?data) { InitializeComponent(); connect = cn; IS = si; oldData = data; clPlace = new CPlace(connect); init_combo_palce(); }
public Place(SqlConnection cn, STInfoSeason inf, ushort md) { InitializeComponent(); connect = cn; IS = inf; mode = md; clPlace = new CPlace(connect); this.WindowState = FormWindowState.Maximized; gpos = 0; }
private void set_data(STGameDays data) { try { textBoxNDay.Text = data.nday.ToString(); dateTimePickerDate.Value = data.date; textBoxCntGame.Text = data.cntgames.ToString(); clPlace = new CPlace(connect, data.idplace); comboBoxPlace.Text = clPlace.stPlace.name; } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
private STPlace GetSelectionData() { STPlace ret = new STPlace(); string n; foreach (DataGridViewRow item in dataGridViewPlace.SelectedRows) { n = item.Cells[1].Value.ToString(); CPlace sp = new CPlace(connect, n); ret = sp.stPlace; } return(ret); }
/* вспомогательные функции виз. отображения календаря */ private void init_list_add_row(STGame item, int i) { CTeam clTeam = new CTeam(connect); CPlace clPlace = new CPlace(connect); CDivision clDivision = new CDivision(connect); CGroup clGroup = new CGroup(connect); CCity clCity; string text = null; string team1 = null; string team2 = null; Color color = Color.Black; try { if (item.apoints > 0 && item.bpoints > 0) { color = Color.Black; } else { color = Color.Red; } dataGridViewGames.Rows[i].DefaultCellStyle.ForeColor = color; /* вставляем номер игры */ dataGridViewGames.Rows[i].Cells[1].Value = item.idgame; /* игра и результат */ if (item.idteam1 != null) { clTeam = new CTeam(connect, (int)item.idteam1); team1 = clTeam.stTeam.name; } if (item.idteam2 != null) { clTeam = new CTeam(connect, (int)item.idteam2); team2 = clTeam.stTeam.name; } text = string.Format("{0} {1} - {2} {3}", team1, item.apoints, item.bpoints, team2); /* выводим команды которые играют */ dataGridViewGames.Rows[i].Cells[2].Value = text; /* дата и время игры */ if (item.datetime != null) { DateTime dt = (DateTime)item.datetime; text = string.Format("{0} {1}:{2:00}", dt.ToLongDateString(), dt.Hour, dt.Minute); dataGridViewGames.Rows[i].Cells[3].Value = text; } /* место игры */ if (item.idplace != null) { clPlace = new CPlace(connect, (int)item.idplace); clCity = new CCity(connect, clPlace.stPlace.idcity); text = clPlace.stPlace.name; if (clCity.stFullCity.name != null) { text += string.Format(" ({0},{1})", clCity.stFullCity.name, clCity.stFullCity.shortnamecountry); } dataGridViewGames.Rows[i].Cells[4].Value = text; } /* группа */ if (item.idgroup != null) { clGroup = new CGroup(connect, (int)IS.idseason, (int)item.iddivision, (int)item.idgroup); text = string.Format("{0}", clGroup.stGroup.namegroup); dataGridViewGames.Rows[i].Cells[5].Value = text; } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
private STGameDays read_data() { STGameDays ret = new STGameDays(); List <int> arr = new List <int>(); string text = null; string family = null; string name = null; string[] words; try { ret.idseason = IS.idseason; if (textBoxNDay.Text.Length > 0) { ret.nday = int.Parse(textBoxNDay.Text.Trim()); } else { ret.nday = 0; } ret.date = new DateTime(dateTimePickerDate.Value.Year, dateTimePickerDate.Value.Month, dateTimePickerDate.Value.Day, 0, 0, 0, 0); if (textBoxCntGame.Text.Length > 0) { ret.cntgames = int.Parse(textBoxCntGame.Text.Trim()); } else { ret.cntgames = 0; } for (int i = 0; i < checkedListBoxAdmin.Items.Count; i++) { if (checkedListBoxAdmin.GetItemChecked(i)) { text = checkedListBoxAdmin.Items[i].ToString(); if (text.Length > 0) { char[] del = { ' ' }; words = text.Split(del); family = words[0]; name = words[1]; clPart = new CParticipant(connect, family, name); } arr.Add(clPart.stPart.idpart); } } if (arr.Count > 0) { ret.adminline = clWork.GetStringData(arr); } else { ret.adminline = null; } arr = new List <int>(); for (int i = 0; i < checkedListBoxWasher.Items.Count; i++) { if (checkedListBoxWasher.GetItemChecked(i)) { text = checkedListBoxWasher.Items[i].ToString(); if (text.Length > 0) { char[] del = { ' ' }; words = text.Split(del); family = words[0]; name = words[1]; clPart = new CParticipant(connect, family, name); } arr.Add(clPart.stPart.idpart); } } if (arr.Count > 0) { ret.washerline = clWork.GetStringData(arr); } else { ret.washerline = null; } if (comboBoxPlace.Text.Length > 1) { clPlace = new CPlace(connect, comboBoxPlace.Text.Trim()); ret.idplace = clPlace.stPlace.id; } else { ret.idplace = 0; } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } return(ret); }
private void init_data_history() { string text, tm1, tm2; CInfoSeason clIS = new CInfoSeason(connect); STInfoSeason st; DateTime dt; CPlace clPlace; try { // if (MessageBox.Show("Обнулить данные?", "Внимание!", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) // == DialogResult.OK) // { // dataGridViewPersonalResult.Rows.Clear(); // cnt = 1; // } dataGridViewPersonalResult.Rows.Clear(); cnt = 1; if (list_data.Count > 0) { dataGridViewPersonalResult.Rows.Add(list_data.Count); for (int i = 0; i < list_data.Count; i++) { dataGridViewPersonalResult.Rows[i].Cells[0].Value = cnt.ToString(); clIS = new CInfoSeason(connect, list_data[i].idseason); st = (STInfoSeason)clIS.s_IS; dataGridViewPersonalResult.Rows[i].Cells[1].Value = st.nameseason; dataGridViewPersonalResult.Rows[i].Cells[2].Value = list_data[i].idgame; clTeam = new CTeam(connect, (int)list_data[i].idteam1); tm1 = clTeam.stTeam.name; clTeam = new CTeam(connect, (int)list_data[i].idteam2); tm2 = clTeam.stTeam.name; text = string.Format("{0} {1} - {2} {3}", tm1, list_data[i].apoints, list_data[i].bpoints, tm2); dataGridViewPersonalResult.Rows[i].Cells[3].Value = text; dt = (DateTime)list_data[i].datetime; text = dt.ToShortDateString(); dataGridViewPersonalResult.Rows[i].Cells[4].Value = text; clPlace = new CPlace(connect, (int)list_data[i].idplace); dataGridViewPersonalResult.Rows[i].Cells[5].Value = clPlace.stPlace.name; cnt++; } } } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } }
private void init_data() { string text; List <int> arr; bool fl; bool fll; int curmonth = 0; Color colorfont; try { dataGridViewGameDays.Rows.Clear(); list = clWork.GetData(IS.idseason); if (list.Count > 0) { dataGridViewGameDays.Rows.Add(list.Count); curmonth = list[0].date.Month; fll = false; for (int i = 0; i < list.Count; i++) { if (curmonth != list[i].date.Month) { curmonth = list[i].date.Month; fll = !fll; } if (fll) { colorfont = Color.LightCyan; } else { colorfont = Color.White; } dataGridViewGameDays.Rows[i].DefaultCellStyle.BackColor = colorfont; dataGridViewGameDays.Rows[i].Cells[0].Value = list[i].nday; dataGridViewGameDays.Rows[i].Cells[1].Value = list[i].date.ToLongDateString(); if (list[i].idplace > 0) { clPlace = new CPlace(connect, list[i].idplace); dataGridViewGameDays.Rows[i].Cells[2].Value = clPlace.stPlace.name; } else { dataGridViewGameDays.Rows[i].Cells[2].Value = ""; } dataGridViewGameDays.Rows[i].Cells[3].Value = list[i].cntgames; if (list[i].adminline != null) { arr = clWork.GetArrayData(list[i].adminline); if (arr.Count > 0) { text = null; fl = false; foreach (int n in arr) { clPart = new CParticipant(connect, n); if (fl == false) { text = string.Format("{0} {1}", clPart.stPart.family, clPart.stPart.name); fl = true; } else { text += ", " + string.Format("{0} {1}", clPart.stPart.family, clPart.stPart.name); } } dataGridViewGameDays.Rows[i].Cells[4].Value = text; } } if (list[i].washerline != null) { arr = clWork.GetArrayData(list[i].washerline); if (arr.Count > 0) { text = null; fl = false; foreach (int n in arr) { clPart = new CParticipant(connect, n); if (fl == false) { text = string.Format("{0} {1}", clPart.stPart.family, clPart.stPart.name); fl = true; } else { text += ", " + string.Format("{0} {1}", clPart.stPart.family, clPart.stPart.name); } } dataGridViewGameDays.Rows[i].Cells[5].Value = text; } } if (flawour.Equals(list[i])) { gpos = i; } } dataGridViewGameDays.AllowUserToAddRows = false; if (gpos <= 0) { dataGridViewGameDays.FirstDisplayedScrollingRowIndex = list.Count - 1; } } else { dataGridViewGameDays.AllowUserToAddRows = false; } } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } }
private STGame read_data() { STGame ret = new STGame(); try { /* сезон */ ret.idseason = IS.idseason; /* тип игры */ ret.type = gType; /* номер игры */ if (textBoxNum.Text.Length > 0) { ret.idgame = int.Parse(textBoxNum.Text.Trim()); } /* дата\врем¤ игры */ ret.datetime = new DateTime(dateTimePickerDate.Value.Year, dateTimePickerDate.Value.Month, dateTimePickerDate.Value.Day, dateTimePickerTime.Value.Hour, dateTimePickerTime.Value.Minute, 0, 0); /* дивизион */ if (comboBoxDivision.Text.Length > 0) { clDivision = new CDivision(connect, IS.idseason, comboBoxDivision.Text); ret.iddivision = clDivision.stDiv.id; } else { ret.iddivision = 0; } /* стади¤ */ if (comboBoxStage.Text.Length > 0) { clScheme = new CScheme(connect, IS.idseason, (int)ret.iddivision, comboBoxStage.Text.Trim()); ret.idstage = clScheme.stScheme.idstage; } else { ret.idstage = null; } /* группа */ if (comboBoxGroup.Text.Length > 0) { clGroup = new CGroup(connect, IS.idseason, (int)ret.iddivision, comboBoxGroup.Text.Trim()); ret.idgroup = clGroup.stGroup.idgroup; } else { ret.idgroup = null; } /* номер тура */ if (comboBoxRound.Text.Length > 0) { ret.round = int.Parse(comboBoxRound.Text.Trim()); } else { ret.round = null; } /* площадка */ if (comboBoxPlace.Text.Length > 0) { clPlace = new CPlace(connect, comboBoxPlace.Text.Trim()); ret.idplace = clPlace.stPlace.id; } else { ret.idplace = null; } /* команда 1 */ if (comboBoxTeam1.Text.Length > 0) { clTeam = new CTeam(connect, comboBoxTeam1.Text.Trim()); ret.idteam1 = clTeam.stTeam.id; } else { ret.idteam1 = null; } /* команда 2 */ if (comboBoxTeam2.Text.Length > 0) { clTeam = new CTeam(connect, comboBoxTeam2.Text.Trim()); ret.idteam2 = clTeam.stTeam.id; } else { ret.idteam2 = null; } /* данный команд */ if (textBoxAPer1.Text.Length > 0) { ret.aper1 = int.Parse(textBoxAPer1.Text.Trim()); } else { ret.aper1 = null; } if (textBoxAPer2.Text.Length > 0) { ret.aper2 = int.Parse(textBoxAPer2.Text.Trim()); } else { ret.aper2 = null; } if (textBoxADopPer.Text.Length > 0) { ret.adopper = int.Parse(textBoxADopPer.Text.Trim()); } else { ret.adopper = null; } if (textBoxAF1.Text.Length > 0) { ret.ateamfouls1 = int.Parse(textBoxAF1.Text.Trim()); } else { ret.ateamfouls1 = null; } if (textBoxAF2.Text.Length > 0) { ret.ateamfouls2 = int.Parse(textBoxAF2.Text.Trim()); } else { ret.ateamfouls2 = null; } if (textBoxAF3.Text.Length > 0) { ret.ateamfouls3 = int.Parse(textBoxAF3.Text.Trim()); } else { ret.ateamfouls3 = null; } if (textBoxAF4.Text.Length > 0) { ret.ateamfouls4 = int.Parse(textBoxAF4.Text.Trim()); } else { ret.ateamfouls4 = null; } if (textBoxBPer1.Text.Length > 0) { ret.bper1 = int.Parse(textBoxBPer1.Text.Trim()); } else { ret.bper1 = null; } if (textBoxBPer2.Text.Length > 0) { ret.bper2 = int.Parse(textBoxBPer2.Text.Trim()); } else { ret.bper2 = null; } if (textBoxBDopPer.Text.Length > 0) { ret.bdopper = int.Parse(textBoxBDopPer.Text.Trim()); } else { ret.bdopper = null; } if (textBoxBF1.Text.Length > 0) { ret.bteamfouls1 = int.Parse(textBoxBF1.Text.Trim()); } else { ret.bteamfouls1 = null; } if (textBoxBF2.Text.Length > 0) { ret.bteamfouls2 = int.Parse(textBoxBF2.Text.Trim()); } else { ret.bteamfouls2 = null; } if (textBoxBF3.Text.Length > 0) { ret.bteamfouls3 = int.Parse(textBoxBF3.Text.Trim()); } else { ret.bteamfouls3 = null; } if (textBoxBF4.Text.Length > 0) { ret.bteamfouls4 = int.Parse(textBoxBF4.Text.Trim()); } else { ret.bteamfouls4 = null; } if (textBoxAPoints1.Text.Length > 0) { ret.apointsper1 = int.Parse(textBoxAPoints1.Text.Trim()); } else { ret.apointsper1 = null; } if (textBoxAPoints2.Text.Length > 0) { ret.apointsper2 = int.Parse(textBoxAPoints2.Text.Trim()); } else { ret.apointsper2 = null; } if (textBoxAPoints3.Text.Length > 0) { ret.apointsper3 = int.Parse(textBoxAPoints3.Text.Trim()); } else { ret.apointsper3 = null; } if (textBoxAPoints4.Text.Length > 0) { ret.apointsper4 = int.Parse(textBoxAPoints4.Text.Trim()); } else { ret.apointsper4 = null; } if (textBoxADopPoints.Text.Length > 0) { ret.apointsdopper = int.Parse(textBoxADopPoints.Text.Trim()); } else { ret.apointsdopper = null; } if (textBoxAPoints.Text.Length > 0) { ret.apoints = int.Parse(textBoxAPoints.Text.Trim()); } else { ret.apoints = null; } if (textBoxBPoints1.Text.Length > 0) { ret.bpointsper1 = int.Parse(textBoxBPoints1.Text.Trim()); } else { ret.bpointsper1 = null; } if (textBoxBPoints2.Text.Length > 0) { ret.bpointsper2 = int.Parse(textBoxBPoints2.Text.Trim()); } else { ret.bpointsper2 = null; } if (textBoxBPoints3.Text.Length > 0) { ret.bpointsper3 = int.Parse(textBoxBPoints3.Text.Trim()); } else { ret.bpointsper3 = null; } if (textBoxBPoints4.Text.Length > 0) { ret.bpointsper4 = int.Parse(textBoxBPoints4.Text.Trim()); } else { ret.bpointsper4 = null; } if (textBoxBDopPoints.Text.Length > 0) { ret.bpointsdopper = int.Parse(textBoxBDopPoints.Text.Trim()); } else { ret.bpointsdopper = null; } if (textBoxBPoints.Text.Length > 0) { ret.bpoints = int.Parse(textBoxBPoints.Text.Trim()); } else { ret.bpoints = null; } /* флаг технического результата */ if (checkBoxTeh.Checked == true) { ret.flagteh = 1; } else { ret.flagteh = 0; } /* команда - победитель */ if (ret.apoints > ret.bpoints) { ret.idteamwins = ret.idteam1; } else if (ret.apoints < ret.bpoints) { ret.idteamwins = ret.idteam2; } else { ret.idteamwins = null; } /* судьи */ if (comboBoxStReferee.Text.Length > 0) { ret.idstreferee = get_referee(comboBoxStReferee.Text.Trim()); } else { ret.idstreferee = null; } if (comboBoxReferee1.Text.Length > 0) { ret.idreferee1 = get_referee(comboBoxReferee1.Text.Trim()); } else { ret.idreferee1 = null; } if (comboBoxReferee2.Text.Length > 0) { ret.idreferee2 = get_referee(comboBoxReferee2.Text.Trim()); } else { ret.idreferee2 = null; } /* оценки судь¤м */ if (textBoxPointsStrefree.Text.Length > 0) { ret.srrefereepoints = double.Parse(textBoxPointsStrefree.Text.Trim()); } else { ret.srrefereepoints = null; } if (textBoxPointsReferee1.Text.Length > 0) { ret.referee1points = double.Parse(textBoxPointsReferee1.Text.Trim()); } else { ret.referee1points = null; } if (textBoxPointsReferee2.Text.Length > 0) { ret.referee2points = double.Parse(textBoxPointsReferee2.Text.Trim()); } else { ret.referee2points = null; } /* секретарь */ if (comboBoxSecretar.Text.Length > 0) { ret.idwriting = get_participant(comboBoxSecretar.Text.Trim()); } else { ret.idwriting = null; } /* секретарь */ if (comboBoxOperPanel.Text.Length > 0) { ret.idoperpanel = get_participant(comboBoxOperPanel.Text.Trim()); } else { ret.idoperpanel = null; } /* видеооператор */ if (comboBoxOperVideo.Text.Length > 0) { ret.idopervideo = get_participant(comboBoxOperVideo.Text.Trim()); } else { ret.idopervideo = null; } /* врач */ if (comboBoxMedic.Text.Length > 0) { ret.idmedical = get_participant(comboBoxMedic.Text.Trim()); } else { ret.idmedical = null; } /* диктор */ if (comboBoxDiktor.Text.Length > 0) { ret.iddiktor = get_participant(comboBoxDiktor.Text.Trim()); } else { ret.iddiktor = null; } /* подсчЄт статистики */ if (comboBoxStatist.Text.Length > 0) { ret.idstatister = get_participant(comboBoxStatist.Text.Trim()); } else { ret.idstatister = null; } /* остальна¤ статистика */ if (textBoxCntLook.Text.Length > 0) { ret.cntlook = int.Parse(textBoxCntLook.Text.Trim()); } else { ret.cntlook = null; } if (textBoxChangeLider.Text.Length > 0) { ret.changelider = int.Parse(textBoxChangeLider.Text.Trim()); } else { ret.changelider = null; } if (textBoxMaxPointsA.Text.Length > 0) { ret.maxpointsteam1 = int.Parse(textBoxMaxPointsA.Text.Trim()); } else { ret.maxpointsteam1 = null; } if (textBoxMaxPointsB.Text.Length > 0) { ret.maxpointsteam2 = int.Parse(textBoxMaxPointsB.Text.Trim()); } else { ret.maxpointsteam2 = null; } if (textBoxEqualsResult.Text.Length > 0) { ret.equalsresult = int.Parse(textBoxEqualsResult.Text.Trim()); } else { ret.equalsresult = null; } if (textBoxMaxDiff.Text.Length > 0) { ret.maxdiff = int.Parse(textBoxMaxDiff.Text.Trim()); } else { ret.maxdiff = null; } fread = true; } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); fread = false; } return(ret); }
private void PrepareEditGame(STGame data) { string text; try { /* номер игры */ textBoxNum.Text = data.idgame.ToString(); /* дата\врем¤ игры */ if (data.datetime != null) { dateTimePickerDate.Value = new DateTime(data.datetime.Value.Year, data.datetime.Value.Month, data.datetime.Value.Day, 0, 0, 0, 0); dateTimePickerTime.Value = new DateTime(data.datetime.Value.Year, data.datetime.Value.Month, data.datetime.Value.Day, data.datetime.Value.Hour, data.datetime.Value.Minute, 0, 0); } /* дивизион */ if (data.iddivision != null) { clDivision = new CDivision(connect, IS.idseason, (int)data.iddivision); comboBoxDivision.Text = clDivision.stDiv.name; } /* стади¤ */ if (data.idstage != null) { clScheme = new CScheme(connect, IS.idseason, (int)data.iddivision, (int)data.idstage); comboBoxStage.Text = clScheme.stScheme.namestage; } /* группа */ if (data.idgroup != null) { clGroup = new CGroup(connect, IS.idseason, (int)data.iddivision, (int)data.idgroup); comboBoxGroup.Text = clGroup.stGroup.namegroup; } /* номер тура */ if (data.round != null) { comboBoxRound.Text = data.round.ToString(); } /* площадка */ if (data.idplace != null) { clPlace = new CPlace(connect, (int)data.idplace); comboBoxPlace.Text = clPlace.stPlace.name; } /* команда 1 */ if (data.idteam1 != null) { clTeam = new CTeam(connect, (int)data.idteam1); comboBoxTeam1.Text = clTeam.stTeam.name; } /* команда 2 */ if (data.idteam2 != null) { clTeam = new CTeam(connect, (int)data.idteam2); comboBoxTeam2.Text = clTeam.stTeam.name; } /* данный команд */ if (data.aper1 != null) { textBoxAPer1.Text = data.aper1.ToString(); } if (data.aper2 != null) { textBoxAPer2.Text = data.aper2.ToString(); } if (data.adopper != null) { textBoxADopPer.Text = data.adopper.ToString(); } if (data.ateamfouls1 != null) { textBoxAF1.Text = data.ateamfouls1.ToString(); } if (data.ateamfouls2 != null) { textBoxAF2.Text = data.ateamfouls2.ToString(); } if (data.ateamfouls3 != null) { textBoxAF3.Text = data.ateamfouls3.ToString(); } if (data.ateamfouls4 != null) { textBoxAF4.Text = data.ateamfouls4.ToString(); } if (data.bper1 != null) { textBoxBPer1.Text = data.bper1.ToString(); } if (data.bper2 != null) { textBoxBPer2.Text = data.bper2.ToString(); } if (data.bdopper != null) { textBoxBDopPer.Text = data.bdopper.ToString(); } if (data.bteamfouls1 != null) { textBoxBF1.Text = data.bteamfouls1.ToString(); } if (data.bteamfouls2 != null) { textBoxBF2.Text = data.bteamfouls2.ToString(); } if (data.bteamfouls3 != null) { textBoxBF3.Text = data.bteamfouls3.ToString(); } if (data.bteamfouls4 != null) { textBoxBF4.Text = data.bteamfouls4.ToString(); } if (data.apointsper1 != null) { textBoxAPoints1.Text = data.apointsper1.ToString(); } if (data.apointsper2 != null) { textBoxAPoints2.Text = data.apointsper2.ToString(); } if (data.apointsper3 != null) { textBoxAPoints3.Text = data.apointsper3.ToString(); } if (data.apointsper4 != null) { textBoxAPoints4.Text = data.apointsper4.ToString(); } if (data.apointsdopper != null) { textBoxADopPoints.Text = data.apointsdopper.ToString(); } if (data.apoints != null) { textBoxAPoints.Text = data.apoints.ToString(); } if (data.bpointsper1 != null) { textBoxBPoints1.Text = data.bpointsper1.ToString(); } if (data.bpointsper2 != null) { textBoxBPoints2.Text = data.bpointsper2.ToString(); } if (data.bpointsper3 != null) { textBoxBPoints3.Text = data.bpointsper3.ToString(); } if (data.bpointsper4 != null) { textBoxBPoints4.Text = data.bpointsper4.ToString(); } if (data.bpointsdopper != null) { textBoxBDopPoints.Text = data.bpointsdopper.ToString(); } if (data.bpoints != null) { textBoxBPoints.Text = data.bpoints.ToString(); } /* флаг технического результата */ if (data.flagteh != null) { if (data.flagteh == 1) { checkBoxTeh.Checked = true; } } /* команда - победитель */ if (data.idteamwins != null) { clTeam = new CTeam(connect, (int)data.idteamwins); labelTeamWins.Text = clTeam.stTeam.name; } /* судьи */ if (data.idstreferee != null) { clReferee = new CReferee(connect, (int)data.idstreferee); text = string.Format("{0} {1}", clReferee.stRef.family, clReferee.stRef.name); comboBoxStReferee.Text = text; } if (data.idreferee1 != null) { clReferee = new CReferee(connect, (int)data.idreferee1); text = string.Format("{0} {1}", clReferee.stRef.family, clReferee.stRef.name); comboBoxReferee1.Text = text; } if (data.idreferee2 != null) { clReferee = new CReferee(connect, (int)data.idreferee2); text = string.Format("{0} {1}", clReferee.stRef.family, clReferee.stRef.name); comboBoxReferee2.Text = text; } /* оценки судь¤м */ if (data.srrefereepoints != null) { textBoxPointsStrefree.Text = data.srrefereepoints.ToString(); } if (data.referee1points != null) { textBoxPointsReferee1.Text = data.referee1points.ToString(); } if (data.referee2points != null) { textBoxPointsReferee2.Text = data.referee2points.ToString(); } /* секретарь */ if (data.idwriting != null) { clParticipant = new CParticipant(connect, (int)data.idwriting); text = string.Format("{0} {1}", clParticipant.stPart.family, clParticipant.stPart.name); comboBoxSecretar.Text = text; } /* секретарь */ if (data.idoperpanel != null) { clParticipant = new CParticipant(connect, (int)data.idoperpanel); text = string.Format("{0} {1}", clParticipant.stPart.family, clParticipant.stPart.name); comboBoxOperPanel.Text = text; } /* видеооператор */ if (data.idopervideo != null) { clParticipant = new CParticipant(connect, (int)data.idopervideo); text = string.Format("{0} {1}", clParticipant.stPart.family, clParticipant.stPart.name); comboBoxOperVideo.Text = text; } /* врач */ if (data.idmedical != null) { clParticipant = new CParticipant(connect, (int)data.idmedical); text = string.Format("{0} {1}", clParticipant.stPart.family, clParticipant.stPart.name); comboBoxMedic.Text = text; } /* диктор */ if (data.iddiktor != null) { clParticipant = new CParticipant(connect, (int)data.iddiktor); text = string.Format("{0} {1}", clParticipant.stPart.family, clParticipant.stPart.name); comboBoxDiktor.Text = text; } /* подсчЄт статистики */ if (data.idstatister != null) { clParticipant = new CParticipant(connect, (int)data.idstatister); text = string.Format("{0} {1}", clParticipant.stPart.family, clParticipant.stPart.name); comboBoxStatist.Text = text; } /* остальна¤ статистика */ if (data.cntlook != null) { textBoxCntLook.Text = data.cntlook.ToString(); } if (data.changelider != null) { textBoxChangeLider.Text = data.changelider.ToString(); } if (data.maxpointsteam1 != null) { textBoxMaxPointsA.Text = data.maxpointsteam1.ToString(); } if (data.maxpointsteam2 != null) { textBoxMaxPointsB.Text = data.maxpointsteam2.ToString(); } if (data.equalsresult != null) { textBoxEqualsResult.Text = data.equalsresult.ToString(); } if (data.maxdiff != null) { textBoxMaxDiff.Text = data.maxdiff.ToString(); } } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } }