コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: urb31075/Pilule
 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);
     }
 }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: urb31075/Pilule
        /// <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);
        }