Esempio n. 1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        if(Page.IsValid)
        {
            //string str = ConfigurationManager.ConnectionStrings["SqlServerConnectionString"].ConnectionString;
            //SqlConnection conn = new SqlConnection(str);
            //string okmima = "", xingbie = "", tiwent = "", daane = "";

            //okmima = XMM.Text.Trim();
            //xingbie = xb1.SelectedItem.Text.ToString();
            //tiwent = DropDownListTW.SelectedItem.Text.ToString();
            //daane = daan.Text.Trim();
            //string sql = "update [userinfo] set yonghuming=@yonghuming, mima=@okmima ,xingbie=@xingbie ,mimatiwen=@mimatiwen ,daan=@daan       where id ='" + Convert.ToInt32(Request.QueryString["id"]) + "'";
            //SqlCommand com = new SqlCommand(sql, conn);
            //com.Parameters.Add(new SqlParameter("@okmima", SqlDbType.VarChar)).Value = okmima;
            //com.Parameters.Add(new SqlParameter("@xingbie", SqlDbType.VarChar)).Value = xingbie;
            //com.Parameters.Add(new SqlParameter("@mimatiwen", SqlDbType.VarChar)).Value = tiwent;
            //com.Parameters.Add(new SqlParameter("@daan", SqlDbType.VarChar)).Value = daane;
            //com.Parameters.Add(new SqlParameter("@yonghuming", SqlDbType.VarChar, 50)).Value = yhm.Text;
            //conn.Open();
            //com.ExecuteNonQuery();

            ///利用架构实现
            Daxu.Entity.userinfo user = new Daxu.Entity.userinfo();
            user.name=yhm.Text;
            user.Okpsw=XMM.Text ;
            user.psw = QURENMM.Text;
            user.id = Convert.ToInt32(Request.QueryString["id"]);
            Daxu.BLL.userinfoBll.UpdateIuserinfo(user);

            Response.Redirect("userlist.aspx");
        }
    }
Esempio n. 2
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        UserHandle.UserHandle.InitModules_Admin("HYCK");
        if (UserHandle.UserHandle.ValidationHandle_Admin(RoleTag.Add))
        {
            Daxu.Entity.userinfo userinfo = new Daxu.Entity.userinfo();
            userinfo.name = _name.Text;
            userinfo.Reallyname = _Reallyname.Text;
            userinfo.Email = _Email.Text;
            userinfo.Plane = _Plane.Text;
            userinfo.Emailnumber = _Emailnumber.Text;
            userinfo.EmailnumberAddss = _EmailnumberAddss.Text;

            userinfo.QQ = _QQ.Text;
            userinfo.tell = _tell.Text;
            userinfo.code = _code.Text;

            userinfo.Integral = Convert.ToString(Convert.ToInt32(_integral.Text));
            //switch (DropDownList1.SelectedValue)
            //{
            //    case "1":
            //        userinfo.LastdateTime = Convert.ToDateTime(_LastdateTimeHidden.Value).AddYears(1);
            //        userinfo.Fixed = "1";
            //        break;
            //    case "2":
            //        userinfo.LastdateTime = Convert.ToDateTime(_LastdateTimeHidden.Value).AddMonths(6);
            //        userinfo.Fixed = "2";

            //        break;
            //    case "3":
            //        addtime.Visible = true;
            //        userinfo.LastdateTime = Convert.ToDateTime(addtime.Text);
            //        userinfo.Fixed = "3";

            //        break;
            //    case "4":
            //        addtime.Visible = false;
            //        userinfo.LastdateTime = Convert.ToDateTime(_LastdateTimeHidden.Value).AddMonths(6);

            //        userinfo.Fixed = "4";
            //        break;

            //    case "5":

            //        addtime.Visible = false;
            //        userinfo.Fixed = "5";
            //        break;
            //}
            userinfo.id = Convert.ToInt32(Request.QueryString["id"]);
            Daxu.BLL.userinfoBll.UpdateIuserinfo(userinfo);
            Response.Write("<script>alert(\"修改成功!\");location.href='../men/menlist.aspx';</script>");
        }
        else
        {
            Response.Write("<script>alert(\"对不起权限不足!\");location.href='../baseinfo/info.aspx';</script>");
        }
    }
Esempio n. 3
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     Daxu.Entity.userinfo userinfo = new Daxu.Entity.userinfo();
     userinfo = Daxu.BLL.userinfoBll.getuserinfoModel("select * from userinfo where id='"+Convert.ToInt32(Request.QueryString["id"])+"'");
     Daxu.Entity.userinfo userinfoload = new Daxu.Entity.userinfo();
     userinfoload.serverfenlei = kfinfo.SelectedValue;
     userinfoload.id=Convert.ToInt32(userinfo.id);
     Daxu.BLL.userinfoBll.UpdateIuserinfo(userinfoload);
     Response.Write("<script>alert(\"修改成功!\");location.href='../service/usermanagement.aspx';</script>");
 }
