web/EditCashier.aspx.vb
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
Imports BLL
Imports Model
Imports System.Data
Imports System.Data.SqlClient
Partial Class EditCustAcount
Inherits System.Web.UI.Page
Dim Syscrf As New SystemBLL()
Dim syssales As New SalesStaffBLL
Dim strsales As New SalesStaffModel
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
If Request.QueryString("ID") Is Nothing Then
savebtn0.Visible = False
Else
txt_id.Text = Request.QueryString("ID").ToString.Trim
savebtn.Visible = False
getdata()
End If
End If
End Sub
Private Sub getdata()
Dim dt As DataTable = Syscrf.seachData("select * from SALESSTAFFTABLE where id=" & txt_id.Text.Trim).Tables(0)
txt_CUS.Text = dt.Rows(0)("SalesId").ToString
txt_name.Text = dt.Rows(0)("SalesName").ToString
txt_ADDR.Text = dt.Rows(0)("ADDRESS").ToString
txt_TEL.Text = dt.Rows(0)("TEL").ToString
txt_LOCTEL.Text = dt.Rows(0)("LOCALTEL").ToString
list_SEX.SelectedValue = dt.Rows(0)("SEX").ToString
End Sub
Protected Sub savebtn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles savebtn.Click
strsales.SalesId = txt_CUS.Text.Trim
strsales.SalesName = txt_name.Text.Trim
strsales.ADDRESS = txt_ADDR.Text.Trim
strsales.TEL = txt_TEL.Text.Trim
strsales.LOCALTEL = txt_LOCTEL.Text.Trim
strsales.SEX = list_SEX.SelectedValue.Trim
strsales.SalesType = 0
strsales.CashierType = 1
strsales.CREATEBY = Request.Cookies("sh")("userid").ToString
'Request.Cookies("userid")("username").ToString
Dim id As Integer = syssales.countfield(txt_CUS.Text.Trim)
If id > 0 Then
If syssales.UpdateSalesStaff(id, 1) = True Then
Response.Redirect("CashierAcount.aspx")
Else
Response.Write("<script>alert('添加失败');</script>")
End If
Else
syssales.Add_SalesStaff(strsales)
Response.Redirect("CashierAcount.aspx")
End If
End Sub
Protected Sub savebtn0_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles savebtn0.Click
strsales.Id = Convert.ToInt16(txt_id.Text.Trim)
strsales.SalesId = txt_CUS.Text.Trim
strsales.SalesName = txt_name.Text.Trim
后面还有 12 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
