示例#1
0
    private void GetData()
    {
        //设置ID
        userBll bll = new userBll();

        login = bll.GetByID(Convert.ToInt32(Request["id"]));
    }
示例#2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(lblUserName.Text))
            {
                MessageBox.Show("用户名不能为空");
                return;
            }
            if (string.IsNullOrEmpty(txtOriginPwd.Text))
            {
                MessageBox.Show("原密码不能为空");
                return;
            }

            if (string.IsNullOrEmpty(txtNewPwd.Text))
            {
                MessageBox.Show("新密码不能为空");
                return;
            }

            if (string.IsNullOrEmpty(txtConfirmPwd.Text))
            {
                MessageBox.Show("确认密码不能为空");
                return;
            }

            if (txtNewPwd.Text != txtConfirmPwd.Text)
            {
                MessageBox.Show("两次密码不一致");
                return;
            }

            userBll  _userbll  = new userBll();
            userBean _userbean = new userBean();

            _userbean = null;
            _userbean = _userbll.GetLoginBllProc(Common.UserName, txtOriginPwd.Text.ToString());
            //userBean _userbean1 = new userBean();
            //_userbean1 = _userbll.(this.txtName.Text.ToString(), this.txtPwd.Text.ToString());
            if (_userbean == null)
            {
                //MessageBox.Show("登录成功!" + this.txtPwd.Text.ToString(), "提示");
                MessageBox.Show("原密码不正确");
                return;
            }

            int result = _userbll.UpdateUser(Common.Id, txtUserName.Text.Trim(), txtNewPwd.Text.Trim());

            if (result > 0)
            {
                this.Hide();
                MessageBox.Show("更新成功");
            }
        }
示例#3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //处理添加任务
        if (Request["taID"] != null && Request["reID"] != null)
        {
            userBll bll = new userBll();
            login = bll.GetByID(Convert.ToInt32(Request["reID"]));

            //创建并实例化一个CommandSendee对象
            CommandSendee cs = new CommandSendee();
            cs.CommandID  = Convert.ToInt32(Request["taID"]);
            cs.UserID     = Convert.ToInt32(Request["reID"]);
            cs.State      = 1;
            cs.CreateTime = DateTime.Now;
            cs.IsDel      = 0;
            //插入到数据库中
            TaskSendeeBll bll2 = new TaskSendeeBll();
            int           rows = bll2.Add(cs);
            //返回受影响的行数
            Response.Clear();
            Response.ContentType     = "text/plain";
            Response.ContentEncoding = System.Text.Encoding.UTF8;
            Response.Write(rows);
            Response.End();
        }
        //处理该网评员还没有被分配的任务
        if (Request["method"] != null)
        {
            //获取该网评员还没有被分配的任务
            ReceiverBll bll = new ReceiverBll();
            DataTable   dt  = bll.GetRestTask(Convert.ToInt32(Request["receiverID"]));
            DataSet     set = new DataSet();
            set.Tables.Add(dt);
            string json = JsonConvert.SerializeObject(set);
            //写回该网评员还没有被分配的任务
            Response.Clear();
            Response.ContentType     = "text/plain";
            Response.ContentEncoding = System.Text.Encoding.UTF8;
            Response.Write(json);
            Response.End();
        }
        //处理用户ID和用户名
        if (Request["id"] != null)
        {
            GetData();
        }
    }
示例#4
0
 public UnitOfWork()
 {
     productBll            = new ProductBll(new ProductDal());
     bannerBll             = new BannerBll(new BannerDal());
     billBll               = new BillBll(new BillDal());
     categoryBll           = new CategoryBll(new CategoryDal());
     companyInformationBll = new CompanyInformationBll(new CompanyInformationDal());
     phoneBll              = new PhoneBll(new PhoneDal());
     reviewBll             = new reviewBll(new reviewDal());
     rezervationBll        = new rezervationBll(new rezervationDal());
     roleBll               = new roleBll(new roleDal());
     roleOfUserBll         = new roleOfUserBll(new roleOfUserDal());
     saleProductBll        = new SaleProductBll(new SaleProductDal());
     saleProductsDetailBll = new SaleProductsDetailBll(new SaleProductsDetailDal());
     serviceBll            = new serviceBll(new serviceDal());
     userBll               = new userBll(new userDal());
 }
示例#5
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            userBll  _userbll  = new userBll();
            userBean _userbean = new userBean();

            _userbean = null;
            _userbean = _userbll.GetLoginBllProc(this.txtName.Text.ToString(), this.txtPwd.Text.ToString());
            //userBean _userbean1 = new userBean();
            //_userbean1 = _userbll.(this.txtName.Text.ToString(), this.txtPwd.Text.ToString());
            if (_userbean != null)
            {
                //MessageBox.Show("登录成功!" + this.txtPwd.Text.ToString(), "提示");
                new Main().Show();
                this.Hide();
                Common.Id       = _userbean.UId;
                Common.UserName = this.txtName.Text.ToString();
            }
            else
            {
                MessageBox.Show("登录失败!" + this.txtPwd.Text.ToString(), "提示");
            }
        }
示例#6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userBll ubl = new userBll();

        if (Request["UserRoleID"] != null)
        {
            try
            {
                UserRole.ID         = Convert.ToInt32(Request["UserRoleID"]);
                UserRole.UserID     = Convert.ToInt32(Request["UserID"]);
                UserRole.RoleID     = Convert.ToInt32(Request["RoleID"]);
                UserRole.UpdateTime = DateTime.Now;
                int rows = ubl.UserRoleUpdate(UserRole);
                //User = ubl.selectUserName(Request["id"]);
                //Response.Write(rows);
            }
            catch (Exception ex) { }
        }
        else
        {
            UserRole = ubl.selectRole(Request["id"]);
        }
    }
示例#7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        userBll ubl = new userBll();

        if (Request["UserID"] != null)
        {
            try {
                User.Id          = Convert.ToInt32(Request["UserID"]);
                User.Password    = Request["Password"];
                User.NickName    = Request["NickName"];
                User.MobilePhone = Request["MobilePhone"];
                User.Email       = Request["Email"];
                User.UpdateTime  = DateTime.Now;
                int rows = ubl.Update(User);
                User = ubl.selectUserName(Request["id"]);
                Response.Write(rows);
            }
            catch (Exception ex) { }
        }
        else
        {
            User = ubl.selectUserName(Request["id"]);
        }
    }