Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
Z

Zoomlion

@Zoomlion
About
Posts
3
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Java to C#
    Z Zoomlion

    I have the following classes in Java which i want to convert to C# but have errors with the undelined codes. (Can someone help me with the C# equivalent of PUT and GET) class TagInfo{ public int tagOffset; public int tagLength; public TagInfo(){ } } private void buildMetaData() { Record record = getData(); int offset = IMGREC_TAGLIST_INDEX; int numTags = 0 ; short tagID = 0; try { numTags = this.getNumberOfTags() ; for (int i=0; i < numTags; i++){ TagInfo info = new TagInfo(); info.tagOffset = offset; info.tagLength = TagRecord.TAG_DATA_INDEX + record.readInt(offset + TagRecord.TAG_DATALEN_INDEX); tagID = record.readShort(offset + TagRecord.TAG_ID_INDEX); offset += info.tagLength; tagInfo.put(new Short(tagID),info); Console.WriteLine("tagID = " + tagID); } } catch (Exception ex) { } finally { } this.imageOffset = offset; this.imageSize = record.getLength() - offset; } public TagRecord getTagByID(short id) { TagRecord record = null; TagInfo info = (ImageRecord.TagInfo)tagInfo.get(new Short(id)); if (info != null){ byte[] data = this.getData().read(info.tagOffset,info.tagLength); record = new TagRecord(data); } return record; }

    C# csharp java help

  • Generate Sequencial Number
    Z Zoomlion

    I have something similar in VB6 with MDB but have difficulty using C# and MSS. See my VB6 code below and advice on how to produce something similar in C#. Public Sub GenerateCode(ByRef Coder As String) Dim strMar As String, intApr As Integer Dim strJul As String Coder = UCase(Coder) Dim rs As New ADODB.Recordset Dim cn As New ADODB.Connection On Error GoTo AddNewErr cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Manager.mdb" rs.Open "select ItemNo from Items where left(ItemNo,8) like '" + Coder + "' order by ItemNo asc", cn, adOpenKeyset, adLockOptimistic If rs.RecordCount <> 0 Then rs.MoveLast If Left(Trim(rs.Fields!ItemNo), 8) = Coder Then strMar = Right(Trim(rs.Fields!ItemNo), 6) strMar = Val(strMar) + 1 strMar = CStr(strMar) If (6 - Len(strMar)) <> 0 Then strMar = String$(6 - Len(strMar), "00000") & strMar End If Else strMar = "000001" End If Else strMar = "000001" End If Coder = Coder & strMar Editor = Coder Set rs = Nothing Set cn = Nothing Exit Sub AddNewErr: MsgBox Err.Description, vbExclamation, "Error Report" End Sub

    C# csharp help

  • Generate Sequencial Number
    Z Zoomlion

    Guys, I am using C# with MSS 2005. I need to generate a sequential number for a field (ItemNo) in the format ddmmyyyy000000x where x is a sequencial number eg (020520100000001,020520100000002, 020520100000003 ...) for records generated on May 2, 2010. Can any one help in this regard.

    C# csharp help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups