zoukankan      html  css  js  c++  java
  • TextBox重写Text属性

        /// <summary>
        /// 赋值文本
        /// </summary>
        protected string zText;
        /// <summary>
        /// 赋值文本
        /// </summary>
        public override string Text
        {
          set
          {
            base.Text = value;
            zText = value;
            //查找材料清单
            if (DtMat!=null)
            {
              var Dens = DtMat.AsEnumerable()
                  .Where(p => p.Field<string>("MaterialName").ToUpper() == zText.ToUpper())
                  .Select(p => p.Field<double>("MaterialDensity"));
              if (Dens.Count() > 0)
              {
                MatDensity = Dens.FirstOrDefault();
              }
              else
              {
                MatDensity = 0;
              }
            }
          }
          get
          {
            return base.Text;
          }
        }
  • 相关阅读:
    leetcode122
    leetcode121
    leetcode773
    leetcode803
    leetcode658
    leetcode723
    leetcode134
    leetcode340
    leetcode721
    leetcode362
  • 原文地址:https://www.cnblogs.com/swtool/p/8996150.html
Copyright © 2011-2022 走看看