This commit is contained in:
@@ -131,16 +131,19 @@ namespace AyaNova.Biz
|
||||
{
|
||||
|
||||
Translation t = new Translation();
|
||||
t.Name = (string)o["Name"];
|
||||
string newUniqueName = string.Empty;
|
||||
var proposedName = (string)o["Name"];
|
||||
string newUniqueName = proposedName;
|
||||
bool NotUnique = true;
|
||||
long l = 1;
|
||||
do
|
||||
{
|
||||
newUniqueName = Util.StringUtil.UniqueNameBuilder(t.Name, l++, 255);
|
||||
NotUnique = await ct.Translation.AnyAsync(z => z.Name == newUniqueName);
|
||||
if (NotUnique)
|
||||
newUniqueName = Util.StringUtil.UniqueNameBuilder(proposedName, l++, 255);
|
||||
|
||||
} while (NotUnique);
|
||||
|
||||
t.Name = newUniqueName;
|
||||
t.CjkIndex = (bool)o["CjkIndex"];
|
||||
t.Stock = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user