Пример #1
0
        /// <summary>
        /// 修改用户密码
        /// </summary>
        /// <param name="userID">登陆用户ID</param>
        /// <param name="OldPwd">旧登陆密码</param>
        /// <param name="NewPwd">新登陆密码</param>
        /// <returns></returns>
        public static Hashtable SetUserInfo(int userID, string OldPwd, string NewPwd)
        {
            Hashtable ht = new Hashtable();
            DataTable dt = WebSiteCustomInfoDBHelper.SelectDataTable(userID);

            if (dt.Rows.Count < 1)
            {
                ht.Add("0", "用户不存在!");
            }
            else
            {
                if (dt.Rows[0]["LoginPassword"].ToString() != OldPwd)
                {
                    ht.Add("0", "原密码错误!");
                }
                else
                {
                    WebSiteCustomInfoModel model = new WebSiteCustomInfoModel();
                    model.ID            = userID;
                    model.LoginPassword = NewPwd;
                    if (WebSiteCustomInfoDBHelper.UpdatePassWord(model))
                    {
                        ht.Add("1", "修改成功!");
                    }
                    else
                    {
                        ht.Add("0", "修改失败!");
                    }
                }
            }
            return(ht);
        }
Пример #2
0
 /// <summary>
 /// 查询数据记录
 /// </summary>
 /// <param name="customID">往来单位ID</param>
 /// <param name="loginUserName">站点登陆用户名</param>
 /// <returns>返回DataSet数据集</returns>
 public static DataTable SelectDataTable(int customID, string loginUserName)
 {
     return(WebSiteCustomInfoDBHelper.SelectDataTable(customID, loginUserName));
 }
Пример #3
0
 /// <summary>
 /// 查询数据记录
 /// </summary>
 /// <param name="iD"></param>
 /// <returns>返回DataSet数据集</returns>
 public static DataTable SelectDataTable(int iD)
 {
     return(WebSiteCustomInfoDBHelper.SelectDataTable(iD));
 }