private void LoadInfoScreen(CsDemande laDetailDemande)
        {
            try
            {
                Txt_NumDevis.Text  = laDetailDemande.LaDemande.NUMDEM;
                TxtOrdreDevis.Text = laDetailDemande.LaDemande.ORDRE;
                if (_listeDesTypeDevisExistant != null && _listeDesTypeDevisExistant.Count > 0)
                {
                    TxtTypeDevis.Text = _listeDesTypeDevisExistant.FirstOrDefault(t => t.PK_ID == laDetailDemande.LaDemande.FK_IDTYPEDEMANDE).LIBELLE;
                    TxtTypeDevis.Tag  = _listeDesTypeDevisExistant.FirstOrDefault(t => t.PK_ID == laDetailDemande.LaDemande.FK_IDTYPEDEMANDE);
                }



                LayoutRoot.Cursor = Cursors.Wait;
                //this.Txt_NumDevis.Text = this.laDemandeSelect.NUMDEVIS;
                // this.TxtTypeDevis.Text = laDemandeSelect.LIBELLETYPEDEVIS;
                // this.TxtOrdreDevis.Text = this.laDemandeSelect.ORDRE.ToString();
                AcceuilServiceClient client = new AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
                client.SelectTravauxCompleted += (ssender, args) =>
                {
                    if (args.Cancelled || args.Error != null)
                    {
                        LayoutRoot.Cursor = Cursors.Arrow;
                        string error = args.Error.Message;
                        Message.Show(error, Silverlight.Resources.Devis.Languages.txtDevis);
                        return;
                    }
                    if (args.Result == null)
                    {
                        LayoutRoot.Cursor = Cursors.Arrow;
                        Message.Show(Silverlight.Resources.Devis.Languages.AucunesDonneesTrouvees, Silverlight.Resources.Devis.Languages.txtDevis);
                        return;
                    }
                    else
                    {
                        try
                        {
                            travail = args.Result;
                            if (travail != null)
                            {
                                this.TxtProcesVerbal.Text = !string.IsNullOrWhiteSpace(this.travail.PROCESVERBAL)?this.travail.PROCESVERBAL:string.Empty;
                            }
                        }
                        catch (Exception ex)
                        {
                            throw ex;
                        }
                        LayoutRoot.Cursor = Cursors.Arrow;
                    }
                };
                client.SelectTravauxAsync(laDemandeSelect.PK_ID, int.Parse(laDemandeSelect.ORDRE));
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemplo n.º 2
0
 public static bool UpdateTravaux(galadbEntities command, ObjTRAVAUXDEVIS travaux)
 {
     try
     {
         return(Entities.UpdateEntity <Galatee.Entity.Model.TRAVAUXDEVIS>(Entities.ConvertObject <Galatee.Entity.Model.TRAVAUXDEVIS, ObjTRAVAUXDEVIS>(travaux), command));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }