Esempio n. 1
0
        private void Bindinfo()
        {
            DTcms.DAL.users dalUser   = new DAL.users();
            var             usermodel = dalUser.GetModel(WEBUserCurrent.UserID);

            if (usermodel != null)
            {
                Images        = string.IsNullOrEmpty(usermodel.avatar) ? "images/vip_touxiang.jpg" : "upload/user/" + usermodel.avatar;
                lblAdd.Text   = usermodel.address;
                username.Text = usermodel.nick_name;
                //username2.Text = usermodel.nick_name;
                //username3.Text = usermodel.nick_name;
                //username4.Text = usermodel.nick_name;
                email2.Text  = usermodel.email;
                mobile2.Text = usermodel.mobile;
                lblUrl.Text  = usermodel.gongsi;
                Url          = usermodel.gongsi;
                //congye2.Text = usermodel.congye;
                //gongsi2.Text = usermodel.gongsi;
                //fuwuquyu2.Text = usermodel.fuwuquyu;
                //shuxishequ2.Text = usermodel.shuxishequ;

                //fuwutechang2.Text = usermodel.fuwutechang;
                //jingli2.Text = usermodel.jingli;
                //zhengshu2.Text = usermodel.zhengshu;
                //note2.Text = usermodel.note;
            }
        }
Esempio n. 2
0
        //找回密碼
        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            DAL.users bll   = new DAL.users();
            var       model = bll.ExistsByUsernameAndEmail(txtusername2.Value.Trim(), txtemail.Value);

            if (model.Rows.Count > 0)
            {
                var              password  = DESEncrypt.Decrypt(model.Rows[0]["password"].ToString());
                BLL.siteconfig   bllConfig = new BLL.siteconfig();
                Model.siteconfig config    = bllConfig.loadConfig(Utils.GetXmlMapPath(DTKeys.FILE_SITE_XML_CONFING));

                string body = model.Rows[0]["user_name"] + "您好,請確認您的密碼: " + password + " 請牢記您的密碼";
                // var reWrite = SendMail.Mail(site.emailfrom, site.emailusername, txtemail.Value.Trim(), "會員找回密碼操作", body, site.emailusername, site.emailpassword, site.emailstmp, "");

                var reWrite = DTMail.sendMail(config.emailstmp, config.emailfrom, config.emailpassword, config.emailusername, config.emailfrom, txtemail.Value.Trim(), "會員找回密碼操作", body);
                if (reWrite.Equals("發送失敗"))
                {
                    this.Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('發送郵件失敗,請重新發送');window.location.href='login.aspx?type=1'</script>");
                }
                else
                {
                    this.Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('發送郵件成功,請查看郵件');window.location.href='login.aspx'</script>");
                }
            }
            else
            {
                this.Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('用戶名或郵箱不存在');window.location.href='login.aspx?type=1'</script>");
            }
        }
Esempio n. 3
0
        private void Bindinfo()
        {
            DTcms.DAL.users dalUser   = new DAL.users();
            int             id        = string.IsNullOrEmpty(Request.QueryString["id"]) ? -1 : int.Parse(Request.QueryString["id"]);
            var             usermodel = dalUser.GetModel(id);

            if (usermodel != null)
            {
                Images        = GetFace(usermodel.avatar);
                lblAdd.Text   = usermodel.address;
                username.Text = usermodel.user_name;
                //username2.Text = usermodel.user_name;
                username3.Text = usermodel.nick_name;
                username4.Text = usermodel.user_name;
                email2.Text    = usermodel.email;
                mobile2.Text   = usermodel.telphone;
                lblUrl.Text    = usermodel.gongsi;
                Url            = usermodel.gongsi;
                lbl_info.Text  = usermodel.jingli;
                //fuwuquyu.Text = usermodel.fuwuquyu;
                //shuxishequ2.Text = usermodel.shuxishequ;
                //fuwutechang2.Text = usermodel.fuwutechang;
                note2.Text = usermodel.note;
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 获取金牌大厨焦点图数据
        /// </summary>
        /// <returns></returns>
        public List <Views.chef> GetChefImgList()
        {
            List <Views.chef> chef = new List <Views.chef>();

            DAL.users user = new DAL.users();
            foreach (DataRow item in user.GetChefImgList().Rows)
            {
                chef.Add(user.DataRowToChef(item));
            }
            return(chef);
        }
Esempio n. 5
0
        private void Bindinfo()
        {
            DTcms.DAL.users dalUser   = new DAL.users();
            var             usermodel = dalUser.GetModel(WEBUserCurrent.UserID);

            Images            = string.IsNullOrEmpty(usermodel.avatar) ? "images/vip_touxiang.jpg" : "upload/user/" + usermodel.avatar;
            lblUsername.Text  = usermodel.nick_name;
            lblbUsertype.Text = new DAL.user_groups().GetTitle(usermodel.group_id);

            //是商家會員就獲取資訊
            if (usermodel.group_id == 5)
            {
                BindJp(1);
            }
        }
Esempio n. 6
0
        public List <Views.userSign> getFollowbyid(string id)
        {
            List <Views.userSign> signList = new List <Views.userSign>();

            Cook.DAL.follow_          follow     = new Cook.DAL.follow_();
            Cook.DAL.users            user       = new DAL.users();
            List <Cook.Model.follow_> followList = DataTableToList(follow.GetList("", "", id));

            foreach (Cook.Model.follow_ item in followList)
            {
                Views.userSign sign = follow.getFollow(user.GetModel(item.id.ToString()));
                sign.time = item.time;
                signList.Add(sign);
            }
            return(signList);
        }
Esempio n. 7
0
        public List <Views.userSign> gethenchmanbyid(string id)
        {
            List <Views.userSign> signList = new List <Views.userSign>();

            Cook.DAL.henchman_          hen        = new Cook.DAL.henchman_();
            Cook.DAL.users              user       = new DAL.users();
            List <Cook.Model.henchman_> followList = DataTableToList(hen.GetList("", "", id));

            foreach (Cook.Model.henchman_ item in followList)
            {
                Views.userSign sign = hen.gethenchman(user.GetModel(item.id.ToString()));
                sign.time = item.time;
                signList.Add(sign);
            }
            return(signList);
        }
Esempio n. 8
0
        private void Bindinfo()
        {
            DTcms.DAL.users dalUser   = new DAL.users();
            int             id        = string.IsNullOrEmpty(Request.QueryString["id"]) ? -1 : int.Parse(Request.QueryString["id"]);
            var             usermodel = dalUser.GetModel(id);

            if (usermodel != null)
            {
                Images            = string.IsNullOrEmpty(usermodel.avatar) ? "images/vip_touxiang.jpg" : "upload/user/" + usermodel.avatar;
                lblAdd.Text       = usermodel.address;
                username.Text     = usermodel.nick_name;
                username2.Text    = usermodel.nick_name;
                username3.Text    = usermodel.nick_name;
                username4.Text    = usermodel.nick_name;
                email2.Text       = usermodel.email;
                mobile2.Text      = usermodel.mobile;
                fuwuquyu.Text     = usermodel.fuwuquyu;
                shuxishequ2.Text  = usermodel.shuxishequ;
                fuwutechang2.Text = usermodel.fuwutechang;
                note2.Text        = usermodel.note;
            }
        }
Esempio n. 9
0
 public users()
 {
     dal = new DAL.users(siteConfig.sysdatabaseprefix);
 }
Esempio n. 10
0
        private readonly Model.siteconfig siteConfig = new BLL.siteconfig().loadConfig(); //���վ��������Ϣ

        #endregion Fields

        #region Constructors

        public users()
        {
            dal = new DAL.users(siteConfig.sysdatabaseprefix);
        }
Esempio n. 11
0
 /// <summary>
 /// 获得user类型
 /// </summary>
 /// <returns></returns>
 public Views.user GetUser(string id)
 {
     DAL.users user = new DAL.users();
     return(user.GetUser(id));
 }
Esempio n. 12
0
        /// <summary>
        /// 获得trends对象实体
        /// </summary>
        /// <param name="row"></param>
        /// <returns></returns>
        public Views.trends DataRowToTrends(DataRow row, string token = "")
        {
            Views.trends model   = new Views.trends();
            DAL.users    user    = new DAL.users();
            collect_     collect = new collect_();

            DAL.discuss_ dis = new DAL.discuss_();
            if (row != null)
            {
                if (row["id"] != null && row["id"].ToString() != "")
                {
                    model.id = int.Parse(row["id"].ToString());
                }
                if (row["authorid"] != null && row["authorid"].ToString() != "")
                {
                    model.authorid = row["authorid"].ToString();
                }
                if (row["authorid"] != null && row["authorid"].ToString() != "")
                {
                    model.author = user.getAuthorName(int.Parse(row["authorid"].ToString()));
                }
                if (row["type"] != null)
                {
                    model.type = row["type"].ToString();
                }
                if (row["grade"] != null && row["grade"].ToString() != "")
                {
                    model.grade = decimal.Parse(row["grade"].ToString());
                }
                if (row["name"] != null)
                {
                    model.title = row["name"].ToString();
                }
                if (row["url"] != null)
                {
                    model.img = row["url"].ToString();
                }
                if (row["content"] != null)
                {
                    model.content = row["content"].ToString();
                }
                if (row["time"] != null)
                {
                    model.time = row["time"].ToString();
                }
                if (token != "")
                {
                    try
                    {
                        model.collect = collect.isCollect(token, model.id.ToString());
                    }
                    catch (Exception) {
                        model.collect = false;
                    }
                }
                try
                {
                    model.discussNum = dis.GetRecordCount("", model.id.ToString()).ToString();
                }
                catch (SqlException) {
                    model.discussNum = "0";
                }
            }
            return(model);
        }
Esempio n. 13
0
 public users()
 {
     dal = new DAL.users();
 }