Exemplo n.º 1
0
 public UcMonnaie(CsMonnaie pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid)
 {
     try
     {
         InitializeComponent();
         Translate();
         var Monnaie = new CsMonnaie();
         if (pObject != null)
             ObjetSelectionnee = Utility.ParseObject(Monnaie, pObject as CsMonnaie);
         ModeExecution = pExecMode;
         dataGrid = pGrid;
         RemplirListeDesCentreExistant();
         RemplirListeSupport();
         if (dataGrid != null) donnesDatagrid = dataGrid.ItemsSource as ObservableCollection<CsMonnaie>;
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             if (ObjetSelectionnee != null)
             {
                 Txt_Code.Text = ObjetSelectionnee.VALEUR.Value.ToString("N2") ?? string.Empty;
                 Txt_Libelle.Text = ObjetSelectionnee.LIBELLE ?? string.Empty;
                 btnOk.IsEnabled = false;
                 //Txt_Code.IsReadOnly = true;
             }
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             AllInOne.ActivateControlsFromXaml(LayoutRoot,false);
         }
         VerifierSaisie();
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, Languages.Monnaie);
     }
 }
        public UcWKFOperation(CsOperation _objCsOp, SessionObject.ExecMode execMode, DataGrid pGrid)
        {
            try
            {
                InitializeComponent();
                dataGrid = pGrid;
                if (dataGrid != null)
                {
                    donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsOperation>;
                }

                ObjetSelectionne = _objCsOp;
                _execMode        = execMode;
                if (_execMode == SessionObject.ExecMode.Modification || _execMode == SessionObject.ExecMode.Consultation)
                {
                    GetDefaultData();
                    if (_execMode == SessionObject.ExecMode.Consultation)
                    {
                        AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
                    }
                }
                ShowDetailsOperation();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, Languages.FenetreOperation);
            }
        }
Exemplo n.º 3
0
        public UcRegCli(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid)
        {
            try
            {
                InitializeComponent();
                Translate();
                var categorieClient = new CsRegCli();
                if (pObjects[0] != null)
                {
                    ObjetSelectionnee = Utility.ParseObject(categorieClient, pObjects[0] as CsRegCli);
                }
                ModeExecution = pExecMode[0];
                dataGrid      = pGrid[0];
                if (dataGrid != null)
                {
                    donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsRegCli>;
                }
                InitialisationControle();
                this.Txt_Regroupement.MaxLength = SessionObject.Enumere.TailleCodeRegroupement;

                if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                {
                    AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
                }
                VerifierSaisie();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, Languages.RegroupementClient);
            }
        }
 public UcRemisesScelles(CsRemiseScelles pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid)
 {
     try
     {
         InitializeComponent();
         //Translate();
         var Remise = new CsRemiseScelles();
         if (pObject != null)
         {
             ObjetSelectionnee = Utility.ParseObject(Remise, pObject as CsRemiseScelles);
         }
         ModeExecution = pExecMode;
         dataGrid      = pGrid;
         RemplirListeCmbDeMotifsExistant();
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
             // btn_ajout.IsEnabled = true;
         }
         chb_SaisiNombreScelleSouhaite.Visibility = System.Windows.Visibility.Collapsed;
         txt_NombreScellesSouhaite.Visibility     = System.Windows.Visibility.Collapsed;
         //VerifierSaisie();
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, Languages.Commune);
     }
 }
Exemplo n.º 5
0
        public UcAffectationCompteur(Galatee.Silverlight.ServiceScelles.CsRemiseScelles pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid)
        {
            try
            {
                InitializeComponent();
                //Translate();
                var margaVirtuelle = new Galatee.Silverlight.ServiceAccueil.CsCompteurBta();
                if (pObject != null)
                {
                    //   ObjetSelectionnee = Utility.ParseObject(Remise, pObject as CsCompteurBta);
                    ModeExecution = pExecMode;
                }
                dataGrid = pGrid;
                //RemplirListeCmbDeMotifsExistant();
                if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                {
                    if (ObjetSelectionnee != null)
                    {
                    }
                }

                if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                {
                    AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
                    // btn_ajout.IsEnabled = true;
                }
                //VerifierSaisie();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, Languages.Commune);
            }
        }
