Example #1
0
 private string GetNewID(string _oldid, string _tname, string _colname, MetaDataServiceClient _mdc)
 {
     try
     {
         if (ImportMode == "0")
         {
             return(_mdc.GetNewID());
         }
         else
         {
             if (_mdc.IsExistID(_oldid, _tname, _colname))
             {
                 throw new Exception(string.Format("在{0}表中存在{2}值为{1}的记录!", _tname, _oldid, _colname));
             }
             else
             {
                 return(_oldid);
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }