private void RemplireOngletAdresse(CsAg _LeAdresse) { try { if (_LeAdresse != null) { this.tab3_txt_NomClientBrt.Text = string.IsNullOrEmpty(_LeAdresse.NOMP) ? string.Empty : _LeAdresse.NOMP; this.tab3_txt_LibelleCommune.Text = string.IsNullOrEmpty(_LeAdresse.LIBELLECOMMUNE) ? string.Empty : _LeAdresse.LIBELLECOMMUNE; this.tab3_txt_LibelleQuartier.Text = string.IsNullOrEmpty(_LeAdresse.LIBELLEQUARTIER) ? string.Empty : _LeAdresse.LIBELLEQUARTIER; this.tab3_txt_Secteur.Text = string.IsNullOrEmpty(_LeAdresse.LIBELLESECTEUR) ? string.Empty : _LeAdresse.LIBELLESECTEUR; this.tab3_txt_NomRue.Text = string.IsNullOrEmpty(_LeAdresse.LIBELLERUE) ? string.Empty : _LeAdresse.LIBELLERUE; this.tab3_txt_NumRue.Text = string.IsNullOrEmpty(_LeAdresse.RUE) ? string.Empty : _LeAdresse.RUE; this.tab3_txt_etage.Text = string.IsNullOrEmpty(_LeAdresse.ETAGE) ? string.Empty : _LeAdresse.ETAGE; this.tab3_txt_NumLot.Text = string.IsNullOrEmpty(_LeAdresse.CADR) ? string.Empty : _LeAdresse.CADR; //this.tab3_txt_Email.Text = string.IsNullOrEmpty(_LeAdresse.EMAIL) ? string.Empty : _LeAdresse.EMAIL; this.tab3_txt_Telephone.Text = string.IsNullOrEmpty(_LeAdresse.TELEPHONE) ? string.Empty : _LeAdresse.TELEPHONE; //this.tab3_txt_Fax.Text = string.IsNullOrEmpty(_LeAdresse.FAX) ? string.Empty : _LeAdresse.FAX; this.tab3_txt_OrdreTour.Text = string.IsNullOrEmpty(_LeAdresse.ORDTOUR) ? string.Empty : _LeAdresse.ORDTOUR; this.tab3_txt_tournee.Text = string.IsNullOrEmpty(_LeAdresse.TOURNEE) ? string.Empty : _LeAdresse.TOURNEE; } } catch (Exception ex) { throw ex; } }
private void AfficherInfoAdresse(CsAg AdresseDemande) { try { this.Txt_ReferenceClient.Text = string.IsNullOrEmpty(AdresseDemande.CLIENT) ? string.Empty : AdresseDemande.CLIENT; this.Txt_NomClient.Text = string.IsNullOrEmpty(AdresseDemande.NOMP) ? string.Empty : AdresseDemande.NOMP; this.Txt_CodeCommune.Text = string.IsNullOrEmpty(AdresseDemande.COMMUNE) ? string.Empty : AdresseDemande.COMMUNE; this.Txt_CodeCommune.Tag = AdresseDemande.FK_IDCOMMUNE == null ? null : (int?)AdresseDemande.FK_IDCOMMUNE; this.Txt_LibelleCommune.Text = string.IsNullOrEmpty(AdresseDemande.LIBELLECOMMUNE) ? string.Empty : AdresseDemande.LIBELLECOMMUNE; this.Txt_CodeQuartier.Text = string.IsNullOrEmpty(AdresseDemande.QUARTIER) ? string.Empty : AdresseDemande.QUARTIER; this.Txt_LibelleQuartier.Text = string.IsNullOrEmpty(AdresseDemande.LIBELLEQUARTIER) ? string.Empty : AdresseDemande.LIBELLEQUARTIER; this.Txt_CodeQuartier.Tag = AdresseDemande.FK_IDQUARTIER == null ?null: (int?)AdresseDemande.FK_IDQUARTIER; this.Txt_CodeSecteur.Text = string.IsNullOrEmpty(AdresseDemande.SECTEUR) ? string.Empty : AdresseDemande.SECTEUR; this.Txt_LibelleSecteur.Text = string.IsNullOrEmpty(AdresseDemande.LIBELLESECTEUR) ? string.Empty : AdresseDemande.LIBELLESECTEUR; this.Txt_CodeSecteur.Tag = AdresseDemande.FK_IDSECTEUR == null ? null : (int?)AdresseDemande.FK_IDSECTEUR; this.Txt_CodeNomRue.Text = string.IsNullOrEmpty(AdresseDemande.RUE) ? string.Empty : AdresseDemande.RUE; this.Txt_CodeNomRue.Tag = AdresseDemande.FK_IDRUE == null ? null : (int?)AdresseDemande.FK_IDRUE; this.Txt_Etage.Text = string.IsNullOrEmpty(AdresseDemande.ETAGE) ? string.Empty : AdresseDemande.ETAGE; this.Txt_OrdreTour.Text = string.IsNullOrEmpty(AdresseDemande.ORDTOUR) ? string.Empty : AdresseDemande.ORDTOUR; this.Txt_Tournee.Text = string.IsNullOrEmpty(AdresseDemande.TOURNEE) ? string.Empty : AdresseDemande.TOURNEE; this.Txt_Tournee.Tag = AdresseDemande.FK_IDTOURNEE == null ? null : (int?)AdresseDemande.FK_IDTOURNEE; } catch (Exception ex) { throw ex; } }
private void RetourneInfoAddresse(int fk_idcentre, string centre, string client, string ordre) { int res = LoadingManager.BeginLoading(Langue.En_Cours); try { CsAg AdresseRechercher = new CsAg(); AcceuilServiceClient service = new AcceuilServiceClient(Utility.Protocole(), Utility.EndPoint("Accueil")); service.RetourneAdresseCompleted += (s, args) => { if (args.Error != null && args.Cancelled) { return; } AdresseRechercher = args.Result; if (AdresseRechercher != null && !string.IsNullOrEmpty(AdresseRechercher.CENTRE)) { TabItem tabItem1 = new TabItem(); tabItem1.Header = "ANCIENNES DONNEES"; //_LectrlAdresseClient = new UcDemandeAddresseClient(AdresseRechercher,laDemande.LaDemande.TYPEDEMANDE ); tabItem1.Content = _LectrlAdresseClient; tabControl1.Items.Add(tabItem1); tabControl1.SelectedItem = tabItem1; laDemande.Ag.PK_ID = AdresseRechercher.PK_ID; TabItem tabItem2 = new TabItem(); tabItem2.Header = "NOUVELLES DONNEES"; _LectrlAdresseClient = new UcDemandeAddresseClient(laDemande, true); tabItem2.Content = _LectrlAdresseClient; tabControl1.Items.Add(tabItem2); tabControl1.SelectedItem = tabItem2; LoadingManager.EndLoading(res); } LoadingManager.EndLoading(res); }; service.RetourneAdresseAsync(fk_idcentre, centre, client, ordre); service.CloseAsync(); } catch (Exception ex) { LoadingManager.EndLoading(res); throw ex; } }
private void AfficherInfoNouvelleAdresse(CsAg leNouvAg, CsAg AdresseDemande) { try { this.Txt_NumDemande.Text = string.IsNullOrEmpty(leNouvAg.NUMDEM) ? string.Empty : leNouvAg.NUMDEM; this.Txt_Client.Text = string.IsNullOrEmpty(leNouvAg.CENTRE) ? string.Empty : leNouvAg.CENTRE; this.Txt_Ordre.Text = string.IsNullOrEmpty(laDetailDemande.LaDemande.ORDRE) ? string.Empty : laDetailDemande.LaDemande.ORDRE; this.Txt_CodeCentre.Text = string.IsNullOrEmpty(laDetailDemande.LaDemande.CENTRE) ? string.Empty : laDetailDemande.LaDemande.CENTRE; this.Txt_LibelleCentre.Text = string.IsNullOrEmpty(laDetailDemande.LaDemande.LIBELLECENTRE) ? string.Empty : laDetailDemande.LaDemande.LIBELLECENTRE; this.Txt_CodeProduit.Text = string.IsNullOrEmpty(laDetailDemande.LaDemande.PRODUIT) ? string.Empty : laDetailDemande.LaDemande.PRODUIT; this.Txt_LibelleProduit.Text = string.IsNullOrEmpty(laDetailDemande.LaDemande.LIBELLEPRODUIT) ? string.Empty : laDetailDemande.LaDemande.LIBELLEPRODUIT; this.Txt_Client.Text = string.IsNullOrEmpty(AdresseDemande.CLIENT) ? string.Empty : AdresseDemande.CLIENT; this.Txt_NomClient.Text = string.IsNullOrEmpty(AdresseDemande.NOMP) ? string.Empty : AdresseDemande.NOMP; this.Txt_CodeCommune.Text = string.IsNullOrEmpty(AdresseDemande.COMMUNE) ? string.Empty : AdresseDemande.COMMUNE; this.Txt_CodeCommune.Tag = AdresseDemande.FK_IDCOMMUNE == null ? null : (int?)AdresseDemande.FK_IDCOMMUNE; this.Txt_LibelleCommune.Text = string.IsNullOrEmpty(AdresseDemande.LIBELLECOMMUNE) ? string.Empty : AdresseDemande.LIBELLECOMMUNE; this.Txt_CodeQuartier.Text = string.IsNullOrEmpty(AdresseDemande.QUARTIER) ? string.Empty : AdresseDemande.QUARTIER; this.Txt_LibelleQuartier.Text = string.IsNullOrEmpty(AdresseDemande.LIBELLEQUARTIER) ? string.Empty : AdresseDemande.LIBELLEQUARTIER; this.Txt_CodeQuartier.Tag = AdresseDemande.FK_IDQUARTIER == null ? null : (int?)AdresseDemande.FK_IDQUARTIER; this.Txt_CodeSecteur.Text = string.IsNullOrEmpty(AdresseDemande.SECTEUR) ? string.Empty : AdresseDemande.SECTEUR; this.Txt_LibelleSecteur.Text = string.IsNullOrEmpty(AdresseDemande.LIBELLESECTEUR) ? string.Empty : AdresseDemande.LIBELLESECTEUR; this.Txt_CodeSecteur.Tag = AdresseDemande.FK_IDSECTEUR == null ? null : (int?)AdresseDemande.FK_IDSECTEUR; this.Txt_CodeNomRue.Text = string.IsNullOrEmpty(AdresseDemande.RUE) ? string.Empty : AdresseDemande.RUE; this.Txt_CodeNomRue.Tag = AdresseDemande.FK_IDRUE == null ? null : (int?)AdresseDemande.FK_IDRUE; this.Txt_Etage.Text = string.IsNullOrEmpty(AdresseDemande.ETAGE) ? string.Empty : AdresseDemande.ETAGE; this.Txt_OrdreTour.Text = string.IsNullOrEmpty(AdresseDemande.ORDTOUR) ? string.Empty : AdresseDemande.ORDTOUR; this.Txt_Tournee.Text = string.IsNullOrEmpty(AdresseDemande.TOURNEE) ? string.Empty : AdresseDemande.TOURNEE; this.Txt_Tournee.Tag = AdresseDemande.FK_IDTOURNEE == null ? null : (int?)AdresseDemande.FK_IDTOURNEE; this.Txt_Porte.Text = string.IsNullOrEmpty(AdresseDemande.PORTE) ? string.Empty : AdresseDemande.PORTE; this.Txt_NouvNomClient.Text = string.IsNullOrEmpty(leNouvAg.NOMP) ? string.Empty : leNouvAg.NOMP; this.Txt_NouvCodeCommune.Text = string.IsNullOrEmpty(leNouvAg.COMMUNE) ? string.Empty : leNouvAg.COMMUNE; this.Txt_NouvCodeCommune.Tag = leNouvAg.FK_IDCOMMUNE == null ? null : (int?)leNouvAg.FK_IDCOMMUNE; this.Txt_NouvLibelleCommune.Text = string.IsNullOrEmpty(leNouvAg.LIBELLECOMMUNE) ? string.Empty : leNouvAg.LIBELLECOMMUNE; this.Txt_NouvCodeQuartier.Text = string.IsNullOrEmpty(leNouvAg.QUARTIER) ? string.Empty : leNouvAg.QUARTIER; this.Txt_NouvLibelleQuartier.Text = string.IsNullOrEmpty(leNouvAg.LIBELLEQUARTIER) ? string.Empty : leNouvAg.LIBELLEQUARTIER; this.Txt_NouvCodeQuartier.Tag = leNouvAg.FK_IDQUARTIER == null ? null : (int?)leNouvAg.FK_IDQUARTIER; this.Txt_NouvCodeSecteur.Text = string.IsNullOrEmpty(leNouvAg.SECTEUR) ? string.Empty : leNouvAg.SECTEUR; this.Txt_NouvLibelleSecteur.Text = string.IsNullOrEmpty(leNouvAg.LIBELLESECTEUR) ? string.Empty : leNouvAg.LIBELLESECTEUR; this.Txt_NouvCodeSecteur.Tag = AdresseDemande.FK_IDSECTEUR == null ? null : (int?)leNouvAg.FK_IDSECTEUR; this.Txt_NouvCodeNomRue.Text = string.IsNullOrEmpty(leNouvAg.RUE) ? string.Empty : leNouvAg.RUE; this.Txt_NouvCodeNomRue.Tag = leNouvAg.FK_IDRUE == null ? null : (int?)leNouvAg.FK_IDRUE; this.Txt_NouvEtage.Text = string.IsNullOrEmpty(leNouvAg.ETAGE) ? string.Empty : leNouvAg.ETAGE; this.Txt_NouvOrdreTour.Text = string.IsNullOrEmpty(leNouvAg.ORDTOUR) ? string.Empty : leNouvAg.ORDTOUR; this.Txt_NouvTournee.Text = string.IsNullOrEmpty(leNouvAg.TOURNEE) ? string.Empty : leNouvAg.TOURNEE; this.Txt_NouvTournee.Tag = leNouvAg.FK_IDTOURNEE == null ? null : (int?)leNouvAg.FK_IDTOURNEE; this.Txt_NouvPorte.Text = string.IsNullOrEmpty(leNouvAg.PORTE) ? string.Empty : leNouvAg.PORTE; #region DocumentScanne if (laDetailDemande.ObjetScanne != null && laDetailDemande.ObjetScanne.Count != 0) { foreach (var item in laDetailDemande.ObjetScanne) { ObjetScanne.Add(item); } dgListePiece.ItemsSource = ObjetScanne; } #endregion if (this.Txt_NouvTournee.Text != this.Txt_Tournee.Text) { this.Txt_NouvTournee.FontWeight = FontWeights.ExtraBold; this.Txt_NouvTournee.FontStyle = FontStyles.Italic; } if (this.Txt_NomClient.Text != this.Txt_NouvNomClient.Text) { this.Txt_NouvNomClient.FontWeight = FontWeights.ExtraBold; this.Txt_NouvNomClient.FontStyle = FontStyles.Italic; } if (this.Txt_CodeCommune.Text != this.Txt_NouvCodeCommune.Text) { this.Txt_NouvCodeCommune.FontWeight = FontWeights.ExtraBold; this.Txt_NouvLibelleCommune.FontWeight = FontWeights.ExtraBold; this.Txt_NouvLibelleCommune.FontStyle = FontStyles.Italic; this.Txt_NouvCodeCommune.FontStyle = FontStyles.Italic; } if (this.Txt_CodeQuartier.Text != this.Txt_NouvCodeQuartier.Text) { this.Txt_NouvCodeQuartier.FontWeight = FontWeights.ExtraBold; this.Txt_NouvLibelleQuartier.FontWeight = FontWeights.ExtraBold; this.Txt_NouvLibelleQuartier.FontStyle = FontStyles.Italic; this.Txt_NouvCodeQuartier.FontStyle = FontStyles.Italic; } if (this.Txt_CodeSecteur.Text != this.Txt_NouvCodeSecteur.Text) { this.Txt_NouvCodeSecteur.FontWeight = FontWeights.ExtraBold; this.Txt_NouvLibelleSecteur.FontWeight = FontWeights.ExtraBold; this.Txt_NouvLibelleSecteur.FontStyle = FontStyles.Italic; this.Txt_NouvCodeSecteur.FontStyle = FontStyles.Italic; } if (this.Txt_CodeNomRue.Text != this.Txt_NouvCodeNomRue.Text) { this.Txt_NouvCodeNomRue.FontWeight = FontWeights.ExtraBold; this.Txt_NouvCodeNomRue.FontStyle = FontStyles.Italic; } if (this.Txt_Etage.Text != this.Txt_NouvEtage.Text) { this.Txt_NouvEtage.FontWeight = FontWeights.ExtraBold; this.Txt_NouvEtage.FontWeight = FontWeights.ExtraBold; this.Txt_NouvEtage.FontStyle = FontStyles.Italic; this.Txt_NouvEtage.FontStyle = FontStyles.Italic; } if (this.Txt_Porte.Text != this.Txt_NouvPorte.Text) { this.Txt_NouvPorte.FontWeight = FontWeights.ExtraBold; this.Txt_NouvPorte.FontWeight = FontWeights.ExtraBold; this.Txt_NouvPorte.FontStyle = FontStyles.Italic; this.Txt_NouvPorte.FontStyle = FontStyles.Italic; } if (this.Txt_OrdreTour.Text != this.Txt_NouvOrdreTour.Text) { this.Txt_NouvOrdreTour.FontWeight = FontWeights.ExtraBold; this.Txt_NouvOrdreTour.FontWeight = FontWeights.ExtraBold; this.Txt_NouvOrdreTour.FontStyle = FontStyles.Italic; this.Txt_NouvOrdreTour.FontStyle = FontStyles.Italic; } } catch (Exception ex) { throw ex; } }
public int InsertFraudeDenociateur(CsFraude sFraude, CsDenonciateur sDenonciateur, CsClientFraude ClientFrd) { try { // DENONCIATEUR DENONCIATEUR = new DENONCIATEUR(); //DENONCIATEUR.CENTRE= using (galadbEntities context = new galadbEntities()) { try { DENONCIATEUR Deno = Entities.ConvertObject <Galatee.Entity.Model.DENONCIATEUR, CsDenonciateur>(sDenonciateur); Entities.InsertEntity <Galatee.Entity.Model.DENONCIATEUR>(Deno); context.SaveChanges(); sFraude.FK_IDDENONCIATEUR = Deno.PK_ID; sFraude.FK_IDDECISIONFRAUDE = null; sFraude.FicheTraitement = AccueilProcedures.GetNumDevis((int)ClientFrd.FK_IDCENTRE);; //CsAg Ag = Entities.ConvertObject<CsAg, AG>(context.AG.FirstOrDefault(p => p.CLIENT == ClientFrd.Client)); DataTable dts = Galatee.Entity.Model.AccueilProcedures.RetourneAG(ClientFrd.FK_IDCENTRE.Value, ClientFrd.Centre, ClientFrd.Client, string.Empty); CsAg Ag = Entities.GetEntityFromQuery <CsAg>(dts); //ClientFrd.FK_IDCENTRE = null; ClientFrd.FK_IDSITE = null; if (Ag != null) { ClientFrd.FK_IDCENTRE = Ag.FK_IDCENTRE; ClientFrd.Centre = Ag.CENTRE; ClientFrd.Commune = Ag.COMMUNE; ClientFrd.FK_IDCOMMUNE = Ag.FK_IDCOMMUNE; ClientFrd.FK_IDQUARTIER = Ag.FK_IDQUARTIER; ClientFrd.Quartier = Ag.QUARTIER; ClientFrd.FK_RUE = Ag.FK_IDRUE; ClientFrd.Rue = Ag.RUE; ClientFrd.FK_SECTEUR = Ag.FK_IDSECTEUR; ClientFrd.Secteur = Ag.SECTEUR; } CLIENTFRAUDE CLIENTFRDE = Entities.ConvertObject <Galatee.Entity.Model.CLIENTFRAUDE, CsClientFraude>(ClientFrd); Entities.InsertEntity <Galatee.Entity.Model.CLIENTFRAUDE>(CLIENTFRDE); context.SaveChanges(); try { sFraude.FK_IDCLIENTFRAUDE = CLIENTFRDE.PK_ID; } catch (Exception) { Entities.UpdateEntity <Galatee.Entity.Model.CLIENTFRAUDE>(CLIENTFRDE); } Entities.InsertEntity <Galatee.Entity.Model.FRAUDE>(Entities.ConvertObject <Galatee.Entity.Model.FRAUDE, CsFraude>(sFraude)); return(context.SaveChanges()); } catch (Exception ex) { throw ex; } } } catch (Exception ex) { throw ex; } }