Exemple #1
0
        private void FrmAIP_Load(object sender, EventArgs e)
        {
            m_EmployeeAIP = new Employeeaip();

            // load AIP criteria combobox
            Aipcriteria aip = new Aipcriteria();

            cboCritereAIP.DataSource    = aip.GetList().Tables[0];
            cboCritereAIP.DisplayMember = "aipcriteria";
            cboCritereAIP.ValueMember   = "aipcriteriaid";

            // 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_EmployeeAIP.loadEmployeeAIP(m_EmployeeAipID);

                txtDateDebut.Value = m_EmployeeAIP.StartDate;
                txtDateFin.Value   = m_EmployeeAIP.EndDate;
                txtMotif.Text      = m_EmployeeAIP.Motif;
                txtTaux.Text       = m_EmployeeAIP.Taux.ToString();
            }

            if (OpenMode == (int)IEOpenMode.IE_OM_Add)
            {
                cmdSauver.Text = "Ajouter";
                this.Text      = "Ajout d'une nouvelle configuration AIP";
            }
        }
Exemple #2
0
        private void LoadGridEmployee()
        {
            Pemployee oPemployee = new Pemployee();

            dgrUser.DataSource = oPemployee.getList();
            dgrUser.DataMember = "Table";

            dgrUser.Columns["emplid"].Visible          = false;
            dgrUser.Columns["employeetitleid"].Visible = false;
            dgrUser.Columns["roleid"].Visible          = false;

            dgrUser.Columns["lname"].HeaderText            = "Nom";
            dgrUser.Columns["fname"].HeaderText            = "Prénom";
            dgrUser.Columns["flagasynchronous"].HeaderText = "Capsules";
            dgrUser.Columns["email"].HeaderText            = "Email";
            dgrUser.Columns["phone"].HeaderText            = "Téléphone";
            dgrUser.Columns["email"].Width = 200;
        }
Exemple #3
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";
            }
        }
Exemple #4
0
        private void cmdSauver_Click(object sender, EventArgs e)
        {
            if (!checkFields())
            {
                return;
            }

            if (m_EmplID == -1)
            {
                Pemployee oPemployee = new Pemployee();

                oPemployee.Email           = txtEmail.Text;
                oPemployee.Phone           = txtTelephone.Text;
                oPemployee.FName           = txtPrenom.Text;
                oPemployee.LName           = txtNom.Text;
                oPemployee.Login           = txtLogin.Text;
                oPemployee.EmployeeTitleID = (int)cboGrade.SelectedValue;
                oPemployee.Password        = txtMotDePasse.Text;
                oPemployee.RoleID          = 3;

                if (chkAsynchrone.Checked)
                {
                    oPemployee.FlagAsynchronous = (int)Pemployee.IEFlagAsychronous.IE_FA_Allowed;
                }
                else
                {
                    oPemployee.FlagAsynchronous = (int)Pemployee.IEFlagAsychronous.IE_FA_Denied;
                }

                // add the new employee
                oPemployee.add();

                // reload employee grid
                LoadGridEmployee();

                MessageBox.Show("Employé ajouté avec succès", "Team Editor");
            }
            else
            {
                m_CurEmp.loadEmployee(m_EmplID);
                m_CurEmp.LName           = txtNom.Text;
                m_CurEmp.FName           = txtPrenom.Text;
                m_CurEmp.Email           = txtEmail.Text;
                m_CurEmp.Phone           = txtTelephone.Text;
                m_CurEmp.Login           = txtLogin.Text;
                m_CurEmp.EmployeeTitleID = (int)cboGrade.SelectedValue;
                m_CurEmp.Password        = txtMotDePasse.Text;

                if (chkAsynchrone.Checked)
                {
                    m_CurEmp.FlagAsynchronous = (int)Pemployee.IEFlagAsychronous.IE_FA_Allowed;
                }
                else
                {
                    m_CurEmp.FlagAsynchronous = (int)Pemployee.IEFlagAsychronous.IE_FA_Denied;
                }

                // update the current employee
                m_CurEmp.update();

                // reload employee grid
                LoadGridEmployee();

                MessageBox.Show("Employé sauvé avec succès", "Team Editor");
            }
        }
Exemple #5
0
 public FrmUser()
 {
     m_CurEmp = new Pemployee();
     InitializeComponent();
 }