Exemplo n.º 6
0
 public UcRegExo(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid)
 {
     try
     {
         InitializeComponent();
         Translate();
         var categorieClient = new CsRegExo();
         if (pObjects[0] != null)
         {
             ObjetSelectionnee = Utility.ParseObject(categorieClient, pObjects[0] as CsRegExo);
         }
         ModeExecution = pExecMode[0];
         dataGrid      = pGrid[0];
         if (dataGrid != null)
         {
             donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsRegExo>;
         }
         RemplirListeDeroulante();
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, Languages.Exoneration);
     }
 }
Exemplo n.º 7
0
        public UcSaisiCompteursMT(CsCompteurBta pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid)
        {
            try
            {
                InitializeComponent();
                Translate();
                var CompteurBt = new CsCompteurBta();
                if (pObject != null)
                {
                    ObjetSelectionnee = Utility.ParseObject(CompteurBt, pObject as CsCompteurBta);
                }
                ModeExecution = pExecMode;
                dataGrid      = pGrid;
                RemplirListeCmbDesEtatCompteursExistant();
                ListeScelleExistant();

                if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                {
                    AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
                }
                //VerifierSaisie();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, Languages.Commune);
            }
        }
        public UcWKFGroupeValidation(KeyValuePair <CsGroupeValidation, List <CsRHabilitationGrouveValidation> > lGroupeValidation,
                                     SessionObject.ExecMode exeMode, DataGrid dtGrid)
        {
            try
            {
                InitializeComponent();
                dataGrid = dtGrid;
                if (dataGrid != null)
                {
                    donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsGroupeValidation>;
                }

                Translate();
                leGroupe = lGroupeValidation;

                _execMode = exeMode;
                ShowDataDetail();

                if (_execMode == SessionObject.ExecMode.Consultation)
                {
                    AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
                }

                //Affichage des détails
            }
            catch (Exception ex)
            {
                Message.Show(ex.Message, Galatee.Silverlight.Resources.Langue.errorTitle);
            }
        }
        public CwCasReleveIndex(CsCasind pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid)
        {
            try
            {
                InitializeComponent();
                if (pObject != null)
                {
                    ObjetSelectionnee = pObject;
                }
                ModeExecution = pExecMode;
                dataGrid      = pGrid;
                if (dataGrid != null)
                {
                    donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsCasind>;
                }

                this.CboEnqueteNonConfirmee.ItemsSource       = this.ConstituerListeGroupeBoxFacturation();
                this.CboEnqueteNonConfirmee.DisplayMemberPath = "LIBELLE";
                this.CboEnqueteNonConfirmee.SelectedValuePath = "CODE";

                this.CboSansEnqueteOuConfirmee.ItemsSource       = this.ConstituerListeGroupeBoxFacturation();
                this.CboSansEnqueteOuConfirmee.DisplayMemberPath = "LIBELLE";
                this.CboSansEnqueteOuConfirmee.SelectedValuePath = "CODE";

                this.CboIndex.ItemsSource       = this.ConstituerListeGroupeBoxSaisie();
                this.CboIndex.DisplayMemberPath = "LIBELLE";
                this.CboIndex.SelectedValuePath = "CODE";

                this.CboCompteur.ItemsSource       = this.ConstituerListeGroupeBoxSaisie();
                this.CboCompteur.DisplayMemberPath = "LIBELLE";
                this.CboCompteur.SelectedValuePath = "CODE";

                this.CboConsommation.ItemsSource       = this.ConstituerListeGroupeBoxSaisie();
                this.CboConsommation.DisplayMemberPath = "LIBELLE";
                this.CboConsommation.SelectedValuePath = "CODE";

                RemplirListeDesCentreExistant(ObjetSelectionnee);

                if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification ||
                    (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                {
                    if (ObjetSelectionnee != null)
                    {
                        RemplirComboInformationComplementaire(ObjetSelectionnee);
                        ChargerDonnees(ObjetSelectionnee);
                        OKButton.IsEnabled = false;
                        //TxtCas.IsReadOnly = true;
                    }
                }
                if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                {
                    AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
                }
                VerifierSaisie();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, Languages.Parametrage);
            }
        }
 public FrmImportFichier(aImportFichier codeimport, SessionObject.ExecMode pExecMode)
 {
     InitializeComponent();
     ChargeInformation(codeimport.CODE);
     ModeExecution = pExecMode;
     if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
     {
         AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
     }
 }
