Пример #1
0
 void galatee_OkClickedCentre(object sender, EventArgs e)
 {
     try
     {
         MainView.UcListeGenerique ctrs = sender as MainView.UcListeGenerique;
         if (ctrs.isOkClick)
         {
             ServiceAccueil.CsCentre param = (ServiceAccueil.CsCentre)ctrs.MyObject;//.VALEUR;
             this.Txt_Centre.Text   = param.CODE;
             txt_libellecentre.Text = param.LIBELLE;
             this.Txt_Centre.Tag    = param.PK_ID;
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex, "Erreur");
     }
 }
 private void Btn_Batch_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         List <string> _LstColonneAffich = new List <string>();
         _LstColonneAffich.Add("NUMLOTRI");
         _LstColonneAffich.Add("PERIODE");
         List <CsLotri>            ListeDesLotriCentre = ListeDesLotriAfficher.ToList();
         List <object>             obj  = Shared.ClasseMEthodeGenerique.RetourneListeObjet(ListeDesLotriCentre);
         MainView.UcListeGenerique ctrl = new MainView.UcListeGenerique(obj, _LstColonneAffich, false, "Lots");
         ctrl.Closed += new EventHandler(galatee_OkClickedBatch);
         ctrl.Show();
     }
     catch (Exception ex)
     {
         Message.ShowError(ex, "Erreur");
     }
 }
 private void btn_Site_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         List <string> _LstColonneAffich = new List <string>();
         _LstColonneAffich.Add("CODE");
         _LstColonneAffich.Add("LIBELLE");
         List <object>             obj  = Shared.ClasseMEthodeGenerique.RetourneListeObjet(lstSite);
         MainView.UcListeGenerique ctrl = new MainView.UcListeGenerique(obj, _LstColonneAffich, false, "Site");
         ctrl.Closed   += ctrl_ClosedSite;
         this.IsEnabled = false;
         ctrl.Show();
     }
     catch (Exception ex)
     {
         Message.ShowError(ex, "Erreur");
     }
 }
