Exemplo n.º 1
0
 private void Form1_Load(object sender, EventArgs e)
 {
     BLL.UserManage BLL = new BLL.UserManage();
     lst_KisiListesi.DisplayMember = "Name";
     lst_KisiListesi.ValueMember   = "UserName";
     lst_KisiListesi.DataSource    = BLL.ActiveUsers();
 }
Exemplo n.º 2
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/html";
            string statecode = context.Request["statecode"];
            string sid       = context.Request["sid"];
            string sname     = context.Request["sname"];
            string sclass    = context.Request["sclass"];
            string sgrade    = context.Request["sgrade"];
            string ssystem   = context.Request["ssystem"];


            string state = new BLL.UserManage().select_statecode(statecode);

            if (state == "超级管理员" || state == "管理员" && sid != null && sname != null && sclass != null && sgrade != null && ssystem != null)
            {
                student_users us = new student_users();
                us.Sid1     = Convert.ToInt32(sid);
                us.Sname1   = sname;
                us.Sclass1  = sclass;
                us.Sgrade1  = sgrade;
                us.Ssystem1 = ssystem;


                if (new BLL.UserManage().modify_student(us))
                {
                    context.Response.Write("修改成功");
                }
            }
        }
Exemplo n.º 3
0
    public void btnlogin(object sender, EventArgs e)
    {
        try
        {
            BLL.UserManage um   = new BLL.UserManage();
            Model.UserInfo user = um.userlogin(Text1.Value, Text2.Value);

            Session["name"] = user.uname;
            Response.Write("<script>alert('login ok');location.href='Index.aspx';</script>");
        }
        catch (Exception ex)
        {
            Response.Write("<script>alert('" + ex.Message + "');</script>");
        }
    }
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string sid       = context.Request["sid"];
            string statecode = context.Request["statecode"];

            string state = new BLL.UserManage().select_statecode(statecode);

            if (state == "超级管理员" || state == "管理员" && sid != null)
            {
                if (new BLL.UserManage().delect_student(Convert.ToInt32(sid)))
                {
                    context.Response.Write("删除成功");
                }
            }
        }
Exemplo n.º 5
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/html";
            string statecode = context.Request["statecode"];
            string sid       = context.Request["sid"];
            string sname     = context.Request["sname"];
            string sclass    = context.Request["sclass"];
            string sgrade    = context.Request["sgrade"];
            string ssystem   = context.Request["ssystem"];
            string id        = context.Request["id"];
            string sphone    = context.Request["sphone"];
            string sbirth    = context.Request["sbirth"];


            string state = new BLL.UserManage().select_statecode(statecode);
            int    Sid   = Convert.ToInt32(sgrade + new BLL.UserManage().judgeclass(sclass) + new BLL.UserManage().judgesystem(ssystem) + sid);

            if (new BLL.UserManage().select_sid_student(Sid))
            {
                if (state == "超级管理员" || state == "管理员" && sid != null && sname != null && sclass != null && sgrade != null && ssystem != null)
                {
                    student_users us = new student_users();
                    us.Sid1     = Sid;
                    us.Sname1   = sname;
                    us.Sclass1  = sclass;
                    us.Sgrade1  = sgrade;
                    us.Ssystem1 = ssystem;
                    us.id1      = id;
                    us.Sphone1  = sphone;
                    us.Sbirth1  = sbirth;

                    if (new BLL.UserManage().add_student(us))
                    {
                        context.Response.Write("添加成功");
                    }
                }
            }
            else
            {
                context.Response.Write("学号已存在");
            }
        }
Exemplo n.º 6
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/html";

            string state     = context.Request["state"];
            string statecode = context.Request["statecode"];


            string state_select = new BLL.UserManage().select_statecode(statecode);
            string JsonString   = string.Empty;

            if (state_select == "超级管理员" && state == null)
            {
                JsonString = JsonConvert.SerializeObject(new BLL.UserManage().select_usernamestate_teble("超级管理员"));
                context.Response.Write(JsonString);
            }
            else if (state_select == "超级管理员" && state != null)
            {
                JsonString = JsonConvert.SerializeObject(new BLL.UserManage().select_usernamestate2_teble(state));
                context.Response.Write(JsonString);
            }
        }