make format update case insensitive & update change in format name

This commit is contained in:
Kathy Ruffing 2014-01-16 11:49:47 +00:00
parent 770b86f099
commit 5debdfca9d

View File

@ -221,7 +221,7 @@ namespace VEPROMS.CSLA.Library
FormatInfoList allFormats = FormatInfoList.Get();
foreach (FormatInfo myFormat in allFormats)
{
_LookupFormats.Add(myFormat.Name, myFormat.FormatID);
_LookupFormats.Add(myFormat.Name.ToUpper(), myFormat.FormatID);
}
}
return _LookupFormats;
@ -299,16 +299,17 @@ namespace VEPROMS.CSLA.Library
Format rec = null;
try
{
if (!LookupFormats.ContainsKey(fname))
if (!LookupFormats.ContainsKey(fname.ToUpper()))
{
rec = Format.MakeFormat(parent, fname, nmattr, fmtdata, genmacdata, fmtfi.LastWriteTimeUtc, Userid);
}
else
{
rec = Format.Get(LookupFormats[fname]);
rec = Format.Get(LookupFormats[fname.ToUpper()]);
rec.Data = fmtdata;
rec.GenMac = genmacdata;
rec.DTS = fmtfi.LastWriteTimeUtc;
rec.Description = nmattr;
rec = rec.Save();
}
}