I have an existing system written in VB.net and the database I used was MSAccess, and I would like to convert it into web application using asp.net written in C# and the database platform is SQL Server. Do you think I could still used my codes in VB.net especially for the following and convert it into C#:
1. Connection to the SQL Database
2. Add Records to the SQL Database
3. Edit and Update Records to the SQL Database
4. Delete Records to the SQL Database
How's the conversion? Is it a hard work to do? And is it true that PHP is much better than the ASP.net using C#? My colleagues told me that PHP works better than ASP.net?
Here is the sample code:
Thank you in advance!Code:Private Sub btnEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEdit.Click Dim cm As CurrencyManager If IsNothing(dsVolumeGenDiscount) Then Exit Sub cm = CType(BindingContext(dsVolumeGenDiscount, "tblVolGenDiscount"), CurrencyManager) 'check if record is empty Dim A As Integer A = Me.BindingContext(dsVolumeGenDiscount, "tblVolGenDiscount").Count If A = 0 Then MsgBox("Record is empty!", MsgBoxStyle.Information) Exit Sub End If Dim id As Integer Dim dr As DataRowView = CType(cm.Current, DataRowView) id = CType(dr.Item("DiscountID"), Integer) Dim dsE As DataSet = GetDetail(id) Binder(dsE) 'Me.LoadData() If txtChkGen.Text = "yes" Then chkGenDiscount.Checked = True End If btnEdit.Visible = False btnAdd.Enabled = False btnDelete.Enabled = False btnSave.Visible = True 'Me.cboCountry.DataBindings.Clear() 'Me.cboEquipment.DataBindings.Clear() 'Me.txtCostPerEquip.DataBindings.Clear() 'Me.txtDocID.DataBindings.Clear() End Sub




Reply With Quote