private void ValidInfo(ClkInfo info) { ///代码不允许重复 int cnt = dal.GetCounts("and [DM] = '" + info.Dm + "' and [VALID_FLAG] = 1"); if (cnt > 0) { throw new Exception("Err:代码不允许重复"); } }
public long InsertInfo(ClkInfo info) { info.ValidFlag = true; ValidInfo(info); return(dal.Add(info)); }