Пример #4
0
 private void ucgReturn(object sender, EventArgs e)
 {
     try
     {
         this.btn_batch.IsEnabled = true;
         MainView.UcListeGenerique uc = sender as MainView.UcListeGenerique;
         if (uc.GetisOkClick)
         {
             CsLotri lot = (CsLotri)uc.MyObject;
             Txt_NumBatch.Text     = lot.NUMLOTRI;
             this.Txt_NumBatch.Tag = lot;
         }
     }
     catch (Exception ex)
     {
         this.btn_batch.IsEnabled = true;
         Message.ShowError(ex, "Erreur");
     }
 }
 private void btn_batch_Click_1(object sender, RoutedEventArgs e)
 {
     try
     {
         if (listeBatch != null)
         {
             Dictionary <string, string> _LstColonneAffich = new Dictionary <string, string>();
             _LstColonneAffich.Add("NUMLOTRI", "LOT");
             List <object>             obj = Shared.ClasseMEthodeGenerique.RetourneListeObjet(listeBatch);
             MainView.UcListeGenerique ucg = new MainView.UcListeGenerique(obj, _LstColonneAffich, false, "Lots");
             ucg.Closed += new EventHandler(ucgReturn);
             ucg.Show();
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex, "Erreur");
     }
 }
        void ctrl_ClosedSite(object sender, EventArgs e)
        {
            try
            {
                this.IsEnabled = true;
                MainView.UcListeGenerique ctrs = sender as MainView.UcListeGenerique;
                if (ctrs.isOkClick)
                {
                    this.Txt_Centre.Text        = string.Empty;
                    this.Txt_Centre.Tag         = null;
                    this.txt_libellecentre.Text = string.Empty;

                    ServiceAccueil.CsSite param = (ServiceAccueil.CsSite)ctrs.MyObject;//.VALEUR;
                    this.Txt_Site.Text        = param.CODE;
                    txt_LibelleSite.Text      = param.LIBELLE;
                    this.Txt_Site.Tag         = param.PK_ID;
                    this.btn_Centre.IsEnabled = true;
                    if (param.CODE == SessionObject.Enumere.Generale)
                    {
                        isgeneral = true;
                    }
                    else
                    {
                        isgeneral = false;
                    }
                    List <ServiceAccueil.CsCentre> lstCEnt = lesCentre.Where(t => t.FK_IDCODESITE == (int)this.Txt_Site.Tag).ToList();
                    if (lstCEnt != null && lstCEnt.Count != 0)
                    {
                        if (lstCEnt.Count == 1)
                        {
                            this.Txt_Centre.Text   = lstCEnt.First().CODE;
                            txt_libellecentre.Text = lstCEnt.First().LIBELLE;
                            this.Txt_Centre.Tag    = lstCEnt.First().PK_ID;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Message.ShowError(ex, "Erreur");
            }
        }
 private void btnRechercheCampagne_Click_1(object sender, RoutedEventArgs e)
 {
     try
     {
         if (lesCampagne.Count > 0)
         {
             this.btnRechercheCampagne.IsEnabled = false;
             Dictionary <string, string> _LstColonneAffich = new Dictionary <string, string>();
             _LstColonneAffich.Add("IDCOUPURE", "NUMERO DE CAMPAGNE");
             List <object>             obj  = Shared.ClasseMEthodeGenerique.RetourneListeObjet(lesCampagne);
             MainView.UcListeGenerique ctrl = new MainView.UcListeGenerique(obj, _LstColonneAffich, false, "Campagne");
             ctrl.Closed += new EventHandler(galatee_OkClickedCampagne);
             ctrl.Show();
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, Langue.lbl_Menu);
     }
 }
Пример #8
0
 private void btn_Produit_Click_1(object sender, RoutedEventArgs e)
 {
     try
     {
         if (LstDeProduit != null && LstDeProduit.Count != 0)
         {
             List <string> _LstColonneAffich = new List <string>();
             _LstColonneAffich.Add("CODE");
             _LstColonneAffich.Add("LIBELLE");
             List <object>             obj  = Shared.ClasseMEthodeGenerique.RetourneListeObjet(LstDeProduit.Where(t => t.CODE != "000" && (t.CODE == SessionObject.Enumere.Electricite || t.CODE == SessionObject.Enumere.ElectriciteMT)).ToList());
             MainView.UcListeGenerique ctrl = new MainView.UcListeGenerique(obj, _LstColonneAffich, true, "Produit");
             ctrl.Closed += new EventHandler(galatee_OkClickedProduit);
             ctrl.Show();
         }
     }
     catch (Exception ex)
     {
         string error = ex.Message;
     }
 }
 void galatee_OkClickedCentre(object sender, EventArgs e)
 {
     try
     {
         MainView.UcListeGenerique ctrs  = sender as MainView.UcListeGenerique;
         ServiceAccueil.CsCentre   param = (ServiceAccueil.CsCentre)ctrs.MyObject;//.VALEUR;
         this.Txt_Centre.Text   = param.CODE;
         txt_libellecentre.Text = param.LIBELLE;
         this.Txt_Centre.Tag    = param.PK_ID;
         if (ListeTournee != null && ListeTournee.Count != 0)
         {
             this.dataGrid1.ItemsSource = null;
             this.dataGrid1.ItemsSource = ListeTournee.Where(t => t.FK_IDCENTRE == param.PK_ID).ToList();
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex, "Erreur");
     }
 }
Пример #10
0
        private void btn_Batch_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                List <object> _LstObj = new List <object>();
                _LstObj = Shared.ClasseMEthodeGenerique.RetourneListeObjet(ClasseMethodeGenerique.DistinctLotri(ListeLotri));
                Dictionary <string, string> _LstColonneAffich = new Dictionary <string, string>();
                _LstColonneAffich.Add("NUMLOTRI", "LOT");
                _LstColonneAffich.Add("PERIODE", "PERIODE");

                List <object>             obj  = Shared.ClasseMEthodeGenerique.RetourneListeObjet(_LstObj);
                MainView.UcListeGenerique ctrl = new MainView.UcListeGenerique(obj, _LstColonneAffich, false, "Lots");
                ctrl.Closed += new EventHandler(galatee_OkClickedBatch);
                ctrl.Show();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, "Error");
            }
        }
 private void btn_Centre_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (lstSite.Count > 0)
         {
             this.btn_Centre.IsEnabled = false;
             List <object> _Listgen          = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.RetourneListeObjet(lstSite);
             List <string> _LstColonneAffich = new List <string>();
             _LstColonneAffich.Add("CODE");
             _LstColonneAffich.Add("LIBELLE");
             MainView.UcListeGenerique ctrl = new MainView.UcListeGenerique(_Listgen, _LstColonneAffich, false, "Site");
             ctrl.Closed += new EventHandler(galatee_OkClickedCentre);
             ctrl.Show();
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, "Index");
     }
 }
 private void btn_Centre_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (LstCentrePerimetre.Count > 0)
         {
             this.btn_Centre.IsEnabled = false;
             List <object> obj = Shared.ClasseMEthodeGenerique.RetourneListeObjet(LstCentrePerimetre.Where(t => t.FK_IDCODESITE == (int)this.Txt_CodeSite.Tag).ToList());
             Dictionary <string, string> _LstColonneAffich = new Dictionary <string, string>();
             _LstColonneAffich.Add("CODE", "CENTRE");
             _LstColonneAffich.Add("LIBELLE", "LIBELLE");
             MainView.UcListeGenerique ctrl = new MainView.UcListeGenerique(obj, _LstColonneAffich, false, "Liste");
             ctrl.Closed += new EventHandler(galatee_OkClickedCentre);
             ctrl.Show();
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, Langue.LibelleModule);
     }
 }
        private void btnzone_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                List <object> _LstObj = new List <object>();
                _LstObj = ClasseMEthodeGenerique.RetourneListeObjet(DistinctTournee(ListeLotri.Where(t => lesCentre.Select(i => i.PK_ID).Contains(t.FK_IDCENTRE) && t.NUMLOTRI == this.Txt_Lotri.Text).ToList()));

                Dictionary <string, string> _LstColonneAffich = new Dictionary <string, string>();
                _LstColonneAffich.Add("CENTRE", "CENTRE");
                _LstColonneAffich.Add("TOURNEE", "TOURNEE");

                List <object>             obj  = Shared.ClasseMEthodeGenerique.RetourneListeObjet(_LstObj);
                MainView.UcListeGenerique ctrl = new MainView.UcListeGenerique(obj, _LstColonneAffich, true, "Tournée");
                ctrl.Closed += new EventHandler(btnTournee_OkClicked);
                ctrl.Show();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex, "Erreur");
            }
        }
