示例#1
0
        private void ChargerDetailSortieCompteur(ServiceAccueil.CsProgarmmation leProgramme)
        {
            try
            {
                List <CsCanalisation> LstCannalisation = new List <CsCanalisation>();
                AcceuilServiceClient  service1         = new AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
                service1.GetDemandeByListeNumIdDemandeSortieCompteurCompleted += (sr, res) =>
                {
                    if (res != null && res.Cancelled)
                    {
                        return;
                    }
                    if (res.Result != null && res.Result.Count != 0)
                    {
                        LstCannalisation      = res.Result;
                        dgDemande.ItemsSource = null;
                        dgDemande.ItemsSource = LstCannalisation;

                        this.txt_Equipe.Text        = leProgramme.LIBELLEEQUIPE;
                        this.txt_DateProgramme.Text = leProgramme.DATEPROGRAMME.Value.ToShortDateString();
                    }
                    else
                    {
                        Message.Show("Aucune demande trouvé", "Information");
                    }
                };
                service1.GetDemandeByListeNumIdDemandeSortieCompteurAsync(leProgramme.NUMPROGRAMME, EtapeActuelle);
                service1.CloseAsync();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#2
0
        private void dgMyDataGrid_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            DataGrid dg         = (sender as DataGrid);
            var      allObjects = dg.ItemsSource as List <ServiceAccueil.CsProgarmmation>;

            if (dg.SelectedItem != null)
            {
                ServiceAccueil.CsProgarmmation SelectedObject = (ServiceAccueil.CsProgarmmation)dg.SelectedItem;
                checkerSelectedItem((CheckBox)this.dtgrdParametre.Columns[0].GetCellContent(SelectedObject) as CheckBox);
                SelectedObject.IsSelect = true;
                foreach (ServiceAccueil.CsProgarmmation item in (dg.ItemsSource as List <ServiceAccueil.CsProgarmmation>).Where(t => t.NUMPROGRAMME != SelectedObject.NUMPROGRAMME).ToList())
                {
                    if (checkSelectedItem((CheckBox)this.dtgrdParametre.Columns[0].GetCellContent(item) as CheckBox))
                    {
                        DechekerSelectedItem((CheckBox)this.dtgrdParametre.Columns[0].GetCellContent(item) as CheckBox);
                        item.IsSelect = false;
                    }
                }
                if ((DateTime.Now - lastClick).Ticks < 2500000)
                {
                    if (IsConsultationSeul)
                    {
                        ConsulterButton_Click(null, null);
                    }
                    else
                    {
                        EditerButton_Click(null, null);
                    }
                }
                lastClick = DateTime.Now;
            }
        }
示例#3
0
        private void dgMyDataGrid_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            DataGrid dg         = (sender as DataGrid);
            var      allObjects = dg.ItemsSource as List <ServiceAccueil.CsProgarmmation>;

            if (dg.SelectedItem != null)
            {
                ServiceAccueil.CsProgarmmation SelectedObject = (ServiceAccueil.CsProgarmmation)dg.SelectedItem;
                if (SelectedObject.IsSelect == false)
                {
                    SelectedObject.IsSelect = true;
                    List <ServiceAccueil.CsProgarmmation> l = allObjects.Where(t => t.NUMPROGRAMME != SelectedObject.NUMPROGRAMME).ToList();
                    if (l != null && l.Count != 0)
                    {
                        l.ForEach(o => o.IsSelect = false);
                    }
                }
                else
                {
                    SelectedObject.IsSelect = false;
                }
                if ((DateTime.Now - lastClick).Ticks < 25000000)
                {
                    if (IsConsultationSeul)
                    {
                        ConsulterButton_Click(null, null);
                    }
                    else
                    {
                        EditerButton_Click(null, null);
                    }
                }
                lastClick = DateTime.Now;
            }
        }