Esempio n. 4
0
    protected void addinlte()
    {
        if (!string.IsNullOrEmpty(userid.Value))
        {
            string sql = "select * from  userinfo where id='" + Convert.ToInt32(userid.Value) + "'";
            Daxu.Entity.userinfo userinfo = Daxu.BLL.userinfoBll.getuserinfoModel(sql);

            Daxu.Entity.userinfo userinfoed = new Daxu.Entity.userinfo();
            if (dr1.SelectedItem.Text == dr2.SelectedItem.Text)
            {
                if (dr1.SelectedItem.Text == "100" || dr2.SelectedItem.Text == "120")
                {
                    TimeSpan time = Convert.ToDateTime(userinfo.LastdateTime) - Convert.ToDateTime(DateTime.Now);
                    if (time.Days < 0)
                    {
                        userinfoed.LastdateTime = DateTime.Now.AddDays(184);

                    }
                    else
                    {
                        userinfoed.LastdateTime = Convert.ToDateTime(userinfo.LastdateTime).AddDays(184);
                    }
                    userinfoed.Fixed = "2";
                }
                if (dr1.SelectedItem.Text == "200" || dr2.SelectedItem.Text == "176")
                {
                    TimeSpan time = Convert.ToDateTime(userinfo.LastdateTime) - Convert.ToDateTime(DateTime.Now);
                    if (time.Days < 0)
                    {
                        userinfoed.LastdateTime = DateTime.Now.AddDays(366);

                    }
                    else
                    {
                        userinfoed.LastdateTime = Convert.ToDateTime(userinfo.LastdateTime).AddDays(366);
                    }
                    userinfoed.Fixed = "1";
                }
                string sqlto = "select * from userinfo where code='" + userinfo.code + "' and  category='E'";
                Daxu.Entity.userinfo userinfoend = Daxu.BLL.userinfoBll.getuserinfoModel(sqlto);
                Daxu.Entity.userinfo userinfoend1 = new Daxu.Entity.userinfo();
                userinfoend1.Integral = Convert.ToString(Convert.ToInt32(userinfoend.Integral == "" ? 0 : Convert.ToInt32(userinfoend.Integral) + Convert.ToInt32(dr2.SelectedItem.Text)));
                userinfoend1.id = Convert.ToInt32(userinfoend1.id);
                Daxu.BLL.userinfoBll.UpdateIuserinfo(userinfoend1);
                userinfoed.id =Convert.ToInt32(userid.Value);
                Daxu.BLL.userinfoBll.UpdateIuserinfo(userinfoed );
            }
            else
            {
                Response.Write("<script>alert(\"对不起您所选的值不同!\");location.href='" + Request.RawUrl + "';</script>");
            }
        }
    }
Esempio n. 5
0
        public ActionResult AddUserInfo(string username, string tel, string email)
        {
            bool  Success = false ;

            bool count = Daxu.BLL.userinfoBll.EntityExists<userinfo>(new SearchEntityList() {
                ModelEqual="userinfo",
                TellEqual = tel,
                EmailEqual = email

            });

            if (count)
            {

                return Json(new ResultMessage() { Success = Success, Message = Success ? " !" : "邮箱手机已经被注册,请重新输入!" });

            }
            else {
                userinfo model = new userinfo()
                {
                    name = username,
                    tell = tel,
                    Email = email
                };

                int i = Daxu.BLL.userinfoBll.InsertEntity<userinfo>(model);
                WebContext webcontex = new WebContext(HttpContext);
                webcontex.UserLogin(username, new UserData()
                {
                    UserID = i,
                    UserName = model.name,
                    FullName = model.name
                });
                if (i > 0)
                {
                    Success = true;
                }
            }
            return Json(new ResultMessage() { Success = Success, Message=Success ?  "注册成功!" :  "注册失败!" });
        }
