public void RSave(BaseEntity p_BE, int p_ID, IDBTransAccess sqlTrans) { try { VDsignerFile entity = (VDsignerFile)p_BE; string sql = "DELETE Data_VDsignerFile WHERE MainID=" + SysString.ToDBString(p_ID); sql += " AND Seq=" + SysString.ToDBString(entity.FileTypeID); sqlTrans.ExecuteNonQuery(sql); VDsignerFileRule rule = new VDsignerFileRule(); entity.MainID = p_ID; entity.Seq = entity.FileTypeID; rule.RAdd(entity, sqlTrans); } catch (BaseException) { throw; } catch (Exception E) { throw new BaseException(E.Message); } }
public void RSave(BaseEntity[] p_BE, int p_ID, IDBTransAccess sqlTrans) { try { string sql = "DELETE Data_VDsignerFile WHERE MainID=" + SysString.ToDBString(p_ID); sqlTrans.ExecuteNonQuery(sql); for (int i = 0; i < p_BE.Length; i++) { VDsignerFileRule rule = new VDsignerFileRule(); VDsignerFile entity = (VDsignerFile)p_BE[i]; entity.MainID = p_ID; entity.Seq = i + 1; rule.RAdd(entity, sqlTrans); } } catch (BaseException) { throw; } catch (Exception E) { throw new BaseException(E.Message); } }