示例#4
0
        private void EditerButton_Click(object sender, RoutedEventArgs e)
        {
            //ON récupère la demande sélectionnée,
            try
            {
                //this.EditerButton.IsEnabled = false;
                //this.CancelButton.IsEnabled = false;

                if (this.dtgrdParametre.ItemsSource != null)
                {
                    ServiceAccueil.CsProgarmmation lePgmSelect = ((List <ServiceAccueil.CsProgarmmation>) this.dtgrdParametre.ItemsSource).FirstOrDefault(o => o.IsSelect);
                    if (lePgmSelect != null && lePgmSelect.FK_IDEQUIPE != null)
                    {
                        if (TypeEdition == 1 ||
                            TypeEdition == 2)
                        {
                            Galatee.Silverlight.Devis.UcReeditionPgrammeCompteur ctrl = new Galatee.Silverlight.Devis.UcReeditionPgrammeCompteur(lePgmSelect, TypeEdition);
                            ctrl.Closed += ctrl_Closed;
                            ctrl.Show();
                        }
                        else
                        {
                            Galatee.Silverlight.Devis.FrmReeditionSortieMateriel ctrl = new Galatee.Silverlight.Devis.FrmReeditionSortieMateriel(lePgmSelect);
                            ctrl.Closed += ctrl_Closed;
                            ctrl.Show();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                //Message.ShowError("Impossible de traiter la demande. Détails de l'erreur : " + ex.Message, "Traiter une demande");
            }
        }
示例#5
0
 public UcSortieCompteurDetail(ServiceAccueil.CsProgarmmation _leProgramme, int IdEtape)
 {
     this.EtapeActuelle = IdEtape;
     InitializeComponent();
     ChargeListeUser();
     LeProgramme = _leProgramme;
     ChargerDetailSortieCompteur(_leProgramme);
 }
        public FrmReeditionSortieMateriel(ServiceAccueil.CsProgarmmation _leProgramme)
        {
            this.EtapeActuelle = null;
            InitializeComponent();

            LstDemandeValide         = new List <CsCanalisation>();
            lstAllUser               = new List <CsUtilisateur>();
            lstSortie                = new List <CsSortieMateriel>();
            listeDemandeSelectionees = new List <CsDemandeBase>();
            LstDemandeValide         = new List <CsCanalisation>();
            lstAutreMateriel         = new List <CsSortieAutreMateriel>();
            LeProgramme              = _leProgramme;
            ChargerDetailSortieMateriel(LeProgramme);
        }
 private void ChargerDetailProgramme(ServiceAccueil.CsProgarmmation leProgramme)
 {
     try
     {
         AcceuilServiceClient service1 = new AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
         service1.ChargerListeDonneeProgramReeditionCompleted += (sr, res) =>
         {
             if (res != null && res.Cancelled)
             {
                 return;
             }
             if (res.Result != null && res.Result.Count != 0)
             {
                 Programme = res.Result;
                 var lstElmtDevis = Programme.Select(p => new { p.NUMDEM, p.CLIENT, p.CODEMATERIELDEVIS, p.NOM, p.COMPTEUR }).Distinct().ToList();
                 List <CsCanalisation> lstProg = new List <CsCanalisation>();
                 foreach (var item in lstElmtDevis)
                 {
                     CsCanalisation Prog = new CsCanalisation();
                     Prog.NUMDEM        = item.NUMDEM;
                     Prog.CLIENT        = item.CLIENT;
                     Prog.NOMCLIENT     = item.NOM;
                     Prog.LIBELLEMARQUE = item.CODEMATERIELDEVIS;
                     Prog.NUMERO        = item.COMPTEUR;
                     lstProg.Add(Prog);
                 }
                 dgDemande.ItemsSource                  = null;
                 dgDemande.ItemsSource                  = lstProg;
                 this.txt_Equipe.Text                   = leProgramme.LIBELLEEQUIPE;
                 this.txt_DateProgramme.Text            = leProgramme.DATEPROGRAMME.Value.ToShortDateString();
                 Programme.ForEach(t => t.NUMFOURNITURE = leProgramme.LIBELLEEQUIPE);
                 Programme.ForEach(t => t.NUMDEVIS      = leProgramme.DATEPROGRAMME.Value.ToShortDateString());
             }
             else
             {
                 Message.Show("Aucune demande trouvé", "Information");
             }
         };
         service1.ChargerListeDonneeProgramReeditionAsync(leProgramme.NUMPROGRAMME, leProgramme.FK_IDEQUIPE.Value);
         service1.CloseAsync();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        private void ChargerDetailSortieMateriel(ServiceAccueil.CsProgarmmation leProgramme)
        {
            try
            {
                AcceuilServiceClient service1 = new AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
                service1.GetDemandeByListeNumIdDemandeSortieMaterielCompleted += (sr, res) =>
                {
                    if (res != null && res.Cancelled)
                    {
                        return;
                    }
                    if (res.Result != null && res.Result.Count != 0)
                    {
                        LstCannalisation = res.Result;
                        List <CsCanalisation> lstElementDatagrid = new List <CsCanalisation>();
                        var DistinctCannalisation = res.Result.Select(u => new { u.FK_IDDEMANDE, u.NUMDEM, u.NUMERO, u.NOMCLIENT, u.CENTRE, u.CLIENT, u.ORDRE }).Distinct();
                        foreach (var item in DistinctCannalisation)
                        {
                            lstElementDatagrid.Add(new CsCanalisation()
                            {
                                FK_IDDEMANDE = item.FK_IDDEMANDE, NUMDEM = item.NUMDEM, NUMERO = item.NUMERO, NOMCLIENT = item.NOMCLIENT, CENTRE = item.CENTRE, CLIENT = item.CLIENT, ORDRE = item.ORDRE
                            });
                        }

                        dgDemande.ItemsSource = null;
                        dgDemande.ItemsSource = lstElementDatagrid;

                        AgregerMaterielDevis();


                        this.txt_Equipe.Text        = leProgramme.LIBELLEEQUIPE;
                        this.txt_DateProgramme.Text = leProgramme.DATEPROGRAMME.Value.ToShortDateString();
                    }
                    else
                    {
                        Message.Show("Aucune demande trouvé", "Information");
                    }
                };
                service1.GetDemandeByListeNumIdDemandeSortieMaterielAsync(leProgramme.NUMPROGRAMME, EtapeActuelle);
                service1.CloseAsync();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public UcSortieMateriel(ServiceAccueil.CsProgarmmation _leProgramme)
        {
            this.EtapeActuelle = null;
            InitializeComponent();

            LstDemandeValide            = new List <CsCanalisation>();
            lstAllUser                  = new List <CsUtilisateur>();
            lstSortie                   = new List <CsSortieMateriel>();
            listeDemandeSelectionees    = new List <CsDemandeBase>();
            LstDemandeValide            = new List <CsCanalisation>();
            lstAutreMateriel            = new List <CsSortieAutreMateriel>();
            LeProgramme                 = _leProgramme;
            this.txt_DateProgramme.Text = LeProgramme.DATEPROGRAMME.Value.ToShortDateString();
            this.txt_Equipe.Text        = LeProgramme.LIBELLEEQUIPE;
            LeProgramme                 = _leProgramme;
            ChargeListeUser();
            ChargerDetailSortieMateriel(LeProgramme);
        }
 public UcReeditionPgrammeCompteur(ServiceAccueil.CsProgarmmation _leProgramme, int typeEdition)
 {
     InitializeComponent();
     LeProgramme   = _leProgramme;
     EtapeActuelle = null;
     TypeEdition   = typeEdition;
     if (typeEdition == 1)
     {
         this.txt_LibelleAgentLivreur.Visibility   = System.Windows.Visibility.Collapsed;
         this.txt_LibelleAgentRecepteur.Visibility = System.Windows.Visibility.Collapsed;
         this.lbl_Livreur.Visibility   = System.Windows.Visibility.Collapsed;
         this.lbl_Recepteur.Visibility = System.Windows.Visibility.Collapsed;
         ChargerDetailProgramme(_leProgramme);
     }
     else
     {
         ChargerDetailSortieCompteur(_leProgramme);
     }
 }