Example #1
0
 private void GoodsFilterTextChanged(object sender, TextChangedEventArgs e)
 {
     this.AddBaskedButton.IsEnabled  = false;
     this.AddBaskedButton.Background = new SolidColorBrush(Colors.Gainsboro);
     this.CurrentGoodsId             = -1;
     if (this.GoodsFilter.Text.Length > 2)
     {
         var template = this.GoodsFilter.Text;
         var item     = PiluleDal.GetFirstGoodsByTemplate(template);
         if (item == null)
         {
             return;
         }
         this.CurrentGoodsId             = item.Id;
         this.NameLabel.Content          = $"{item.Code} {item.Name} ({item.Comment})";
         this.AddBaskedButton.IsEnabled  = true;
         this.AddBaskedButton.Background = new SolidColorBrush(Colors.DarkSeaGreen);
     }
 }
Example #2
0
        /// <summary>
        /// The test button click.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="e">
        /// The e.
        /// </param>
        private void TestButtonClick(object sender, EventArgs e)
        {
            var x = PiluleDal.GetFirstGoodsByTemplate("Ай");

            this.OutLog(x.Name);
        }