Exemplo n.º 11
0
        public UcCentre(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid)
        {
            try
            {
                InitializeComponent();
                Translate();
                var centre = new CsCentre();
                if (pObjects[0] != null)
                {
                    ObjetSelectionnee = Utility.ParseObject(centre, pObjects[0] as CsCentre);
                }
                ModeExecution = pExecMode[0];
                dataGrid      = pGrid[0];
                if (dataGrid != null)
                {
                    donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsCentre>;
                }
                RemplirSite();
                RemplirTypeCentre();
                RemplirListeProduit();
                RemplirNiveautarif();
                if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification ||
                    (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                {
                    if (ObjetSelectionnee != null)
                    {
                        Txt_Code.Text    = ObjetSelectionnee.CODE ?? string.Empty;
                        Txt_Libelle.Text = ObjetSelectionnee.LIBELLE ?? string.Empty;
                        Txt_Adresse.Text = ObjetSelectionnee.ADRESSE ?? string.Empty;
                        btnOk.IsEnabled  = false;

                        Cbo_Produit.ItemsSource       = null;
                        Cbo_Produit.ItemsSource       = ObjetSelectionnee.LESPRODUITSDUSITE;
                        Cbo_Produit.SelectedValuePath = "LIBELLE";

                        dtg_Produit.ItemsSource = null;
                        dtg_Produit.ItemsSource = ObjetSelectionnee.LESPRODUITSDUSITE;
                    }
                }
                if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                {
                    AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
                }
                if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Creation)
                {
                    ObjetSelectionnee = new CsCentre();
                    ObjetSelectionnee.LESPRODUITSDUSITE = new List <CsProduit>();
                }
                VerifierSaisie();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, Languages.Centre);
            }
        }
        public UcScelleCompteurMt(CsCompteurBta pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid)
        {
            try
            {
                InitializeComponent();
                Translate();
                var CompteurBt = new CsCompteurBta();
                if (pObject != null)
                {
                    ObjetSelectionnee = Utility.ParseObject(CompteurBt, pObject as CsCompteurBta);
                }

                this.txt_NumCpteur.MaxLength = 20;
                this.txt_ANNEEFAB.MaxLength  = 4;
                this.txt_Cadran.MaxLength    = 1;
                this.txt_Cadran.Text         = "6";
                ModeExecution = pExecMode;
                dataGrid      = pGrid;
                // dtgrdlReceptionScelle.ItemsSource = donnesDatagrid;
                RemplirListeCmbDesEtatCompteursExistant();
                RemplirListeCmbDesModelesMarqueExistant();
                ChargerProduit();
                //if (dataGrid != null)
                //    donnesDatagrid = dataGrid.ItemsSource as ObservableCollection<CsLotMagasinGeneral>;
                if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                {
                    if (ObjetSelectionnee != null)
                    {
                        List <CsRefEtatCompteur> lstetat = (List <CsRefEtatCompteur>) this.Cbo_Etat_cmpt.ItemsSource;
                        if (lstetat != null)
                        {
                            Cbo_Etat_cmpt.SelectedItem = lstetat.FirstOrDefault(t => t.EtatCompteur_ID == ObjetSelectionnee.EtatCompteur_ID);
                        }

                        List <Galatee.Silverlight.ServiceAccueil.CsMarqueCompteur> lstMaqmMdt = ListdesModelesfonctMarq;
                        if (lstMaqmMdt != null)
                        {
                            Cbo_Marque.SelectedItem = ObjetSelectionnee.LIBELLEMARQUE;
                        }

                        txt_ANNEEFAB.Text  = ObjetSelectionnee.ANNEEFAB;
                        txt_NumCpteur.Text = ObjetSelectionnee.Numero_Compteur;
                    }
                }
                if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                {
                    AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
                }
                //VerifierSaisie();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, Languages.Commune);
            }
        }
