C2025-027-AnnotationsTypeSelect
This commit is contained in:
@@ -14,9 +14,6 @@ namespace VEPROMS
|
||||
// C2025-027 Annotation Type Filtering
|
||||
public partial class dlgAnnotationsSelect : Form
|
||||
{
|
||||
//int AnnotationTypeID;
|
||||
//string AnnotationNameStr = "";
|
||||
|
||||
public dlgAnnotationsSelect()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -96,22 +93,8 @@ namespace VEPROMS
|
||||
// Save selected list to DB.
|
||||
private void btnUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
int AnnotationTypeID;
|
||||
string AnnotationNameStr = "";
|
||||
// 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;
|
||||
|
||||
DataTable dt2 = coverToTable(UserID);
|
||||
|
||||
VEPROMS.CSLA.Library.AnnotationstypeSelections.Update2(dt2);
|
||||
// dltFlg = 0;
|
||||
//}
|
||||
|
||||
VEPROMS.CSLA.Library.AnnotationstypeSelections.Update(dt2);
|
||||
}
|
||||
public class AnnotataionItem
|
||||
{
|
||||
@@ -178,14 +161,17 @@ namespace VEPROMS
|
||||
|
||||
private DataTable coverToTable(string userid)
|
||||
{
|
||||
int RowID = 0;
|
||||
DataTable dt = new DataTable();
|
||||
dt.Columns.Add("TypeID", typeof(Int32));
|
||||
dt.Columns.Add("NameStr", typeof(string));
|
||||
dt.Columns.Add("UserID", typeof(string));
|
||||
dt.Columns.Add("RowID", typeof(string));
|
||||
|
||||
foreach (AnnotataionItem item in lstSelected.Items.OfType<AnnotataionItem>())
|
||||
{
|
||||
dt.Rows.Add(item.TypeID, item.NameStr, userid);
|
||||
++RowID;
|
||||
dt.Rows.Add(item.TypeID, item.NameStr, userid, RowID);
|
||||
}
|
||||
return dt;
|
||||
}
|
||||
|
Reference in New Issue
Block a user