Attendance/input.aspx.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace Eclipse.HRM.UI.Attendance
{
    public partial class inpput : PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }


        protected void Button5_Click(object sender, EventArgs e)
        {
            Response.Redirect("../function/function5.aspx");
        }


        protected void Button6_Click(object sender, EventArgs e)
        {

            string input;
            string sql = "select * from stafflist where S_ID=" + TextBox_ID.Text;
            input = "insert into attendancelist(S_ID,exam_month,l_times,a_times,late_times) values('" + TextBox_ID.Text.Trim() + "','" + TextBox_month.Text.Trim() + "','" + TextBoxL_times.Text + "','" + TextBox_A_times.Text + "','" + TextBoxLate.Text + "')";
            DataTable dt = DBhelper.GetDataTable(sql);
            if (dt.Rows.Count == 0)
                Label1.Visible = true;
            else
            {

                if (DBhelper.ExeQuery(input))
                {
                    this.ClientScript.RegisterStartupScript(this.GetType(), "insertCorrectly", "alert('操作成功。')", true);

                }
                else
                {
                    this.ClientScript.RegisterStartupScript(this.GetType(), "insertError", "alert('插入数据失败。')", true);
                }

            }
        }
        protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args)
        {
            args.IsValid = false;
            try
            {
                Convert.ToDateTime(this.TextBox_month.Text.Trim());
                args.IsValid = true;
后面还有 8 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。