C2025-027-AnnotationsTypeSelect
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user