public UcWKFMotifRejet(Galatee.Silverlight.ServiceAccueil.CsInfoDemandeWorkflow dmdInfo)
 {
     InitializeComponent();
     _infoDemande             = new ServiceAccueil.CsInfoDemandeWorkflow();
     _infoDemande             = dmdInfo;
     prgBar.Visibility        = System.Windows.Visibility.Collapsed;
     LblChargement.Visibility = System.Windows.Visibility.Collapsed;
     txtCodeDemande.Text      = dmdInfo.CODE_DEMANDE_TABLE_TRAVAIL;
 }
        void RejeterDemande(Galatee.Silverlight.ServiceAccueil.CsInfoDemandeWorkflow dmdInfo)
        {
            prgBar.Visibility        = System.Windows.Visibility.Visible;
            LblChargement.Visibility = System.Windows.Visibility.Visible;
            OKButton.IsEnabled       = false;
            CancelButton.IsEnabled   = false;

            WorkflowClient client = new WorkflowClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Workflow"));

            client.Endpoint.Binding.OpenTimeout       = new TimeSpan(0, 1, 0);
            client.Endpoint.Binding.CloseTimeout      = new TimeSpan(5, 0, 0);
            client.Endpoint.Binding.SendTimeout       = new TimeSpan(5, 0, 0);
            client.ExecuterActionSurDemandeCompleted += (sender, args) =>
            {
                prgBar.Visibility        = System.Windows.Visibility.Collapsed;
                LblChargement.Visibility = System.Windows.Visibility.Collapsed;
                OKButton.IsEnabled       = true;
                CancelButton.IsEnabled   = true;

                if (args.Cancelled || args.Error != null)
                {
                    string error = args.Error.Message;
                    Message.Show(error, "Rejet demande");
                    return;
                }
                if (args.Result == null)
                {
                    Message.ShowError(Languages.msgErreurChargementDonnees, "Rejet demande");
                    return;
                }
                if (args.Result.StartsWith("ERR"))
                {
                    Message.ShowError(args.Result, "Rejet demande");
                }
                else
                {
                    Message.ShowInformation(args.Result, "Rejet demande");
                    ParentG.Close();
                    this.DialogResult = true;
                }
            };
            client.ExecuterActionSurDemandeAsync(null != dmdInfo ? dmdInfo.CODE : _infoDemande.CODE, SessionObject.Enumere.REJETER, UserConnecte.matricule, txtMotif.Text);
        }
        public UcWKFSelectEtape(Galatee.Silverlight.ServiceAccueil.CsInfoDemandeWorkflow _dmd, List <Galatee.Silverlight.ServiceAccueil.CsRenvoiRejet> possibiliteRenvoi)
        {
            InitializeComponent();
            try
            {
                if (null != _dmd)
                {
                    _infoDmd = _dmd;

                    Translate();
                    GetData();
                }

                prgBar.Visibility        = System.Windows.Visibility.Collapsed;
                LblChargement.Visibility = System.Windows.Visibility.Collapsed;
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, "Tableau de bord, Fenetre demande Liste");
            }
        }