ZSJ_BCY_Web/Admin-Insert.aspx.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZSJ_BCY_Web_BLL;
using ZSJ_BCY_Web_Model;
namespace ZSJ_BCY_Web
{
public partial class Admin_Insert : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DropDownList1.DataSource = PositionManage.Select();
DropDownList1.DataTextField = "PositionName";
DropDownList1.DataValueField = "PositionId";
DropDownList1.DataBind();
}
}
protected void btn_submit_Click(object sender, EventArgs e)
{
int status = 0;
if (CheckBox1.Checked)
{
status = 1;
}
else
{
status = 0;
}
Staff staff = new Staff()
{
StaffAccount=txtStaffAccount.Value,
StaffBirthday=Calendar1.SelectedDate,
StaffEducation=txtStaffEducation.Value,
StaffIdcard=txtStaffIdcard.Value,
StaffName=txtstaffName.Value,
Staffpassword=txtStaffpassword.Value,
StaffPosition=Convert.ToInt32( DropDownList1.SelectedValue),
StaffSalary=Convert.ToDouble( txtStaffSalary.Value),
StaffSex=Convert.ToInt32( RadioButtonList1.SelectedValue),
StaffStatus=status,
StaffTelePhone=txtStaffTelePhone.Value
};
if (StaffManage.InsertStaff(staff)>0)
{
Response.Write("<script>alert('添加成功');location='Admin-list.aspx';</script>");
}
else
{
后面还有 6 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
