Created
July 11, 2014 13:08
-
-
Save CipherLab/c557212934286a833008 to your computer and use it in GitHub Desktop.
Using the html syntax in vb.net
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Function BuildLabelMarkup(Context As IDataSource, Process As IDataSource, Label As IDataSource) As String Implements ILabelBuilder.BuildLabelMarkup | |
Dim listNo As String = Process.GetValue("List No.", "") | |
Dim lotnum As String | |
If listNo = "07064" Then | |
lotnum = Process.GetValue("Lot No.", "") | |
Else | |
lotnum = Process.GetValue("Lot No.", "") + "-" + Process.GetValue("SublotNumber", "") | |
End If | |
Dim desc1 = Process.GetValue("Extended Description", 0, "") | |
Dim desc2 = Process.GetValue("Extended Description", 1, "") | |
Dim desc3 = Process.GetValue("Extended Description", 2, "") | |
Dim desc4 = Process.GetValue("Extended Description", 3, "") | |
Dim desc5 = Process.GetValue("Extended Description", 4, "") | |
Dim desc6 = Process.GetValue("Extended Description", 5, "") | |
Dim lotexp = Process.GetValue("Lot Expiration Date", "") | |
Dim labelformat As String = Process.GetValue("Label Format Style", "") | |
Dim exportText As String = "" | |
If (labelformat.Trim() = "83") Then | |
exportText = "EXPORT" | |
End If | |
Return <html lang='en' xmlns='http://www.w3.org/1999/xhtml'> | |
<head> | |
<meta charset='utf-8'/> | |
<title></title> | |
</head> | |
<body style="font-family:courier new; font-size:8pt"> | |
<div> | |
<br/> | |
<div style="text-indent: 3%"> | |
<span>List#: <strong><%= listNo %></strong></span> | |
</div> | |
<ul style="text-align: left; text-indent: 4%; list-style-type: none;"> | |
<li><%= desc1 %></li> | |
<li><%= desc2 %></li> | |
<li><%= desc3 %></li> | |
<li><%= desc4 %></li> | |
<li><%= desc5 %></li> | |
<li><%= desc6 %></li> | |
</ul> | |
<div style="text-indent: 0%"> | |
<ul style="text-align: left; list-style-type: none;"> | |
<li><span>Lot#: <strong><%= lotnum %></strong></span><strong><%= lotexp %></strong></li> | |
<li><br/></li> | |
</ul> | |
</div> | |
<div style="font-size: large; font-weight: bold; color: #FF0000; text-align: center;"> | |
<br/> | |
<br/> | |
<span><%= exportText %></span> | |
</div> | |
</div> | |
</body> | |
</html>.ToString() | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment