diff --git a/DSA-LIMS_MANUAL.pdf b/DSA-LIMS_MANUAL.pdf
index 82c7d9f..245b157 100644
Binary files a/DSA-LIMS_MANUAL.pdf and b/DSA-LIMS_MANUAL.pdf differ
diff --git a/DSA-lims.csproj b/DSA-lims.csproj
index 32a8711..490ebc8 100644
--- a/DSA-lims.csproj
+++ b/DSA-lims.csproj
@@ -34,6 +34,9 @@
prompt
4
+
+ dsa-lims.ico
+
packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll
@@ -616,6 +619,7 @@
+
Always
diff --git a/FormMain.Designer.cs b/FormMain.Designer.cs
index 357728d..34a32fb 100644
--- a/FormMain.Designer.cs
+++ b/FormMain.Designer.cs
@@ -4471,7 +4471,7 @@ private void InitializeComponent()
// btnOrderDelSampleType
//
this.btnOrderDelSampleType.Name = "btnOrderDelSampleType";
- this.btnOrderDelSampleType.Size = new System.Drawing.Size(139, 22);
+ this.btnOrderDelSampleType.Size = new System.Drawing.Size(152, 22);
this.btnOrderDelSampleType.Text = "Sample type";
this.btnOrderDelSampleType.Click += new System.EventHandler(this.miOrderRemSampleType_Click);
//
@@ -10512,9 +10512,9 @@ private void InitializeComponent()
this.tabPrepAnalAnalysis.BackColor = System.Drawing.SystemColors.ButtonFace;
this.tabPrepAnalAnalysis.Controls.Add(this.panel76);
this.tabPrepAnalAnalysis.Controls.Add(this.panel63);
- this.tabPrepAnalAnalysis.Location = new System.Drawing.Point(4, 22);
+ this.tabPrepAnalAnalysis.Location = new System.Drawing.Point(4, 24);
this.tabPrepAnalAnalysis.Name = "tabPrepAnalAnalysis";
- this.tabPrepAnalAnalysis.Size = new System.Drawing.Size(674, 573);
+ this.tabPrepAnalAnalysis.Size = new System.Drawing.Size(674, 571);
this.tabPrepAnalAnalysis.TabIndex = 4;
this.tabPrepAnalAnalysis.Text = "Analyses";
//
@@ -10525,7 +10525,7 @@ private void InitializeComponent()
this.panel76.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel76.Location = new System.Drawing.Point(0, 246);
this.panel76.Name = "panel76";
- this.panel76.Size = new System.Drawing.Size(674, 327);
+ this.panel76.Size = new System.Drawing.Size(674, 325);
this.panel76.TabIndex = 3;
//
// panel9
@@ -10535,7 +10535,7 @@ private void InitializeComponent()
this.panel9.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel9.Location = new System.Drawing.Point(0, 0);
this.panel9.Name = "panel9";
- this.panel9.Size = new System.Drawing.Size(674, 301);
+ this.panel9.Size = new System.Drawing.Size(674, 299);
this.panel9.TabIndex = 4;
//
// gridPrepAnalResults
@@ -10553,7 +10553,7 @@ private void InitializeComponent()
this.gridPrepAnalResults.ReadOnly = true;
this.gridPrepAnalResults.RowHeadersVisible = false;
this.gridPrepAnalResults.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
- this.gridPrepAnalResults.Size = new System.Drawing.Size(674, 276);
+ this.gridPrepAnalResults.Size = new System.Drawing.Size(674, 274);
this.gridPrepAnalResults.TabIndex = 0;
//
// toolsSampleResRes
@@ -10625,7 +10625,7 @@ private void InitializeComponent()
this.panel14.Controls.Add(this.btnPrepAnalAnalDiscard);
this.panel14.Controls.Add(this.btnPrepAnalAnalUpdate);
this.panel14.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.panel14.Location = new System.Drawing.Point(0, 301);
+ this.panel14.Location = new System.Drawing.Point(0, 299);
this.panel14.Name = "panel14";
this.panel14.Size = new System.Drawing.Size(674, 26);
this.panel14.TabIndex = 5;
diff --git a/FormMain.cs b/FormMain.cs
index 1f5dcd8..acd1710 100644
--- a/FormMain.cs
+++ b/FormMain.cs
@@ -700,7 +700,7 @@ private void SetMenuItemVisibilities()
// FIXME: Accreditation rules
- if (Roles.HasAccess(Role.LaboratoryAdministrator))
+ if (Roles.HasAccess(Role.LaboratoryAdministrator) && Common.LabId != Guid.Empty)
{
miSearchView.Enabled = miProjectsView.Enabled = miCustomersView.Enabled = miTypeRelationsView.Enabled = miMetadataView.Enabled = miSystemDataView.Enabled = miAuditLogView.Enabled = true;
btnMenuNewSample.Enabled = btnMenuSamples.Enabled = btnMenuNewOrder.Enabled = btnOrders.Enabled = btnMenuCustomer.Enabled = btnMenuProjects.Enabled = btnMenuMetadata.Enabled = btnMenuSearch.Enabled = true;
@@ -719,7 +719,7 @@ private void SetMenuItemVisibilities()
miSamplesPrepAnal.Enabled = btnSamplesPrepAnal.Enabled = btnSampleGoToPrepAnal.Enabled = true;
}
- if (Roles.HasAccess(Role.SampleRegistration))
+ if (Roles.HasAccess(Role.SampleRegistrator))
{
btnMenuSamples.Enabled = btnMenuNewSample.Enabled = true;
}
@@ -733,6 +733,12 @@ private void SetMenuItemVisibilities()
{
btnMenuNewOrder.Enabled = btnOrders.Enabled = true;
}
+
+ if (Roles.HasAccess(Role.Spectator))
+ {
+ miSearch.Enabled = true;
+ btnMenuSearch.Enabled = true;
+ }
}
private void tabs_SelectedIndexChanged(object sender, EventArgs e)
@@ -3405,11 +3411,11 @@ private void miOrderRemSampleType_Click(object sender, EventArgs e)
{
// remove sample type from order
- if (!Roles.HasAccess(Role.LaboratoryAdministrator))
+ if (!Roles.HasAccess(Role.OrderOperator, Role.LaboratoryAdministrator))
{
MessageBox.Show("You don't have permission to delete sample types from orders");
return;
- }
+ }
if (treeOrderContent.SelectedNode == null)
{
diff --git a/FormMain.resx b/FormMain.resx
index 42361d6..3cee20c 100644
--- a/FormMain.resx
+++ b/FormMain.resx
@@ -123,12 +123,51 @@
402, 17
+
+ 882, 56
+
+
+ 565, 95
+
+
+ 17, 212
+
+
+ 776, 17
+
+
+ 964, 173
+
+
+ 677, 251
+
+
+ 808, 212
+
+
+ 651, 212
+
+
+ 339, 212
+
+
+ 444, 212
+
+
+ 227, 212
+
227, 212
1126, 17
+
+ 1126, 17
+
+
+ 17, 56
+
17, 56
@@ -144,18 +183,36 @@
269, 56
+
+ 553, 56
+
+
+ 982, 17
+
982, 17
565, 251
+
+ 565, 251
+
+
+ 789, 251
+
789, 251
732, 56
+
+ 732, 56
+
+
+ 17, 95
+
17, 95
@@ -174,12 +231,24 @@
784, 134
+
+ 784, 134
+
+
+ 486, 17
+
486, 17
17, 251
+
+ 17, 251
+
+
+ 463, 251
+
463, 251
@@ -268,12 +337,18 @@
122, 212
+
+ 122, 212
+
565, 95
652, 17
+
+ 652, 17
+
17, 212
@@ -346,38 +421,47 @@
188, 173
+
+ 188, 173
+
+
+ 913, 212
+
913, 212
351, 173
+
+ 351, 173
+
+
+ 1280, 212
+
1280, 212
901, 251
-
- 964, 173
+
+ 901, 251
677, 251
-
- 808, 212
-
1257, 173
1069, 173
-
- 651, 212
+
+ 1257, 173
-
- 339, 212
+
+ 1069, 173
444, 212
diff --git a/Roles.cs b/Roles.cs
index e4f312e..e863886 100644
--- a/Roles.cs
+++ b/Roles.cs
@@ -30,7 +30,7 @@ public static class Role
public const string LaboratoryOperator = "Laboratory Operator";
public const string OrderAdministrator = "Order Administrator";
public const string OrderOperator = "Order Operator";
- public const string SampleRegistration = "Sample Registration";
+ public const string SampleRegistrator = "Sample Registrator";
public const string Spectator = "Spectator";
}
diff --git a/database.sql b/database.sql
index 56da312..035f28d 100644
--- a/database.sql
+++ b/database.sql
@@ -253,7 +253,7 @@ insert into role values(NEWID(), 'Laboratory Administrator')
insert into role values(NEWID(), 'Laboratory Operator')
insert into role values(NEWID(), 'Order Administrator')
insert into role values(NEWID(), 'Order Operator')
-insert into role values(NEWID(), 'Sample Registration')
+insert into role values(NEWID(), 'Sample Registrator')
insert into role values(NEWID(), 'Spectator')
go
diff --git a/dsa-lims.ico b/dsa-lims.ico
new file mode 100644
index 0000000..a484ccb
Binary files /dev/null and b/dsa-lims.ico differ