//判断读取到的文本中,是否有重复的项
                var linq = from s in list
                           group s by new { s.Code } into newGroup
                           where newGroup.Count() > 1
                           select newGroup;
                if (linq.ToList().Count > 0)
                {
                    MessageBox.Show("有重复的项,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
          

    #region 定义导入对象
    /// <summary>
    /// 导入对象
    /// </summary>
    public class ImportObject
    {
        /// <summary>
        /// 作业单号
        /// </summary>
        public String Code { get; set; }

        /// <summary>
        /// 扫描数量
        /// </summary>
        public int Count { get; set; }
    }
    #endregion

相关文章:

  • 2022-12-23
  • 2021-04-07
  • 2022-12-23
  • 2021-06-21
  • 2022-02-25
  • 2021-05-05
  • 2022-12-23
  • 2021-11-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-07-07
  • 2021-05-26
相关资源
相似解决方案