C2026-058 Check all Tables for if Acc Page Id Prefix is Used More than Once
This commit is contained in:
1 parent
ae9fb0eb67
commit
82f11fa696
10 files changed
+717
-133
No files matched your search
@@ -1357,13 +1357,13 @@ namespace RODBInterface
|
||||
{
|
||||
command.CommandText = "getCountRecidByAccidNotRecid";
|
||||
command.Parameters.AddWithValue("RecID", ro.GetAttribute("RecID"));
|
||||
}
|
||||
}
|
||||
else
|
||||
command.CommandText = "getCountRecidByAccid";
|
||||
command.Parameters.AddWithValue("@AccPageID", inacc);
|
||||
command.Parameters.AddWithValue("@ROTable", ro.GetAttribute("Table"));
|
||||
command.Parameters.AddWithValue("@ROTable", ro.GetAttribute("Table"));
|
||||
|
||||
using (SqlDataReader reader = command.ExecuteReader())
|
||||
using (SqlDataReader reader = command.ExecuteReader())
|
||||
{
|
||||
if (reader.Read())
|
||||
{
|
||||
@@ -1383,7 +1383,38 @@ namespace RODBInterface
|
||||
}
|
||||
return isdup;
|
||||
}
|
||||
public override VlnXmlElement RODB_ReadRO(string tbl, string recid)
|
||||
public override bool IsDuplicateAccPagePrefix(VlnXmlElement ro, string pfix)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (SqlConnection cn = ROAPP_SqlConnection)
|
||||
{
|
||||
SqlCommand command = new SqlCommand();
|
||||
command.Connection = cn;
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
command.CommandText = "checkAccPagePrefixUsed";
|
||||
command.Parameters.AddWithValue("@Prefix", pfix);
|
||||
command.Parameters.AddWithValue("@ROTable", ro.GetAttribute("Table"));
|
||||
|
||||
using (SqlDataReader reader = command.ExecuteReader())
|
||||
{
|
||||
if (reader.Read())
|
||||
{
|
||||
int cnt = reader.GetInt32(0);
|
||||
if (cnt > 0)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "Error on IsDuplicateAccPagePrefix");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public override VlnXmlElement RODB_ReadRO(string tbl, string recid)
|
||||
{
|
||||
ShowCount.ReadRo++;
|
||||
VlnXmlElement retele = null;
|
||||
|
||||
Reference in new issue
Block a user