//Méthode de supression des participant public ActionResult SuppressionParticipant(int id) { CResponsable resp = (CResponsable)Session["user"]; CParticipant part = ((List <CParticipant>)Session["listParticipant"]).ElementAt(id); resp.DemandeSuppressionParticipant(part); ((List <CParticipant>)Session["listParticipant"]).RemoveAt(id); return(Redirect("../GestionParticipant")); }
//Renvoi au formulaire de modification public ActionResult ModifParticipantForm(int id) { List <CParticipant> list = (List <CParticipant>)Session["listParticipant"]; CParticipant part = list.ElementAt(id); ViewBag.index = id; return(View("ModifParticipantForm", part)); }
private void Participant_Load(object sender, EventArgs e) { try { clParticipant = new CParticipant(connect); this.WindowState = FormWindowState.Maximized; init_data(); } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } }
public Participant(SqlConnection cn, STInfoSeason inf, ushort md) { InitializeComponent(); connect = cn; IS = inf; mode = md; clParticipant = new CParticipant(connect); this.WindowState = FormWindowState.Maximized; }
public DlgParticipant(SqlConnection cn, ushort md) { InitializeComponent(); connect = cn; mode = md; clParticipant = new CParticipant(connect); clParam = new CParamApp(); gid = clParticipant.GetFreeId(); caption = "Ќовый участник"; }
public DlgParticipant(SqlConnection cn, ushort md, STParticipant st) { InitializeComponent(); connect = cn; mode = md; gstParticipant = st; gid = gstParticipant.idpart; clParticipant = new CParticipant(connect); clParam = new CParamApp(); caption = "–едактировать данные участника"; }
private void DlgGameExt_Load(object sender, EventArgs e) { try { clPart = new CParticipant(connect); all = false; init(); //if (data.strinterviea != null) // textBoxIntA.Text = data.strinterviea; //if (data.strintervieb != null) // textBoxIntB.Text = data.strintervieb; } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } }
public ActionResult Index(string email, string pass) { CPersonnel p = new CPersonnel(); object user = p.Connexion(email, pass); if (p.Role == "Admin") { CAdministrateur admin = (CAdministrateur)user; Session["user"] = admin; return(Redirect("GestionPoste")); } else if (p.Role == "Comptable") { CComptable comp = (CComptable)user; Session["user"] = comp; return(Redirect("Comptable")); } else if (p.Role == "Responsable") { CResponsable resp = (CResponsable)user; Session["user"] = resp; return(Redirect("Responsable")); } else if (p.Role == "Participant") { CParticipant part = (CParticipant)user; Session["user"] = part; return(Redirect("Participant")); } else if (p.Role == "Personnel") { Session["user"] = p; return(Redirect("Personnel")); } return(Redirect("Login?error=Login ou mot de passe incorrect")); }
//Methode de modification du personnel public ActionResult ModifParticipant(double salaire, int heureTravail, int index) { List <CParticipant> list = (List <CParticipant>)Session["listParticipant"]; CResponsable resp = (CResponsable)Session["user"]; list.ElementAt(index).Salaire = salaire; list.ElementAt(index).HeureTravail = heureTravail; CParticipant part = list.ElementAt(index); //Test si la modification ne dépasse pas le budget if (resp.DemandeModificationParticipant(part, salaire, heureTravail, ((CPoste)Session["poste"]).Id)) { return(Redirect("GestionParticipant")); } else { Session["listParticipant"] = null; return(Redirect("GestionParticipant?error=Erreur: pas assez de fond")); } }
//Méthode d' ajout des participants public ActionResult AjouterParticipant(double salaire, int heureTravail) { int id = Convert.ToInt32(Request.Form["personnel"]); CResponsable resp = (CResponsable)Session["user"]; CPersonnel persToAdd = ((List <CPersonnel>)Session["listPersonnel"]).ElementAt(id); CParticipant part = (CParticipant)persToAdd; part.Salaire = salaire; part.HeureTravail = heureTravail; //Test si le budget est suffisant if (resp.DemandeAjoutParticipant(part, ((CPoste)Session["poste"]).Id)) { Session["listParticipant"] = null; return(Redirect("GestionParticipant")); } else { return(Redirect("GestionParticipant?error=Erreur: pas assez de fond")); } }
private int get_participant(string text) { int ret = 0; try { char[] del = { ' ' }; string[] words = text.Split(del); string famili = words[0]; string name = words[1]; CParticipant cl = new CParticipant(connect, famili, name); ret = cl.stPart.idpart; } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } return(ret); }
private void out_part() { CParticipant clPart; List <STParticipant> list; List <int> arr; try { clPart = new CParticipant(connect); list = clPart.GetList(); List <STSmartBookPart> lst_smart = new List <STSmartBookPart>(); STSmartBookPart item; foreach (STParticipant row in list) { if (row.post != null) { arr = clPart.GetArrayPost(row.post); foreach (int n in arr) { item = new STSmartBookPart(); item.family = row.family; item.idpart = row.idpart; item.name = row.name; item.post = n; lst_smart.Add(item); } } } CSmartBookPart clSmart = new CSmartBookPart(pathbook); clSmart.Write(lst_smart); } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } }
/* инициализаци¤ списка обслуж. персонала */ private void init_combo_part() { string text = null; try { comboBoxSecretar.Items.Clear(); comboBoxOperPanel.Items.Clear(); comboBoxOperVideo.Items.Clear(); comboBoxMedic.Items.Clear(); comboBoxDiktor.Items.Clear(); comboBoxStatist.Items.Clear(); comboBoxSecretar.Items.Add(""); comboBoxOperPanel.Items.Add(""); comboBoxOperVideo.Items.Add(""); comboBoxMedic.Items.Add(""); comboBoxDiktor.Items.Add(""); comboBoxStatist.Items.Add(""); clParticipant = new CParticipant(connect); List <STParticipant> lst = clParticipant.GetList(); foreach (STParticipant item in lst) { if (item.vf == 1) { text = string.Format("{0} {1}", item.family, item.name); comboBoxSecretar.Items.Add(text); comboBoxOperPanel.Items.Add(text); comboBoxOperVideo.Items.Add(text); comboBoxMedic.Items.Add(text); comboBoxDiktor.Items.Add(text); comboBoxStatist.Items.Add(text); } } } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } }
private void DlgParticipant_Load(object sender, EventArgs e) { string text = null; try { clWork = new CParticipant(connect); clParam = new CParamApp(); clPost = new CPostment(connect); if (oldData != null) { mode = 1; } else { mode = 0; } if (mode == 0) { text = "Ќовый участник"; int n = clWork.GetFreeId(); textBoxId.Text = n.ToString(); textBoxFamily.Focus(); } if (mode == 1) { text = "–едактировать данные участника"; set_data((STParticipant)oldData); } this.Text = text; init_combo_country(); init_list_post(); } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } }
private void DlgGameDays_Load(object sender, EventArgs e) { string text = null; try { clWork = new CGameDays(connect); clPart = new CParticipant(connect); if (oldData != null) { mode = 1; } else { mode = 0; } if (mode == 0) { text = "Новый игровой день"; int n = clWork.GetFreeId(IS.idseason); textBoxNDay.Text = n.ToString(); textBoxCntGame.Focus(); } if (mode == 1) { text = "Редактировать игровой день"; set_data((STGameDays)oldData); } this.Text = text; init_list_admin(); init_list_washer(); } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } }
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 STGameTagsPart read_data() { STGameTagsPart rData = new STGameTagsPart(); rData.diktor = new List <int>(); rData.foto = new List <int>(); rData.interviewa = new List <int>(); rData.interviewb = new List <int>(); rData.komissar = new List <int>(); rData.report = new List <int>(); rData.secretar = new List <int>(); rData.statist = new List <int>(); rData.svabrist = new List <int>(); rData.tablo = new List <int>(); rData.video = new List <int>(); rData.vrach = new List <int>(); rData.t24 = new List <int>(); rData.time = new List <int>(); string text = null; string family = null; string name = null; string[] words; try { // if (textBoxIntA.Text.Length > 0) // rData.strinterviea = textBoxIntA.Text.Trim(); // else rData.strinterviea = null; // if (textBoxIntB.Text.Length > 0) // rData.strintervieb = textBoxIntB.Text.Trim(); // else rData.strintervieb = null; /* секретарь */ for (int i = 0; i < checkedListBoxSecretar.Items.Count; i++) { if (checkedListBoxSecretar.GetItemChecked(i)) { text = checkedListBoxSecretar.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); } rData.secretar.Add(clPart.stPart.idpart); } } /* оператор табло */ for (int i = 0; i < checkedListBoxTable.Items.Count; i++) { if (checkedListBoxTable.GetItemChecked(i)) { text = checkedListBoxTable.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); } rData.tablo.Add(clPart.stPart.idpart); } } /* оператор время */ for (int i = 0; i < checkedListBoxTime.Items.Count; i++) { if (checkedListBoxTime.GetItemChecked(i)) { text = checkedListBoxTime.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); } rData.time.Add(clPart.stPart.idpart); } } /* оператор 24 */ for (int i = 0; i < checkedListBox24.Items.Count; i++) { if (checkedListBox24.GetItemChecked(i)) { text = checkedListBox24.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); } rData.t24.Add(clPart.stPart.idpart); } } /* диктор */ for (int i = 0; i < checkedListBoxDiktor.Items.Count; i++) { if (checkedListBoxDiktor.GetItemChecked(i)) { text = checkedListBoxDiktor.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); } rData.diktor.Add(clPart.stPart.idpart); } } /* врач */ for (int i = 0; i < checkedListBoxVrach.Items.Count; i++) { if (checkedListBoxVrach.GetItemChecked(i)) { text = checkedListBoxVrach.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); } rData.vrach.Add(clPart.stPart.idpart); } } /* комиссар */ for (int i = 0; i < checkedListBoxKomissar.Items.Count; i++) { if (checkedListBoxKomissar.GetItemChecked(i)) { text = checkedListBoxKomissar.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); } rData.komissar.Add(clPart.stPart.idpart); } } /* видео */ for (int i = 0; i < checkedListBoxVideo.Items.Count; i++) { if (checkedListBoxVideo.GetItemChecked(i)) { text = checkedListBoxVideo.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); } rData.video.Add(clPart.stPart.idpart); } } /* фото */ for (int i = 0; i < checkedListBoxFoto.Items.Count; i++) { if (checkedListBoxFoto.GetItemChecked(i)) { text = checkedListBoxFoto.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); } rData.foto.Add(clPart.stPart.idpart); } } /* интревью А */ for (int i = 0; i < checkedListBoxIntrviewA.Items.Count; i++) { if (checkedListBoxIntrviewA.GetItemChecked(i)) { text = checkedListBoxIntrviewA.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); } rData.interviewa.Add(clPart.stPart.idpart); } } /* интервью Б */ for (int i = 0; i < checkedListBoxIntrviewB.Items.Count; i++) { if (checkedListBoxIntrviewB.GetItemChecked(i)) { text = checkedListBoxIntrviewB.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); } rData.interviewb.Add(clPart.stPart.idpart); } } /* швабра */ for (int i = 0; i < checkedListBoxShvabra.Items.Count; i++) { if (checkedListBoxShvabra.GetItemChecked(i)) { text = checkedListBoxShvabra.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); } rData.svabrist.Add(clPart.stPart.idpart); } } /* отчет */ for (int i = 0; i < checkedListBoxReport.Items.Count; i++) { if (checkedListBoxReport.GetItemChecked(i)) { text = checkedListBoxReport.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); } rData.report.Add(clPart.stPart.idpart); } } /* статистика */ for (int i = 0; i < checkedListBoxStats.Items.Count; i++) { if (checkedListBoxStats.GetItemChecked(i)) { text = checkedListBoxStats.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); } rData.statist.Add(clPart.stPart.idpart); } } } catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); } return(rData); }
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 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); } }