Пример #14
0
 private void btn_tournee_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         List <string> _LstColonneAffich = new List <string>();
         _LstColonneAffich.Add("CENTRE");
         _LstColonneAffich.Add("TOURNEE");
         if (this.Txt_NumBatch.Tag != null)
         {
             int                       idcentreSelect = (int)this.Txt_Centre.Tag;
             List <object>             obj            = Shared.ClasseMEthodeGenerique.RetourneListeObjet(ListeDesTourneeLot.Where(p => p.FK_IDCENTRE == idcentreSelect).OrderBy(t => t.TOURNEE).ToList());
             MainView.UcListeGenerique ctrl           = new MainView.UcListeGenerique(obj, _LstColonneAffich, false, "Liste des tournées");
             ctrl.Closed += new EventHandler(galatee_OkClickedBtnZone1);
             ctrl.Show();
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex, "Erreur");
     }
 }
        private void btnCentre_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (LstCentre != null)
                {
                    Dictionary <string, string> _LstColonneAffich = new Dictionary <string, string>();
                    _LstColonneAffich.Add("CODE", "CENTRE");
                    _LstColonneAffich.Add("LIBELLE", "LIBELLE");

                    List <object>             obj  = Shared.ClasseMEthodeGenerique.RetourneListeObjet(LstCentre);
                    MainView.UcListeGenerique ctrl = new MainView.UcListeGenerique(obj, _LstColonneAffich, false, "Liste de centre");
                    ctrl.Closed += new EventHandler(centres_OkClicked);
                    ctrl.Show();
                }
            }
            catch (Exception ex)
            {
                Message.ShowError(ex, "Erreur");
            }
        }
 private void btn_Centre_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (LstCentrePerimetre.Count > 0)
         {
             this.btn_Centre.IsEnabled = false;
             List <object> obj = Shared.ClasseMEthodeGenerique.RetourneListeObjet(lsiteCentre);
             Dictionary <string, string> _LstColonneAffich = new Dictionary <string, string>();
             _LstColonneAffich.Add("CODE", "CENTRE");
             _LstColonneAffich.Add("LIBELLE", "LIBELLE");
             MainView.UcListeGenerique ctrl = new MainView.UcListeGenerique(obj, _LstColonneAffich, false, "Liste");
             ctrl.Closed += new EventHandler(galatee_OkClickedCentre);
             ctrl.Show();
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, "Facturation");
     }
 }
        private void btnSite_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (lstSite != null)
                {
                    Dictionary <string, string> _LstColonneAffich = new Dictionary <string, string>();
                    _LstColonneAffich.Add("CODE", "SITE");
                    _LstColonneAffich.Add("LIBELLE", "LIBELLE");

                    List <object>             obj  = Shared.ClasseMEthodeGenerique.RetourneListeObjet(lstSite.Where(t => t.CODE != "000").ToList());
                    MainView.UcListeGenerique ctrl = new MainView.UcListeGenerique(obj, _LstColonneAffich, false, "Liste de site");
                    ctrl.Closed += new EventHandler(Site_OkClicked);
                    ctrl.Show();
                }
            }
            catch (Exception ex)
            {
                Message.ShowError(ex, "Erreur");
            }
        }
