Esempio n. 1
0
        public FormUserInfo( )
        {
            InitializeComponent( );

            _model = new MulaolaoLibrary.UserInfoEntity( );
            _bll   = new MulaolaoBll.Bll.UserInfoBll( );

            GridViewMoHuSelect.SetFilter(gridView1);
            GrivColumnStyle.setColumnStyle(new DevExpress.XtraGrid.Views.Grid.GridView [] { gridView1 });

            toolReview.Text = "注销";
            MulaolaoBll.UserInfoMation.tableName = this.Name;

            UnEnable( );
        }
Esempio n. 2
0
        /// <summary>
        /// 编辑用户
        /// </summary>
        /// <param name="_model"></param>
        /// <returns></returns>
        public bool Edit(MulaolaoLibrary.UserInfoEntity _model)
        {
            StringBuilder strSql = new StringBuilder( );

            strSql.Append("UPDATE TPADBA SET ");
            strSql.Append("DBA002=@DBA002,");
            strSql.Append("DBA005=@DBA005,");
            strSql.Append("DBA006=@DBA006,");
            strSql.Append("DBA028=@DBA028,");
            strSql.Append("DBA960=@DBA960 ");
            strSql.Append(" WHERE DBA001=@DBA001");
            SqlParameter [] parameter =
            {
                new SqlParameter("@DBA001", SqlDbType.NVarChar),
                new SqlParameter("@DBA002", SqlDbType.NVarChar),
                new SqlParameter("@DBA005", SqlDbType.NVarChar),
                new SqlParameter("@DBA006", SqlDbType.NVarChar),
                new SqlParameter("@DBA028", SqlDbType.NVarChar),
                new SqlParameter("@DBA960", SqlDbType.NVarChar)
            };
            parameter [0].Value = _model.DBA001;
            parameter [1].Value = _model.DBA002;
            parameter [2].Value = _model.DBA005;
            parameter [3].Value = _model.DBA006;
            parameter [4].Value = _model.DBA028;
            parameter [5].Value = _model.DBA960;

            int rows = SqlHelper.ExecuteNonQuery(strSql.ToString( ), parameter);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 保存用户
        /// </summary>
        /// <param name="_model"></param>
        /// <returns></returns>
        public bool Save(MulaolaoLibrary.UserInfoEntity _model)
        {
            StringBuilder strSql = new StringBuilder( );

            strSql.Append("INSERT INTO TPADBA (");
            strSql.Append("DBA001,DBA002,DBA005,DBA006,DBA028,DBA043,DBA960) ");
            strSql.Append("VALUES (");
            strSql.Append("@DBA001,@DBA002,@DBA005,@DBA006,@DBA028,@DBA043,@DBA960) ");
            SqlParameter [] parameter =
            {
                new SqlParameter("@DBA001", SqlDbType.NVarChar),
                new SqlParameter("@DBA002", SqlDbType.NVarChar),
                new SqlParameter("@DBA005", SqlDbType.NVarChar),
                new SqlParameter("@DBA006", SqlDbType.NVarChar),
                new SqlParameter("@DBA028", SqlDbType.NVarChar),
                new SqlParameter("@DBA043", SqlDbType.NVarChar),
                new SqlParameter("@DBA960", SqlDbType.NVarChar)
            };
            parameter [0].Value = _model.DBA001;
            parameter [1].Value = _model.DBA002;
            parameter [2].Value = _model.DBA005;
            parameter [3].Value = _model.DBA006;
            parameter [4].Value = _model.DBA028;
            parameter [5].Value = _model.DBA043;
            parameter [6].Value = _model.DBA960;

            int rows = SqlHelper.ExecuteNonQuery(strSql.ToString( ), parameter);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 4
0
 /// <summary>
 /// 编辑用户
 /// </summary>
 /// <param name="_model"></param>
 /// <returns></returns>
 public bool Edit(MulaolaoLibrary.UserInfoEntity _model)
 {
     return(dao.Edit(_model));
 }
Esempio n. 5
0
 /// <summary>
 /// 保存用户
 /// </summary>
 /// <param name="_model"></param>
 /// <returns></returns>
 public bool Save(MulaolaoLibrary.UserInfoEntity _model)
 {
     return(dao.Save(_model));
 }