Exemplo n.º 13
0
 public UcCoperDemande(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid)
 {
     try
     {
         InitializeComponent();
         Translate();
         var categorieClient = new CsCoutDemande();
         if (pObjects[0] != null)
         {
             ObjetSelectionnee = Utility.ParseObject(categorieClient, pObjects[0] as CsCoutDemande);
         }
         ModeExecution = pExecMode[0];
         dataGrid      = pGrid[0];
         ChargerDonneeDuSite();
         ChargerProduit();
         RemplirListeDesCOPERExistant();
         RemplirListeDesTAXIExistant();
         RemplirListeDesTDEMExistant();
         ChargerDiametreCompteur();
         ChargerCategorie();
         if (dataGrid != null)
         {
             donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsCoutDemande>;
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification ||
             (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             if (ObjetSelectionnee != null)
             {
                 Txt_Montant.Text        = ObjetSelectionnee.MONTANT.ToString();
                 CboTAXE.SelectedItem    = ObjetSelectionnee.TAXE;
                 CboProduit.SelectedItem = ObjetSelectionnee.PRODUIT;
                 if (ObjetSelectionnee.AUTOMATIQUE == true)
                 {
                     CheckAuto.IsChecked = true;
                 }
                 if (ObjetSelectionnee.OBLIGATOIRE == true)
                 {
                     CheckObl.IsChecked = true;
                 }
             }
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
         }
         VerifierSaisie();
     }
     catch (Exception ex)
     {
         Message.Show(ex.Message, Languages.CoperDemande);
     }
 }
        public UcSaisiCompteur(CsCompteurBta pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid)
        {
            try
            {
                InitializeComponent();
                Translate();
                var CompteurBt = new CsCompteurBta();
                if (pObject != null)
                {
                    ObjetSelectionnee = Utility.ParseObject(CompteurBt, pObject as CsCompteurBta);
                }
                ModeExecution = pExecMode;
                dataGrid      = pGrid;
                RemplirListeCmbDesEtatCompteursExistant();
                RemplirListeCmbDesModelesMarqueExistant();
                ChargerDiametreCompteur();
                ChargerTypeCompteur();
                ListeScelleExistant();
                if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                {
                    if (ObjetSelectionnee != null)
                    {
                        Cbo_Diametre.SelectedItem = SessionObject.LstCalibreCompteur.FirstOrDefault(t => t.PK_ID == ObjetSelectionnee.FK_IDCALIBRECOMPTEUR);
                        Cbo_typeCmpt.SelectedItem = SessionObject.LstTypeCompteur.FirstOrDefault(t => t.PK_ID == ObjetSelectionnee.FK_IDTYPECOMPTEUR);
                        List <CsRefEtatCompteur> lstetat = (List <CsRefEtatCompteur>) this.Cbo_Etat_cmpt.ItemsSource;
                        if (lstetat != null)
                        {
                            Cbo_Etat_cmpt.SelectedItem = lstetat.FirstOrDefault(t => t.EtatCompteur_ID == ObjetSelectionnee.EtatCompteur_ID);
                        }

                        List <CsMarque_Modele> lstMaqmMdt = ListdesModelesfonctMarq;
                        if (lstMaqmMdt != null)
                        {
                            Cbo_Marque.SelectedItem = ObjetSelectionnee.LIBELLEMARQUE;
                            Cbo_Modele.SelectedItem = lstMaqmMdt.FirstOrDefault(t => t.MARQUE_ID == ObjetSelectionnee.FK_IDMARQUECOMPTEUR);
                        }
                        txt_ANNEEFAB.Text  = ObjetSelectionnee.ANNEEFAB;
                        txt_NumCpteur.Text = ObjetSelectionnee.Numero_Compteur;
                    }
                }
                if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                {
                    AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
                }
                //VerifierSaisie();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, Languages.Commune);
            }
        }
Exemplo n.º 15
0
 public UcFourniture(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid)
 {
     try
     {
         InitializeComponent();
         Translate();
         var categorieClient = new ObjFOURNITURE();
         if (pObjects[0] != null)
         {
             ObjetSelectionnee = Utility.ParseObject(categorieClient, pObjects[0] as ObjFOURNITURE);
         }
         ModeExecution = pExecMode[0];
         dataGrid      = pGrid[0];
         RemplirProduit();
         RemplirListeDesTDEMExistant();
         RemplireMateriel();
         if (dataGrid != null)
         {
             donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <ObjFOURNITURE>;
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification ||
             (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             if (ObjetSelectionnee != null)
             {
                 Txt_CoutFournituure.Text = Convert.ToString(ObjetSelectionnee.COUTUNITAIRE_FOURNITURE);
                 Check_Add.IsChecked      = ObjetSelectionnee.ISADDITIONAL;
                 Check_Default.IsChecked  = ObjetSelectionnee.ISDEFAULT;
                 txt_Quatite.Text         = Convert.ToString(ObjetSelectionnee.QUANTITY);
             }
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Creation)
         {
             ObjetSelectionnee        = null;
             Txt_CoutFournituure.Text = "";
             Txt_CoutPose.Text        = "";
             Check_Add.IsChecked      = false;
             Check_Default.IsChecked  = false;
             txt_Quatite.Text         = " ";
             CboProduit.SelectedIndex = 0;
         }
     }
     catch (Exception ex)
     {
         Message.Show(ex.Message, Languages.Diametrecompteur);
     }
 }
Exemplo n.º 16
0
 public UcRedevance(CsRedevance pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid)
 {
     try
     {
         InitializeComponent();
         Translate();
         var Redevance = new CsRedevance();
         if (pObject != null)
         {
             ObjetSelectionnee = Utility.ParseObject(Redevance, pObject as CsRedevance);
         }
         ModeExecution = pExecMode;
         dataGrid      = pGrid;
         RemplirListeDesCentreExistant();
         RemplirProduit();
         RemplirNatureClient();
         RemplirLienRedevance();
         if (dataGrid != null)
         {
             donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsRedevance>;
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             if (ObjetSelectionnee != null)
             {
                 Txt_Redevance.Text    = ObjetSelectionnee.NUMREDEVANCE ?? string.Empty;
                 TxtTranche.Text       = ObjetSelectionnee.TRANCHE ?? string.Empty;
                 Txt_Libelle.Text      = ObjetSelectionnee.LIBELLE ?? string.Empty;
                 TxtParametre1.Text    = ObjetSelectionnee.PARAM1 ?? string.Empty;
                 TxtParametre2.Text    = ObjetSelectionnee.PARAM2 ?? string.Empty;
                 TxtParametre3.Text    = ObjetSelectionnee.PARAM3 ?? string.Empty;
                 TxtParametre4.Text    = ObjetSelectionnee.PARAM4 ?? string.Empty;
                 TxtParametre5.Text    = ObjetSelectionnee.PARAM5 ?? string.Empty;
                 TxtParametre6.Text    = ObjetSelectionnee.PARAM6 ?? string.Empty;
                 ChkEditable.IsChecked = ObjetSelectionnee.EDITEE == "1" ? true : false;
                 ChkExoneree.IsChecked = ObjetSelectionnee.EXONERATION == "1" ? true : false;
                 btnOk.IsEnabled       = false;
             }
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
         }
         VerifierSaisie();
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, Languages.Redevance);
     }
 }
Exemplo n.º 17
0
 public UcRegExo()
 {
     try
     {
         InitializeComponent();
         Translate();
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
         }
         VerifierSaisie();
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, Languages.Exoneration);
     }
 }
 public UcAppareils(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid)
 {
     try
     {
         InitializeComponent();
         Translate();
         var categorieClient = new CsAppareils();
         if (pObjects[0] != null)
         {
             ObjetSelectionnee = Utility.ParseObject(categorieClient, pObjects[0] as CsAppareils);
         }
         ModeExecution = pExecMode[0];
         dataGrid      = pGrid[0];
         if (dataGrid != null)
         {
             donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsAppareils>;
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification ||
             (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             if (ObjetSelectionnee != null)
             {
                 Txt_CodeAppareil.Text = Convert.ToString(ObjetSelectionnee.CodeAppareil);
                 Txt_Designation.Text  = ObjetSelectionnee.Designation;
                 Txt_DETAILS.Text      = ObjetSelectionnee.Details;
                 txt_TpsUtil.Text      = ObjetSelectionnee.TEMPSUTILISATION.ToString();
             }
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Creation)
         {
             Txt_CodeAppareil.Text = "";
             Txt_Designation.Text  = "";
             Txt_DETAILS.Text      = "";
             txt_TpsUtil.Text      = "";
         }
         //VerifierSaisie();
     }
     catch (Exception ex)
     {
         Message.Show(ex.Message, Languages.Appareils);
     }
 }
Exemplo n.º 19
0
        public UcSite(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid)
        {
            try
            {
                InitializeComponent();
                Translate();
                var site = new CsSite();
                if (pObjects[0] != null)
                {
                    ObjetSelectionnee = Utility.ParseObject(site, pObjects[0] as CsSite);
                }
                ModeExecution = pExecMode[0];
                dataGrid      = pGrid[0];
                if (dataGrid != null)
                {
                    donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsSite>;
                }
                if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification ||
                    (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                {
                    if (ObjetSelectionnee != null)
                    {
                        Txt_Site.Text                = ObjetSelectionnee.CODE ?? string.Empty;
                        Txt_Serveur.Text             = ObjetSelectionnee.SERVEUR ?? string.Empty;
                        Txt_Libelle.Text             = ObjetSelectionnee.LIBELLE ?? string.Empty;
                        Txt_Catalogue.Text           = ObjetSelectionnee.CATALOGUE ?? string.Empty;
                        Txt_Utilisateur.Text         = ObjetSelectionnee.USERID ?? string.Empty;
                        Txt_Pwd.Password             = Security.Cryptage.Decrypt(ObjetSelectionnee.PWD) ?? string.Empty;
                        Txt_ConfirmationPwd.Password = Security.Cryptage.Decrypt(ObjetSelectionnee.PWD) ?? string.Empty;
                        Txt_Libelle.Focus();
                        btnOk.IsEnabled = false;

                        //Txt_Site.IsReadOnly = true;
                    }
                }
                if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                {
                    AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
                }
                VerifierSaisie();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, Languages.Site);
            }
        }
Exemplo n.º 20
0
        public UcDomBanc(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid)
        {
            try
            {
                InitializeComponent();
                Translate();
                var categorieClient = new CsDomBanc();
                if (pObjects[0] != null)
                {
                    ObjetSelectionnee = Utility.ParseObject(categorieClient, pObjects[0] as CsDomBanc);
                }
                ModeExecution = pExecMode[0];
                dataGrid      = pGrid[0];
                RemplirListeDesBanques();
                if (dataGrid != null)
                {
                    donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsDomBanc>;
                }
                if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification ||
                    (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                {
                    if (ObjetSelectionnee != null)
                    {
                        Txt_Banque.Text       = ObjetSelectionnee.BANQUE ?? string.Empty;
                        Txt_Guichet.Text      = ObjetSelectionnee.GUICHET ?? string.Empty;
                        Txt_Libelle.Text      = ObjetSelectionnee.LIBELLE ?? string.Empty;
                        Txt_Compte.Text       = ObjetSelectionnee.COMPTE ?? string.Empty;
                        Txt_Comptabilite.Text = ObjetSelectionnee.COMPTA ?? string.Empty;
                        btnOk.IsEnabled       = false;

                        //Txt_Banque.IsReadOnly = true;
                        //Txt_Guichet.IsReadOnly = true;
                    }
                }
                if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                {
                    AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
                }
                VerifierSaisie();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, Languages.DomiciliationBancaire);
            }
        }
 public UcDiametrecompteur(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid)
 {
     try
     {
         InitializeComponent();
         //Translate();
         var categorieClient = new CsDiacomp();
         if (pObjects[0] != null)
         {
             ObjetSelectionnee = Utility.ParseObject(categorieClient, pObjects[0] as CsDiacomp);
         }
         ModeExecution = pExecMode[0];
         dataGrid      = pGrid[0];
         RemplirProduit();
         if (dataGrid != null)
         {
             donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsDiacomp>;
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification ||
             (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             if (ObjetSelectionnee != null)
             {
                 Txt_Code.Text    = ObjetSelectionnee.CODE;
                 Txt_Libelle.Text = ObjetSelectionnee.LIBELLE;
                 Txt_BNI.Text     = Convert.ToString(ObjetSelectionnee.BNI);
                 Txt_BNS.Text     = Convert.ToString(ObjetSelectionnee.BNS);
                 Txt_CFI.Text     = Convert.ToString(ObjetSelectionnee.CFI);
                 Txt_CFS.Text     = Convert.ToString(ObjetSelectionnee.CFS);
                 btnOk.IsEnabled  = false;
             }
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
         }
         VerifierSaisie();
     }
     catch (Exception ex)
     {
         Message.Show(ex.Message, Languages.Diametrecompteur);
     }
 }
        public UcCategoriesClient(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid)
        {
            try
            {
                InitializeComponent();
                Translate();
                if (pExecMode != null)
                {
                    ModeExecution = pExecMode[0];
                }
                var categorieClient = new CsCategorieClient();
                if (pObjects[0] != null)
                {
                    ObjetSelectionnee = Utility.ParseObject(categorieClient, pObjects[0] as CsCategorieClient);
                }
                dataGrid = pGrid[0];
                if (dataGrid != null)
                {
                    donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsCategorieClient>;
                }
                if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                {
                    if (ObjetSelectionnee != null)
                    {
                        Txt_Code.Text    = ObjetSelectionnee.CODE;
                        Txt_Libelle.Text = ObjetSelectionnee.LIBELLE;
                        btnOk.IsEnabled  = false;

                        //Txt_Code.IsReadOnly = true;
                    }
                }
                if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
                {
                    AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
                }
                VerifierSaisie();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, Languages.LibelleCategorieClient);
            }
        }
Exemplo n.º 23
0
 public UcSecteur(CsSecteur pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid)
 {
     try
     {
         InitializeComponent();
         Translate();
         var Secteur = new CsSecteur();
         if (pObject != null)
         {
             ObjetSelectionnee = Utility.ParseObject(Secteur, pObject as CsSecteur);
         }
         ModeExecution = pExecMode;
         dataGrid      = pGrid;
         //RemplirListeDesCentreExistant();
         RemplirQuartier();
         if (dataGrid != null)
         {
             donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsSecteur>;
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             if (ObjetSelectionnee != null)
             {
                 Txt_Code.Text    = ObjetSelectionnee.CODE;
                 Txt_Libelle.Text = ObjetSelectionnee.LIBELLE;
                 //CboQuartier.SelectedItem = SessionObject.LstQuartier.FirstOrDefault(a => a.PK_ID == ObjetSelectionnee.FK_IDQUARTIER);
                 btnOk.IsEnabled = false;
                 //Txt_Code.IsReadOnly = true;
             }
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
         }
         VerifierSaisie();
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, "Secteur");
     }
 }