Пример #18
0
        private void btn_Site_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (lstSite.Count > 0)
                {
                    this.btn_Site.IsEnabled = false;
                    Dictionary <string, string> _LstColonneAffich = new Dictionary <string, string>();
                    _LstColonneAffich.Add("CODE", "SITE");
                    _LstColonneAffich.Add("LIBELLE", "LIBELLE");

                    List <object>             obj  = Shared.ClasseMEthodeGenerique.RetourneListeObjet(lstSite);
                    MainView.UcListeGenerique ctrl = new MainView.UcListeGenerique(obj, _LstColonneAffich, false, "Lots");
                    ctrl.Closed += new EventHandler(galatee_OkClickedSite);
                    ctrl.Show();
                }
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, "Recouvrement");
            }
        }
        void galatee_OkClickedBtnZone2(object sender, EventArgs e)
        {
            this.btn_Tournee2.IsEnabled = true;
            MainView.UcListeGenerique ctrs = sender as MainView.UcListeGenerique;
            if (ctrs.isOkClick)
            {
                CsLotri tourneeDuLot = (CsLotri)ctrs.MyObject;
                if (tourneeDuLot != null)
                {
                    this.Txt_Tournee2.Text = tourneeDuLot.TOURNEE;
                }

                if (string.IsNullOrEmpty(this.Txt_Tournee1.Text) && string.IsNullOrEmpty(this.Txt_Tournee2.Text))
                {
                    if (int.Parse(this.Txt_Tournee1.Text) > int.Parse(this.Txt_Tournee2.Text))
                    {
                        Message.ShowInformation(Galatee.Silverlight.Resources.Index.Langue.msgTourneDebSupTouneeFin, Galatee.Silverlight.Resources.Index.Langue.libelleModule);
                        return;
                    }
                }
            }
        }
 private void btn_batch_Click_1(object sender, RoutedEventArgs e)
 {
     try
     {
         if (_ListeLotri != null)
         {
             this.btn_batch.IsEnabled = false;
             List <CsLotri> _lstLotAfficher = ClasseMethodeGenerique.RetourneDistinctLotri(_ListeLotri);
             Dictionary <string, string> _LstColonneAffich = new Dictionary <string, string>();
             _LstColonneAffich.Add("NUMLOTRI", "LOT");
             _LstColonneAffich.Add("PERIODE", "PERIODE");
             List <object>             obj = Shared.ClasseMEthodeGenerique.RetourneListeObjet(_lstLotAfficher);
             MainView.UcListeGenerique ucg = new MainView.UcListeGenerique(obj, _LstColonneAffich, false, "Lots");
             ucg.Closed += new EventHandler(ucgReturn);
             ucg.Show();
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex, "Erreur");
     }
 }
