public FrmTeam() { m_WkgID = -1; m_pWorkgroup = new Pworkgroup(); InitializeComponent(); }
private void LoadComboTeam() { Pworkgroup pTeam = new Pworkgroup(); cboTeam.DisplayMember = "wkgname"; cboTeam.ValueMember = "wkgid"; cboTeam.DataSource = pTeam.GetListByType((int)Pworkgroup.IEType.IE_T_Team).Tables[0]; }
private void FrmAILE_Load(object sender, EventArgs e) { m_EmployeeAILE = new Employeeaile(); // load AILE criteria combobox Ailecriteria aile = new Ailecriteria(); cboCritereAILE.DataSource = aile.GetList().Tables[0]; cboCritereAILE.DisplayMember = "ailecriteria"; cboCritereAILE.ValueMember = "ailecriteriaid"; // load Combobox TEAM Pworkgroup pworkgrp = new Pworkgroup(); cboEquipe.DataSource = pworkgrp.GetListByType((int)Pworkgroup.IEType.IE_T_Team).Tables[0]; cboEquipe.DisplayMember = "wkgname"; cboEquipe.ValueMember = "wkgid"; // get employee name for display Pemployee oPemployee = new Pemployee(); oPemployee.loadEmployee(m_EmplID); txtEmploye.Text = oPemployee.LName + " " + oPemployee.FName; // check open mode if (OpenMode == (int)IEOpenMode.IE_OM_Edit || OpenMode == (int)IEOpenMode.IE_OM_View) { m_EmployeeAILE.loadEmployeeAILE(m_EmployeeAileID); txtDateDebut.Value = m_EmployeeAILE.StartDate; txtDateFin.Value = m_EmployeeAILE.EndDate; txtMotif.Text = m_EmployeeAILE.Motif; txtTaux.Text = m_EmployeeAILE.Taux.ToString(); cboEquipe.SelectedValue = m_EmployeeAILE.WkgID; cboCritereAILE.SelectedValue = m_EmployeeAILE.AileCriteriaID; } if (OpenMode == (int)IEOpenMode.IE_OM_Add) { cmdSauver.Text = "Ajouter"; this.Text = "Ajout d'une nouvelle configuration AILE"; } }
private void FrmTeam_Load(object sender, EventArgs e) { Pworkgroup oPworkgroup = new Pworkgroup(); m_Year = DateTime.Now.Year; m_YearManual = DateTime.Now.Year; // load Team Grid LoadGridTeam(); if (grdTeam.Rows.Count > 0) { grdTeam.Rows[0].Selected = true; } // load parentGroup combobox cboGroupe.DisplayMember = "wkgname"; cboGroupe.ValueMember = "wkgid"; cboGroupe.DataSource = oPworkgroup.GetListByType((int)Pworkgroup.IEType.IE_T_Workgroup).Tables[0]; }
private void LoadGridTeam() { Pworkgroup oWorkgroup = new Pworkgroup(); grdTeam.DataSource = oWorkgroup.GetListByType((int)Pworkgroup.IEType.IE_T_Team); grdTeam.DataMember = "Table"; grdTeam.Columns["wkgid"].Visible = false; grdTeam.Columns["eptflag"].Visible = false; grdTeam.Columns["creationdate"].Visible = false; grdTeam.Columns["wkgparent"].Visible = false; grdTeam.Columns["wkgtype"].Visible = false; grdTeam.Columns["wkgname"].HeaderText = "Equipe"; grdTeam.Columns["phone"].HeaderText = "Téléphone"; grdTeam.Columns["country"].HeaderText = "Pays"; grdTeam.Columns["street"].HeaderText = "Rue"; grdTeam.Columns["npalocality"].HeaderText = "Localité"; grdTeam.Columns["municipality"].HeaderText = "Commune"; grdTeam.Columns["mission"].HeaderText = "Mission"; grdTeam.Columns["wkgpercent"].HeaderText = "% / Groupe"; grdTeam.Columns["wkgparentname"].HeaderText = "Groupe parent"; grdTeam.Columns["vocation"].HeaderText = "Vocation"; }
private void UpdateTotalPercent() { Pworkgroup wkg = new Pworkgroup(); if (cboGroupe.SelectedIndex != -1) { if (txtPercent.Text != "" && m_WkgID == -1) { txtPercentTotal.Text = Convert.ToString(wkg.GetPercentForGroup((int)cboGroupe.SelectedValue) + Convert.ToInt32(txtPercent.Text)); } else { txtPercentTotal.Text = Convert.ToString(wkg.GetPercentForGroup((int)cboGroupe.SelectedValue)); } } if (Convert.ToInt32(txtPercentTotal.Text) > 100) { MessageBox.Show("Le groupe possède un total d'activité plus grand que 100%. Veuillez corriger le pourcentage d'activité de l'équipe"); txtPercent.Focus(); txtPercent.SelectAll(); } }