Пример #1
0
 public static ClassSync.Discount.InfoClients getInfClt(Guid InfoClients_customerId)
 {
     if (InfoClients_customerId != null)
     {
         ClassSync.Discount.InfoClients inf = ClassSync.Discount.InfoClients.sel(InfoClients_customerId);
         //   ClassSync.Discount.InfoClients.LInfoClients.Find(l => l.DiscountCards.ToList().Find(l2 => l2.numberCard.TrimEnd().TrimStart()
         //       == codebar.TrimEnd().TrimStart()) != null);
         if (inf != null)
         {
             client.nameFirst = inf.Name;
             client.nameLast  = inf.Surname;
         }
         else
         {
             client.nameFirst = " Inconnue ";
             client.nameLast  = "";
         }
         return(inf);
     }
     return(null);
 }
Пример #2
0
        private void ebarcode_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Return)
            {
                ClassSync.Discount.DiscountCards d = ClassSync.Discount.DiscountCards.OneDiscountCards(ebarcode.Text);

                ClassSync.Discount.InfoClients ic = ClassDiscounts.getInfClt(d.InfoClients_custumerId);
                if (ic != null)
                {
                    lTypeClient.Content    = ic.TypeClient;
                    lName.Content          = ic.Name;
                    lSurname.Content       = ic.Surname;
                    lNameCompany.Content   = ic.NameCompany;
                    lSIRET.Content         = ic.SIRET;
                    lFRTVA.Content         = ic.FRTVA;
                    lOfficeAddress.Content = ic.OfficeAddress;
                    lOfficeZipCode.Content = ic.OfficeZipCode;
                    lOfficeCity.Content    = ic.OfficeCity;
                    lHomeAddress.Content   = ic.HomeAddress;
                    lHomeZipCode.Content   = ic.HomeZipCode;
                    lHomeCity.Content      = ic.HomeCity;
                    lTelephone.Content     = ic.Telephone;
                    lMail.Content          = ic.Mail;
                    lnumberCard.Content    = ic.DiscountCards.First().numberCard;
                    lpoints.Content        = ic.DiscountCards.First().points;
                    lActive.Content        = ic.DiscountCards.First().active;
                }
                else
                {
                    foreach (Label la in ClassETC_fun.FindVisualChildren <Label>(this))
                    {
                        la.Content = "Не найден";
                    }
                }
                ebarcode.Text = "";
            }
        }