chuqinModify.aspx.cs
(完整代码) 2KBusing System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Salary.Model;
using Salary.DAO;
public partial class chuqinModify : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["adminUserName"] == null)
Response.Redirect("login.aspx");
if(!IsPostBack)
{
int chuqinId = Int32.Parse(Request.QueryString["chuqinId"]);
ChuqinDAO chuqinDAO = new ChuqinDAO();
Chuqin chuqin = chuqinDAO.getOneChuqin(chuqinId);
this.EmployeeId.Text = chuqin.getEmployeeId();
this.Name.Text = (new EmployeeDAO()).getOneEmployee(chuqin.getEmployeeId()).getName();
this.chuqinTime.Text = chuqin.getYear() + "年" + chuqin.getMonth() + "月";
this.OverHour.Text = chuqin.getOverHour().ToString();
this.ChiDao.Text = chuqin.getChiDao().ToString();
this.ZaoTui.Text = chuqin.getZaoTui().ToString();
this.KuangGong.Text = chuqin.getKuangGong().ToString();
}
}
protected void Btn_Update_Click(object sender, EventArgs e)
{
int chuqinId = Int32.Parse(Request.QueryString["chuqinId"]);
Chuqin chuqin = new Chuqin();
chuqin.setChuqinId(chuqinId);
chuqin.setOverHour(Convert.ToSingle(this.OverHour.Text));
chuqin.setChiDao(Convert.ToInt32(this.ChiDao.Text));
chuqin.setZaoTui(Convert.ToInt32(this.ZaoTui.Text));
chuqin.setKuangGong(Convert.ToSingle(this.KuangGong.Text));
ChuqinDAO chuqinDAO = new ChuqinDAO();
if (chuqinDAO.update(chuqin))
Response.Write("<script>alert('出勤信息更新成功!');location.href='chuqinModify.aspx?chuqinId=" + chuqinId + "'</script>");
else
Response.Write("<script>alert('" + chuqinDAO.getErrMessage() + "');location.href='chuqinModify.aspx?chuqinId=" + chuqinId + "';</script>");
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。