Exemplo n.º 24
0
 public UcTaxe(CsCtax pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid)
 {
     try
     {
         InitializeComponent();
         Translate();
         var taxe = new CsCtax();
         if (pObject != null)
         {
             ObjetSelectionnee = Utility.ParseObject(taxe, pObject as CsCtax);
         }
         ModeExecution = pExecMode;
         dataGrid      = pGrid;
         RemplirListeDesTypeTaxe();
         if (dataGrid != null)
         {
             donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsCtax>;
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             if (ObjetSelectionnee != null)
             {
                 Txt_Code.Text          = ObjetSelectionnee.CODE;
                 Txt_Libelle.Text       = ObjetSelectionnee.LIBELLE;
                 Txt_Taux.Text          = ObjetSelectionnee.TAUX.ToString();
                 Dtp_Debut.SelectedDate = ObjetSelectionnee.DEBUTAPPLICATION;
                 Dtp_Fin.SelectedDate   = ObjetSelectionnee.FINAPPLICATION;
                 btnOk.IsEnabled        = false;
                 //Txt_Code.IsReadOnly = true;
             }
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, Languages.Commune);
     }
 }
 public UcMaterielDemande(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid)
 {
     try
     {
         InitializeComponent();
         Translate();
         this.Txt_Code.MaxLength = 1;
         var categorieClient = new CsMaterielDemande();
         if (pObjects[0] != null)
         {
             ObjetSelectionnee = Utility.ParseObject(categorieClient, pObjects[0] as CsMaterielDemande);
         }
         ModeExecution = pExecMode[0];
         dataGrid      = pGrid[0];
         if (dataGrid != null)
         {
             donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsMaterielDemande>;
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             if (ObjetSelectionnee != null)
             {
                 Txt_Code.Text           = ObjetSelectionnee.CODE;
                 Txt_Libelle.Text        = ObjetSelectionnee.LIBELLE;
                 Txt_CoutFourniture.Text = ObjetSelectionnee.COUTUNITAIRE_FOURNITURE.Value.ToString(SessionObject.FormatMontant);
                 Txt_CoutPose.Text       = ObjetSelectionnee.COUTUNITAIRE_POSE.Value.ToString(SessionObject.FormatMontant);;
                 btnOk.IsEnabled         = false;
             }
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
         }
         VerifierSaisie();
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, Languages.LibelleCodePoste);
     }
 }