Esempio n. 6
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        UserHandle.UserHandle.InitModules_Admin("LRHYINFO");
        if (UserHandle.UserHandle.ValidationHandle_Admin(RoleTag.Edit))
        {
            Daxu.Entity.userinfo userinfo = new Daxu.Entity.userinfo();
            userinfo.name = _name.Text;
            userinfo.Reallyname = _Reallyname.Text;
            userinfo.psw = _psw.Text;
            userinfo.Email = _Email.Text;
            userinfo.Plane = _Plane.Text;
            userinfo.Emailnumber = _Emailnumber.Text;
            userinfo.EmailnumberAddss = _EmailnumberAddss.Text;
            userinfo.Addss = _Addss.Text;
            userinfo.QQ = _QQ.Text;
            userinfo.tell = _tell.Text;
            userinfo.pd = "1";
            userinfo.category = "X";

            if (HiddenField1.Value == "1")
            {
                userinfo.id = Convert.ToInt32(Request.QueryString["id"]);
                Daxu.BLL.userinfoBll.UpdateIuserinfo( userinfo);
                Response.Write("<script>alert(\"修改成功!\");location.href='../men/menlist.aspx';</script>");
            }
            else
            {
                Daxu.BLL.userinfoBll.InsertIuserinfo(userinfo);
                Response.Write("<script>alert(\"添加成功!\");location.href='../men/menlist.aspx';</script>");
            }
        }
        else
        {
            Response.Write("<script>alert(\"对不起权限不足!\");location.href='../baseinfo/info.aspx';</script>");
        }
    }
Esempio n. 7
0
    protected void infodata()
    {
        string sql = "select * from userinfo where  1=1 and category='X' and  code like '%E'";
        List<Daxu.Entity.userinfo> userinfolist = new List<Daxu.Entity.userinfo>();
        userinfolist = Daxu.BLL.userinfoBll.GetIuserinfoData(sql) as List<Daxu.Entity.userinfo>;
        foreach (Daxu.Entity.userinfo userinfoed in userinfolist)
        {
            TimeSpan time = Convert.ToDateTime(userinfoed.LastdateTime) - Convert.ToDateTime(DateTime.Now);
            if (time.Days < 0)
            {
                Daxu.Entity.userinfo userinfo = new Daxu.Entity.userinfo();
                userinfo.Fixed = "5";
                userinfo.Paynumber = "0";
                userinfo.LastdateTime = DateTime.Now;
                userinfo.id =Convert.ToInt32(userinfoed.id);
                Daxu.BLL.userinfoBll.UpdateIuserinfo(userinfo);
            }

        }
    }
Esempio n. 8
0
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.Header)
        {
            CheckBox check = new CheckBox();
            check.ID = "allcheck";
            Label la = new Label();
            la.Text = "1";
            e.Row.Cells[0].Controls.Add(check);
        }
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            if (!string.IsNullOrEmpty(((Literal)e.Row.FindControl("_LastdateTime")).Text) && !string.IsNullOrEmpty(((Literal)e.Row.FindControl("_dateTime")).Text))
            {
                TimeSpan time = Convert.ToDateTime(((Literal)e.Row.FindControl("_LastdateTime")).Text) - Convert.ToDateTime(DateTime.Now);
                ((Literal)(e.Row.FindControl("countDay"))).Text = Convert.ToString(time.Days);

                if (((HiddenField)(e.Row.FindControl("_pdHidden"))).Value == "0")
                {
                    ((Literal)(e.Row.FindControl("_pd"))).Text = "否";

                }
                else if (((HiddenField)(e.Row.FindControl("_pdHidden"))).Value == "1")
                {
                    ((Literal)(e.Row.FindControl("_pd"))).Text = "是";

                }
                //没激活,过期删除
                //if (((HiddenField)(e.Row.FindControl("_pdHidden"))).Value == "0")
                //{
                //    if (Convert.ToInt32(((Literal)(e.Row.FindControl("countDay"))).Text) < 1)
                //    {
                //        //DataKey datakey = GridView1.DataKeys[e.Row.RowIndex];
                //        //Daxu.BLL.userinfoBll.DeleteIuserinfo("userinfo", Convert.ToInt32(datakey.Value));
                //    }
                //}
                //设置是否是过期的
                if (time.Days < 0)
                {
                    Daxu.Entity.userinfo userinfo=new Daxu.Entity.userinfo();
                    userinfo.Fixed="5";
                    userinfo.Paynumber = "0";
                    userinfo.LastdateTime = DateTime.Now;
                    DataKey datakey = GridView1.DataKeys[e.Row.RowIndex];
                    userinfo.id = Convert.ToInt32(datakey.Value);
                    Daxu.BLL.userinfoBll.UpdateIuserinfo(userinfo);
                }
            }
        }
    }
