コード例 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.ContentType = "text/json;charset=utf-8";
        string json = CheckKeys.GetData(Request.Headers["kl"], em.GetAllEmps());

        Response.Write(json);
        Response.End();
    }
コード例 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string serch = Request.Params["serch"];

        Response.ContentType = "text/json;charset=utf-8";
        string json = CheckKeys.GetData(Request.Headers["kl"], em.GetResultEmps(serch));

        Response.Write(json);
        Response.End();
    }
コード例 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int  eno    = Convert.ToInt32(Request.Params["empno"]);
        bool result = em.DeleteEmps(eno);

        Response.ContentType = "text/json;charset=utf-8";
        string json = CheckKeys.GetData(Request.Headers["kl"], result);

        Response.Write(json);
        Response.End();
    }
コード例 #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int    eno    = Convert.ToInt32(Request.Params["empno"]);
        string ename  = Request.Params["ename"];
        string job    = Request.Params["job"];
        string sal    = Request.Params["sal"];
        int    deptno = Convert.ToInt32(Request.Params["Deptno"]);
        Emps   emp    = new Emps
        {
            Deptno = deptno,
            Ename  = ename,
            Job    = job,
            Sal    = sal,
            Empno  = eno
        };
        bool result = em.AddEmps(emp);

        Response.ContentType = "text/json;charset=utf-8";
        string json = CheckKeys.GetData(Request.Headers["kl"], result);

        Response.Write(json);
        Response.End();
    }