make format update case insensitive & update change in format name
This commit is contained in:
parent
770b86f099
commit
5debdfca9d
@ -221,7 +221,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
FormatInfoList allFormats = FormatInfoList.Get();
|
FormatInfoList allFormats = FormatInfoList.Get();
|
||||||
foreach (FormatInfo myFormat in allFormats)
|
foreach (FormatInfo myFormat in allFormats)
|
||||||
{
|
{
|
||||||
_LookupFormats.Add(myFormat.Name, myFormat.FormatID);
|
_LookupFormats.Add(myFormat.Name.ToUpper(), myFormat.FormatID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return _LookupFormats;
|
return _LookupFormats;
|
||||||
@ -299,16 +299,17 @@ namespace VEPROMS.CSLA.Library
|
|||||||
Format rec = null;
|
Format rec = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!LookupFormats.ContainsKey(fname))
|
if (!LookupFormats.ContainsKey(fname.ToUpper()))
|
||||||
{
|
{
|
||||||
rec = Format.MakeFormat(parent, fname, nmattr, fmtdata, genmacdata, fmtfi.LastWriteTimeUtc, Userid);
|
rec = Format.MakeFormat(parent, fname, nmattr, fmtdata, genmacdata, fmtfi.LastWriteTimeUtc, Userid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rec = Format.Get(LookupFormats[fname]);
|
rec = Format.Get(LookupFormats[fname.ToUpper()]);
|
||||||
rec.Data = fmtdata;
|
rec.Data = fmtdata;
|
||||||
rec.GenMac = genmacdata;
|
rec.GenMac = genmacdata;
|
||||||
rec.DTS = fmtfi.LastWriteTimeUtc;
|
rec.DTS = fmtfi.LastWriteTimeUtc;
|
||||||
|
rec.Description = nmattr;
|
||||||
rec = rec.Save();
|
rec = rec.Save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user