Esempio n. 9
0
    protected void tijiao_Click(object sender, EventArgs e)
    {
        //提交按钮事件
        if (Page.IsValid)

        {
            //string str = ConfigurationManager.ConnectionStrings["SqlServerConnectionString"].ConnectionString;
            //SqlConnection conn = new SqlConnection(str);

            //SqlCommand cmd = new SqlCommand(sql, conn);
            //conn.Open();
            //int n = (int)cmd.ExecuteScalar();
            //conn.Close();
            string ustername = YHM.Text.Trim();
            string sql = "select count(*) from [userinfo] where  yonghuming='" + ustername + "'";

            int n = (int)Daxu.BLL.userinfoBll.GetIuserinfoFirstColumn(sql);

            if (n > 0)
            {
                Response.Write("<script>alert(\"用户名已经存在\")</script>");

            }
            Daxu.Entity.userinfo userinfomordel = new Daxu.Entity.userinfo();
            //userinfomordel.yonghuming=ustername;
            //userinfomordel.mima=MIMA.Text.Trim();
            //userinfomordel.querenmima = QURENMIMA.Text.Trim();
            //userinfomordel.nianling=nianlinglingbiao.SelectedItem.Text.Trim();
            //userinfomordel.xingbie=XINGBIE.SelectedItem.Text.Trim();
            //userinfomordel.jiatingzhuzhe=JIATING.Text.Trim();
            //userinfomordel.aihao=AIHAO.Text.Trim();
            //userinfomordel.dianhua=DH.Text.Trim();
            //userinfomordel.shenfenzheng=SFZ.Text.Trim();
            //userinfomordel.jianli= JIATING.Text.Trim();
            //userinfomordel.hunyin=HY.SelectedItem.Text.Trim();
            //userinfomordel.mimatiwen=mamatiwen.SelectedItem.Text.Trim();
            //userinfomordel.Both= nian.SelectedItem.Text.Trim()+"-"+yue.SelectedItem.Text.Trim()+"-"+ri.SelectedItem.Text.Trim();
            //userinfomordel.daan = MIMADAN.Text.Trim();
            Daxu.BLL.userinfoBll.InsertIuserinfo( userinfomordel);

            //cmd.CommandText = "insert into userinfo (yonghuming,mima,querenmima,nianling,xingbie,jiatingzhuzhe,aihao,dianhua,shenfenzheng,jianli,Both,hunyin,mimatiwen,daan)values(@YHM,@MIMA,@QURENMIMA,@nianlinglingbiao,@XINGBIE,@JIATING,@AIHAO,@DH,@SFZ,@GEREN,@Both,@HY,@mamatiwen,@MIMADAN)";
            //cmd.Parameters.Add(new SqlParameter("@YHM", SqlDbType.VarChar,80)).Value = ustername;
            //cmd.Parameters.Add(new SqlParameter("@MIMA", SqlDbType.VarChar, 80)).Value = MIMA.Text.Trim();
            //cmd.Parameters.Add(new SqlParameter("@QURENMIMA", SqlDbType.VarChar, 80)).Value = QURENMIMA.Text.Trim();
            //cmd.Parameters.Add(new SqlParameter("@nianlinglingbiao", SqlDbType.VarChar, 80)).Value = nianlinglingbiao.SelectedItem.Text.Trim();
            //cmd.Parameters.Add(new SqlParameter("@XINGBIE", SqlDbType.VarChar, 80)).Value = XINGBIE.SelectedItem.Text.Trim();
            //cmd.Parameters.Add(new SqlParameter("@JIATING", SqlDbType.VarChar, 80)).Value = JIATING.Text.Trim();
            //cmd.Parameters.Add(new SqlParameter("@AIHAO", SqlDbType.VarChar, 80)).Value = AIHAO.Text.Trim();
            //cmd.Parameters.Add(new SqlParameter("@DH", SqlDbType.VarChar, 80)).Value = DH.Text.Trim();
            //cmd.Parameters.Add(new SqlParameter("@SFZ", SqlDbType.VarChar, 80)).Value = SFZ.Text.Trim();
            //cmd.Parameters.Add(new SqlParameter("@GEREN", SqlDbType.VarChar, 80)).Value = GEREN.Text.Trim();
            //cmd.Parameters.Add(new SqlParameter("@HY", SqlDbType.VarChar, 80)).Value = HY.SelectedItem.Text.Trim();
            //cmd.Parameters.Add(new SqlParameter("@Both", SqlDbType.VarChar, 80)).Value = nian.SelectedItem.Text.Trim()+"-"+yue.SelectedItem.Text.Trim()+"-"+ri.SelectedItem.Text.Trim();
            //cmd.Parameters.Add(new SqlParameter("@mamatiwen", SqlDbType.VarChar, 80)).Value = mamatiwen.SelectedItem.Text.Trim();
            //cmd.Parameters.Add(new SqlParameter("@MIMADAN", SqlDbType.VarChar, 80)).Value = MIMADAN.Text.Trim();
            //conn.Open();
            //cmd.ExecuteNonQuery();
            //conn.Close();
            Session["username"] = ustername;
            Response.Redirect("login.aspx");

        }
    }
Esempio n. 10
0
    protected void submit_Click(object sender, EventArgs e)
    {
        Daxu.Entity.userinfo userinfo = new Daxu.Entity.userinfo();
        userinfo.name = _admin.Text;
        userinfo.psw = _pswd.Text;

        if (_state.Checked)
        {
            userinfo.state = "1";
        }
        else
        {
            userinfo.state = "0";
        }
        userinfo.dateTime = DateTime.Now;
        userinfo.Groups = _Groups.SelectedItem.Text;
        userinfo.Groupsid = _Groups.SelectedValue;
        userinfo.Role = _Role.SelectedItem.Text;
        userinfo.Roleid = _Role.SelectedValue;

        if (pdinfo.Value == "00")
        {
            Daxu.BLL.userinfoBll.InsertIuserinfo(userinfo);
            Response.Write("<script>alert(\"添加成功!\");location.href='administratormanage.aspx';</script>");
        }
        else
        {
            userinfo.id = Convert.ToInt32(pdinfo.Value);
            Daxu.BLL.userinfoBll.UpdateIuserinfo(userinfo);
            Response.Write("<script>alert(\"修改成功!\");location.href='administratormanage.aspx';</script>");
        }
    }
Esempio n. 11
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        UserHandle.UserHandle.InitModules_Admin("HYCK");
        if (UserHandle.UserHandle.ValidationHandle_Admin(RoleTag.Edit))
        {
            if (Hiddpd.Value == "1")
            {
                Daxu.Entity.userinfo userinfo = new Daxu.Entity.userinfo();
                switch (DropDownList1.SelectedValue)
                {
                    case "0":

                        break;
                    case "1":
                        userinfo.LastdateTime = Convert.ToDateTime(_LastdateTimeHidden.Value).AddDays(366);
                        userinfo.Fixed = "1";
                        userinfo.Paynumber = "1";
                        break;
                    case "2":
                        userinfo.LastdateTime = Convert.ToDateTime(_LastdateTimeHidden.Value).AddDays(184);
                        userinfo.Paynumber = "1";
                        userinfo.Fixed = "2";

                        break;
                    case "3":
                        addtime.Visible = true;
                        userinfo.LastdateTime = Convert.ToDateTime(addtime.Text);
                        userinfo.Paynumber = "1";
                        userinfo.Fixed = "3";

                        break;
                    case "4":
                        addtime.Visible = false;
                        userinfo.LastdateTime = Convert.ToDateTime(_LastdateTimeHidden.Value).AddDays(184);
                        userinfo.Paynumber = "1";
                        userinfo.Fixed = "4";

                        break;
                    case "5":
                        addtime.Visible = false;
                        userinfo.LastdateTime = DateTime.Now;
                        userinfo.Fixed = "5";
                        userinfo.Paynumber = "0";
                        break;
                }
                userinfo.id = Convert.ToInt32(Request.QueryString["id"]);
                Daxu.BLL.userinfoBll.UpdateIuserinfo(userinfo);
                Response.Write("<script>alert(\"修改成功!\");location.href='../men/menlist.aspx';</script>");
            }
            else {

                Response.Write("<script>alert(\"对不起此用户还未激活!\");location.href='../men/menlist.aspx';</script>");

            }

        }
        else
        {
            Response.Write("<script>alert(\"对不起权限不足!\");location.href='../baseinfo/info.aspx';</script>");
        }
    }
Esempio n. 12
0
        public ActionResult Registered(string tel, string psw)
        {
            bool Success = false;

            bool count = Daxu.BLL.userinfoBll.EntityExists<userinfo>(new SearchEntityList()
            {
                ModelEqual = "userinfo",
                TellEqual = tel

            });

            if (count)
            {

                return Json(new ResultMessage() { Success = Success, Message = Success ? " !" : "手机已经被注册,请重新输入!" });

            }
            else
            {
                userinfo model = new userinfo()
                {
                    psw = psw,
                    tell = tel,
                };

                int i = Daxu.BLL.userinfoBll.InsertEntity<userinfo>(model);
                WebContext webcontex = new WebContext(HttpContext);
                webcontex.UserLogin(tel, new UserData()
                {
                    UserID = i,
                    UserName = model.name,
                    FullName = model.name
                });
                if (i > 0)
                {
                    Success = true;
                }
            }
            return Json(new ResultMessage() { Success = Success, Message = Success ? "注册成功,正在跳转..." : "注册失败!" });
        }