📄 branch_new_exe.asp
字号:
<!--#include file="../config.asp"-->
<!--#include file="../inc/check_login.asp"-->
<!--#include file="../inc/functions.asp"-->
<%
Application_ID = 6000305 '本功能编号,含义请查看编码表
if not CheckAuth(Session("Employee_ID"),Application_ID) then '验证权限
Server.Transfer "../err/un_authorized.htm"
response.end
end if
%>
<!--**************身份验证部分****************-->
<%
Branch_Name = request("Branch_Name")
if not IsNot(Branch_Name,"s") then
response.write "分公司名称填写不正确"
response.end
end if
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
conn.open connstr
sql = "insert into Employee_Branch(Branch_Name) values('" & Branch_Name & "')"
'response.write sql
conn.execute(sql)
sql = "select Branch_ID from Employee_Branch where Branch_Name = '" & Branch_Name & "'"
set rs = conn.execute(sql)
Branch_ID = rs("Branch_ID")
'考虑到员工不属于某个部门的情况
sql = "insert into Employee_Department(Branch_ID,Department_Name) values(" & Branch_ID & ",' ')"
conn.execute(sql)
conn.close
set conn = nothing
'操作日志
Rec_Content = "添加分公司"
Command_Line = sql
call Op_Rec(Rec_Content,Command_Line)
%>
成功增加分公司!
<script language="JavaScript" type="text/javascript">
parent.main.location.reload();
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -