or
Private
Sub
rgvDocumentsPO_CommandCellClick(sender
As
Object
, e
As
System.EventArgs)
Handles
rgvDocumentsPO.CommandCellClick
Dim
VendorID
As
Integer
= ddlDocumentsVendor.SelectedValue
Dim
documentid
As
Integer
= rgvDocumentsPO.CurrentRow.Cells(
"Document ID"
).Value
If
DataLayer.UnconfirmDocument(documentid) =
True
Then
LoadDocuments(VendorID)
Else
RadMessageBox.Show(
"You can not unconfirm this document."
)
End
If
End
Sub
Private
Sub
rgvDocumentsDrawings_CommandCellClick(sender
As
Object
, e
As
System.EventArgs)
Handles
rgvDocumentsDrawings.CommandCellClick
Dim
VendorID
As
Integer
= ddlDocumentsVendor.SelectedValue
'It errors out on this next line, but not the same line in the above Sub
Dim
documentid
As
Integer
= rgvDocumentsDrawings.CurrentRow.Cells(
"Document ID"
).Value
If
DataLayer.UnconfirmDocument(documentid) =
True
Then
LoadDocuments(VendorID)
Else
RadMessageBox.Show(
"You can not unconfirm this document."
)
End
If
End
Sub
Public
Sub
LoadDocuments(
ByVal
VendorID
As
Integer
)
Try
Dim
CommandColumn
As
New
GridViewCommandColumn
CommandColumn.Name =
"Unconfirm"
CommandColumn.HeaderText =
""
CommandColumn.DefaultText =
"Unconfirm"
CommandColumn.UseDefaultText =
True
CommandColumn.TextAlignment = ContentAlignment.MiddleCenter
If
rgvDocumentsDrawings.RowCount = 0
Then
rgvDocumentsDrawings.Columns.Add(CommandColumn)
End
If
If
rgvDocumentsPO.RowCount = 0
Then
rgvDocumentsPO.Columns.Add(CommandColumn)
End
If
Catch
ex
As
Exception
End
Try
rgvDocumentsPO.DataSource = DataLayer.GetActiveDocumentsByDocTypeAndVendor(2, VendorID)
rgvDocumentsDrawings.DataSource = DataLayer.GetActiveDocumentsByDocTypeAndVendor(3, VendorID)
rgvDocumentsPO.Columns(
"Document ID"
).IsVisible =
False
rgvDocumentsDrawings.Columns(
"Document ID"
).IsVisible =
False
rgvDocumentsPO.Columns(
"Unconfirm"
).Width = 100
rgvDocumentsDrawings.Columns(
"Unconfirm"
).Width = 100
rgvDocumentsPO.BestFitColumns()
rgvDocumentsDrawings.BestFitColumns()
End
Sub
public
ReportPreview(CalculationResults results)
{
InitializeComponent();
ReportChart.ChartTitle.TextBlock.Text = @
"Report"
;
ReportChart.Series.Clear();
var chartSeriesA =
new
ChartSeries {Type = ChartSeriesType.Bezier, Name = @
"Elevation"
};
chartSeriesA.Appearance.LineSeriesAppearance.Color = Color.DarkBlue;
chartSeriesA.Appearance.PointMark.Dimensions.Width = 5;
chartSeriesA.Appearance.PointMark.Dimensions.Height = 5;
chartSeriesA.Appearance.PointMark.FillStyle.MainColor = Color.Black;
chartSeriesA.Appearance.PointMark.Visible =
true
;
var chartSeriesB =
new
ChartSeries {Type = ChartSeriesType.Bezier, Name = @
"Predicted Elevation"
};
chartSeriesB.Appearance.LineSeriesAppearance.Color = Color.DarkBlue;
chartSeriesB.Appearance.PointMark.Dimensions.Width = 5;
chartSeriesB.Appearance.PointMark.Dimensions.Height = 5;
chartSeriesB.Appearance.PointMark.FillStyle.MainColor = Color.Black;
chartSeriesB.Appearance.PointMark.Visible =
true
;
for
(
int
i = 0; i < results.CurveFittingDataList.Count; i++)
{
chartSeriesA.AddItem(
new
ChartSeriesItem((
double
)results.CurveFittingDataList[i].AngularLoc, (
double
)results.CurveFittingDataList[i].Elevation));
chartSeriesB.AddItem(
new
ChartSeriesItem((
double
)results.CurveFittingDataList[i].AngularLoc, (
double
)results.CurveFittingDataList[i].PredictedElevation));
}
ReportChart.Series.Add(chartSeriesA);
ReportChart.Series.Add(chartSeriesB);
ReportChart.PlotArea.XAxis.AxisLabel.TextBlock.Text = @
"Location Angle"
;
ReportChart.PlotArea.YAxis.AxisLabel.TextBlock.Text = @
"Elevation"
;
ReportChart.Update();
}