C2025-027-AnnotationsTypeSelect

This commit is contained in:
2025-07-22 09:06:11 -04:00
parent 7a0f56cad8
commit 6f04d0bf07
3 changed files with 189 additions and 49 deletions

View File

@@ -101,14 +101,17 @@ namespace VEPROMS
// dltFlg flag is used to notify SQL SP to deleted all the entries for the user before entering the annotation type selections.
int dltFlg = 1;
foreach (AnnotataionItem item in lstSelected.Items.OfType<AnnotataionItem>())
{
AnnotationTypeID = item.TypeID;
AnnotationNameStr = item.NameStr;
//foreach (AnnotataionItem item in lstSelected.Items.OfType<AnnotataionItem>())
//{
// AnnotationTypeID = item.TypeID;
// AnnotationNameStr = item.NameStr;
DataTable dt2 = coverToTable(UserID);
VEPROMS.CSLA.Library.AnnotationstypeSelections.Update2(dt2);
// dltFlg = 0;
//}
VEPROMS.CSLA.Library.AnnotationstypeSelections.Update(UserID, AnnotationTypeID, dltFlg, AnnotationNameStr);
dltFlg = 0;
}
}
public class AnnotataionItem
{
@@ -172,6 +175,20 @@ namespace VEPROMS
{
this.Close();
}
private DataTable coverToTable(string userid)
{
DataTable dt = new DataTable();
dt.Columns.Add("TypeID", typeof(Int32));
dt.Columns.Add("NameStr", typeof(string));
dt.Columns.Add("UserID", typeof(string));
foreach (AnnotataionItem item in lstSelected.Items.OfType<AnnotataionItem>())
{
dt.Rows.Add(item.TypeID, item.NameStr, userid);
}
return dt;
}
}
}