Exemplo n.º 26
0
 public UcForfait(CsForfait pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid)
 {
     try
     {
         InitializeComponent();
         Translate();
         var Forfait = new CsForfait();
         if (pObject != null)
         {
             ObjetSelectionnee = Utility.ParseObject(Forfait, pObject as CsForfait);
         }
         ModeExecution = pExecMode;
         dataGrid      = pGrid;
         RemplirListeDesCentreExistant();
         RemplirProduit();
         if (dataGrid != null)
         {
             donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsForfait>;
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             if (ObjetSelectionnee != null)
             {
                 Txt_Code.Text    = ObjetSelectionnee.CODE;
                 Txt_Libelle.Text = ObjetSelectionnee.LIBELLE;
                 btnOk.IsEnabled  = false;
                 //Txt_Code.IsReadOnly = true;
             }
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
         }
         VerifierSaisie();
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, Languages.Forfait);
     }
 }
Exemplo n.º 27
0
 public CwRole(CsFonction pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid)
 {
     try
     {
         InitializeComponent();
         if (pObject != null)
         {
             ObjetSelectionnee = pObject;
         }
         ModeExecution = pExecMode;
         dataGrid      = pGrid;
         if (dataGrid != null)
         {
             donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsFonction>;
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification ||
             (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             if (ObjetSelectionnee != null)
             {
                 TxtCode.Text          = ObjetSelectionnee.CODE.ToString() ?? string.Empty;
                 TxtLibelle.Text       = ObjetSelectionnee.ROLENAME.ToString() ?? string.Empty;
                 TxtDescription.Text   = ObjetSelectionnee.ROLEDISPLAYNAME.ToString() ?? string.Empty;
                 ChkEstAdmin.IsChecked = ObjetSelectionnee.ESTADMIN;
                 OKButton.IsEnabled    = false;
                 //TxtCode.IsReadOnly = true;
             }
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
         }
         VerifierSaisie();
     }
     catch (Exception ex)
     {
         Message.Show(ex.Message, Languages.Parametrage);
     }
 }
 public UcMarqueCompteur(object[] pObjects, SessionObject.ExecMode[] pExecMode, DataGrid[] pGrid)
 {
     try
     {
         InitializeComponent();
         Translate();
         var marque = new CsMarqueCompteur();
         if (pObjects[0] != null)
         {
             ObjetSelectionnee = Utility.ParseObject(marque, pObjects[0] as CsMarqueCompteur);
         }
         ModeExecution = pExecMode[0];
         dataGrid      = pGrid[0];
         if (dataGrid != null)
         {
             donnesDatagrid = dataGrid.ItemsSource as ObservableCollection <CsMarqueCompteur>;
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification ||
             (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             if (ObjetSelectionnee != null)
             {
                 Txt_Code.Text        = ObjetSelectionnee.CODE;
                 Txt_Libelle.Text     = ObjetSelectionnee.LIBELLE;
                 Txt_Coefficient.Text = ObjetSelectionnee.COEFFICIENTDEMULTIPLICATION.ToString();
                 btnOk.IsEnabled      = false;
             }
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
         }
         VerifierSaisie();
     }
     catch (Exception ex)
     {
         Message.Show(ex.Message, "Marque compteur");
     }
 }
Exemplo n.º 29
0
 public UcMarqueModel(CsMarque_Modele pObject, SessionObject.ExecMode pExecMode, DataGrid pGrid)
 {
     try
     {
         InitializeComponent();
         var MarqueModele = new CsMarque_Modele();
         if (pObject != null)
         {
             ObjetSelectionnee = Utility.ParseObject(MarqueModele, pObject as CsMarque_Modele);
         }
         ModeExecution = pExecMode;
         dataGrid      = pGrid;
         // dtgrdlReceptionScelle.ItemsSource = donnesDatagrid;
         RemplirListeCmbDesModelesMarqueExistant();
         ChargerProduit();
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Modification || (SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             if (ObjetSelectionnee != null)
             {
                 List <CsMarque_Modele> lstMaqmMdt = ListdesModelesfonctMarq;
                 if (lstMaqmMdt != null)
                 {
                     Cbo_Modele.SelectedItem = lstMaqmMdt.FirstOrDefault(t => t.MODELE_ID == ObjetSelectionnee.MODELE_ID);
                     Cbo_Marque.SelectedItem = lstMaqmMdt.FirstOrDefault(t => t.MARQUE_ID == ObjetSelectionnee.MARQUE_ID);
                 }
                 txt_NombreScelleCache.Text = ObjetSelectionnee.Nbre_scel_cache.ToString();
                 txt_NombreScelleCache.Text = ObjetSelectionnee.Nbre_scel_capot.ToString();
             }
         }
         if ((SessionObject.ExecMode)ModeExecution == SessionObject.ExecMode.Consultation)
         {
             AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, Languages.Commune);
     }
 }
Exemplo n.º 30
0
 public UcWKFOperation(CsOperation _objCsOp, SessionObject.ExecMode execMode)
 {
     try
     {
         InitializeComponent();
         ObjetSelectionne = _objCsOp;
         _execMode        = execMode;
         if (_execMode == SessionObject.ExecMode.Modification || _execMode == SessionObject.ExecMode.Consultation)
         {
             GetDefaultData();
             if (_execMode == SessionObject.ExecMode.Consultation)
             {
                 AllInOne.ActivateControlsFromXaml(LayoutRoot, false);
             }
         }
         ShowDetailsOperation();
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, Languages.FenetreOperation);
     }
 }