Пример #21
0
        private void btn_DiametreCompteur_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                this.btn_DiametreCompteur.IsEnabled = false;
                if (LstCalibreCompteur.Count != 0)
                {
                    if (CodeProduit == SessionObject.Enumere.ElectriciteMT)
                    {
                        List <object> _LstObj = new List <object>();
                        _LstObj = ClasseMEthodeGenerique.RetourneListeObjet(SessionObject.LstTypeComptage);
                        Dictionary <string, string> _LstColonneAffich = new Dictionary <string, string>();
                        _LstColonneAffich.Add("LIBELLE", "LIBELLE");

                        List <object>             obj  = Shared.ClasseMEthodeGenerique.RetourneListeObjet(_LstObj);
                        MainView.UcListeGenerique ctrl = new MainView.UcListeGenerique(obj, _LstColonneAffich, false, "Lots");
                        ctrl.Closed += new EventHandler(galatee_OkClickedBtnDiametre);
                        ctrl.Show();
                    }
                    else
                    {
                        List <object> _LstObj = new List <object>();
                        _LstObj = ClasseMEthodeGenerique.RetourneListeObjet(LstCalibreCompteur.Where(t => t.PRODUIT == CodeProduit).ToList());
                        Dictionary <string, string> _LstColonneAffich = new Dictionary <string, string>();
                        _LstColonneAffich.Add("LIBELLE", "LIBELLE");

                        List <object>             obj  = Shared.ClasseMEthodeGenerique.RetourneListeObjet(_LstObj);
                        MainView.UcListeGenerique ctrl = new MainView.UcListeGenerique(obj, _LstColonneAffich, false, "Lots");
                        ctrl.Closed += new EventHandler(galatee_OkClickedBtnDiametre);
                        ctrl.Show();
                    }
                }
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, Langue.lbl_Menu);
            }
        }
        void galatee_OkClickedCentre(object sender, EventArgs e)
        {
            try
            {
                MainView.UcListeGenerique ctrs  = sender as MainView.UcListeGenerique;
                ServiceAccueil.CsCentre   param = (ServiceAccueil.CsCentre)ctrs.MyObject;//.VALEUR;
                this.Txt_Centre.Text   = param.CODE;
                txt_libellecentre.Text = param.LIBELLE;
                this.Txt_Centre.Tag    = param.PK_ID;

                if (ListeReleveur != null && ListeReleveur.Count != 0)
                {
                    this.CboReleveur.ItemsSource       = null;
                    this.CboReleveur.DisplayMemberPath = "NOMRELEVEUR";
                    this.CboReleveur.SelectedValuePath = "PK_ID";
                    this.CboReleveur.ItemsSource       = ListeReleveur.Where(t => t.FK_IDCENTRE == param.PK_ID && (t.SUPPRIMER == null || t.SUPPRIMER == false));
                    return;
                }
            }
            catch (Exception ex)
            {
                Message.ShowError(ex, "Erreur");
            }
        }