private void Txt_CadranCompteur_TextChanged(object sender, TextChangedEventArgs e) { try { if (this.Txt_CadranCompteur.Text.Length == SessionObject.Enumere.TailleDigitCompteur && LstCadran != null && LstCadran.Count != 0) { CsCadran _LeCadran = ClasseMEthodeGenerique.RetourneObjectFromList(LstCadran, this.Txt_CadranCompteur.Text, "CODE"); if (!string.IsNullOrEmpty(_LeCadran.LIBELLE)) { this.Txt_LibelleCadran.Text = _LeCadran.LIBELLE; //EnregistrerInfoSaisie(LaDemande); } else { var w = new MessageBoxControl.MessageBoxChildWindow(Langue.lbl_Menu, Langue.MsgEltInexistent, MessageBoxControl.MessageBoxButtons.Ok, MessageBoxControl.MessageBoxIcon.Information); w.OnMessageBoxClosed += (_, result) => { this.Txt_CadranCompteur.Focus(); }; w.Show(); } } } catch (Exception ex) { throw ex; } }
void ChargerCadran() { try { if (SessionObject.LstCadran.Count != 0) { LstCadran = SessionObject.LstCadran; if (LstCadran != null && LstCadran.Count != 0) { if (!string.IsNullOrEmpty(this.Txt_CodeCadran.Text) && (string.IsNullOrEmpty(this.Txt_LibelleDigit.Text))) { CsCadran _LeCadran = ClasseMEthodeGenerique.RetourneObjectFromList(LstCadran, this.Txt_CodeCadran.Text, "CODECADRAN"); if (_LeCadran != null && !string.IsNullOrEmpty(_LeCadran.LIBELLE)) { this.Txt_LibelleDigit.Text = _LeCadran.LIBELLE; } } } } else { AcceuilServiceClient service = new AcceuilServiceClient(Utility.Protocole(), Utility.EndPoint("Accueil")); service.RetourneToutCadranCompleted += (s, args) => { LstCadran = new List <CsCadran>(); if (args != null && args.Cancelled) { return; } LstCadran = args.Result; if (LstCadran != null && LstCadran.Count != 0) { if (!string.IsNullOrEmpty(this.Txt_CodeCadran.Text) && (string.IsNullOrEmpty(this.Txt_LibelleDigit.Text))) { CsCadran _LeCadran = ClasseMEthodeGenerique.RetourneObjectFromList(LstCadran, this.Txt_CodeCadran.Text, "CODECADRAN"); if (_LeCadran != null && !string.IsNullOrEmpty(_LeCadran.LIBELLE)) { this.Txt_LibelleDigit.Text = _LeCadran.LIBELLE; } } } }; service.RetourneToutCadranAsync(); service.CloseAsync(); } } catch (Exception ex) { throw ex; } }
void galatee_OkClickedbtnCadran(object sender, EventArgs e) { try { UcListeGenerique ctrs = sender as UcListeGenerique; if (ctrs.GetisOkClick) { CsCadran _LeCadran = (CsCadran)ctrs.MyObject; this.Txt_CadranCompteur.Text = _LeCadran.CODE; } this.btn_Digit.IsEnabled = true; } catch (Exception ex) { Message.ShowError(ex.Message, Langue.lbl_Menu); } }
void AfficherCannalisationDemande(CsCanalisation LaCanalisation, CsEvenement LeEvt) { CsEvenement _LeEvt = new CsEvenement(); if ((LaDemande.LeTypeDemande.CODE == SessionObject.Enumere.ChangementCompteur && NumCompteur == 1) || LaDemande.LeTypeDemande.CODE != SessionObject.Enumere.ChangementCompteur) { this.Txt_NumCompteur.Text = (string.IsNullOrEmpty(LaCanalisation.NUMERO)) ? string.Empty : LaCanalisation.NUMERO; this.Txt_AnneeFab.Text = (string.IsNullOrEmpty(LaCanalisation.ANNEEFAB)) ? string.Empty : LaCanalisation.ANNEEFAB; this.Txt_CodeTypeCompteur.Text = (string.IsNullOrEmpty(LaCanalisation.TYPECOMPTEUR)) ? string.Empty : LaCanalisation.TYPECOMPTEUR; CsTcompteur _LeTypeCompte = ClasseMEthodeGenerique.RetourneObjectFromList(LstTypeCompteur, this.Txt_CodeTypeCompteur.Text, "CODE"); if (!string.IsNullOrEmpty(_LeTypeCompte.LIBELLE)) { LeTypeCompteurSelect = _LeTypeCompte; this.Txt_LibelleTypeCompteur.Text = _LeTypeCompte.LIBELLE; } this.Txt_CodeMarque.Text = (string.IsNullOrEmpty(LaCanalisation.MARQUE)) ? string.Empty : LaCanalisation.MARQUE; CsMarqueCompteur _LaMarque = ClasseMEthodeGenerique.RetourneObjectFromList(LstMarque, this.Txt_CodeMarque.Text, "CODE"); if (!string.IsNullOrEmpty(_LaMarque.LIBELLE)) { this.Txt_LibelleMarque.Text = _LaMarque.LIBELLE; } this.Txt_CodeCadran.Text = LaCanalisation.CADRAN.Value.ToString(); CsCadran _LeCadran = ClasseMEthodeGenerique.RetourneObjectFromList(LstCadran, this.Txt_CodeCadran.Text, "CODECADRAN"); if (!string.IsNullOrEmpty(_LeCadran.LIBELLE)) { this.Txt_LibelleDigit.Text = _LeCadran.LIBELLE; LeCadranSelect = _LeCadran; } this.Txt_CodeDiametre.Text = (string.IsNullOrEmpty(LaCanalisation.DIAMETRE)) ? string.Empty : LaCanalisation.DIAMETRE; CsDiacomp _LeDiametre = ClasseMEthodeGenerique.RetourneObjectFromList(LstDiametre, this.Txt_CodeDiametre.Text, "CODE"); if (!string.IsNullOrEmpty(_LeDiametre.LIBELLE)) { LeDiametreSelect = _LeDiametre; this.Txt_LibelleDiametre.Text = _LeDiametre.LIBELLE; } if (LaCanalisation.COEFLECT != 0) { this.Chk_CoefMultiplication.IsChecked = true; } } }