private void ValidInfo(Db1Info info)
        {
            ///代码或名称不允许重复
            int cnt = dal.GetCounts("and ([F9] = '" + info.F9 + "' or [F8] = '" + info.F8 + "') and [VALID_FLAG] = 1");

            if (cnt > 0)
            {
                throw new Exception("Err:代码或名称不允许重复");
            }
        }
 public int InsertInfo(Db1Info info)
 {
     return(dal.Add(info));
 }
 public long InsertInfo(Db1Info info)
 {
     info.ValidFlag = true;
     ValidInfo(info);
     return(dal.Add(info));
 }