示例#1
0
 public static void CheckBillID(string MainTableName, DataRow drCurrent)
 {
     if ((((drCurrent != null) && (drCurrent.Table != null)) && drCurrent.Table.Columns.Contains("BillCode")) && (ConvertUtil.GetDBString(drCurrent["BillCode"]) != ""))
     {
         string sql = string.Concat(new object[] { "SELECT count(*) FROM ", MainTableName, " WHERE BillCode = '", drCurrent["BillCode"], "'" });
         if (Linker.GetInt(sql) > 0)
         {
             drCurrent["BillCode"] = GetBillID(MainTableName);
             drCurrent.EndEdit();
         }
     }
 }