Ejemplo n.º 1
0
    private void GetReader(int userId)
    {
        XYECOM.Business.UserInfo userInfoBLL = new XYECOM.Business.UserInfo();

        XYECOM.Business.UserReg regBLL = new UserReg();

        XYECOM.Model.UserInfo userInfo = userInfoBLL.GetItem(userId);
        XYECOM.Model.UserRegInfo reginfo = regBLL.GetItem(userId);

        //企业信息
        if (userInfo != null)
        {
            this.lbcompanyname.InnerHtml = userInfo.Name;//公司名称
            this.phone.InnerHtml = userInfo.Telephone;
            this.address.InnerHtml = userInfo.Address;
            this.linkman.InnerHtml = userInfo.LinkMan;
            this.tdDescription.InnerHtml = userInfo.Description;
            this.area.InnerHtml = userInfo.AreaInfo.FullNameAll;
        }

        this.U_ID.Value = userId.ToString();

        //用户基本信息
        if (userInfo.RegInfo != null)
        {
            this.mail.InnerHtml = userInfo.RegInfo.Email;
            this.Email.Value = userInfo.RegInfo.Email;
            this.othercontract.InnerHtml = userInfo.RegInfo.OtherContact;//担任职位
        }
    }
Ejemplo n.º 2
0
 public string GetUserName(string AccountId)
 {
     UserReg userRegBLL = new UserReg();
     XYECOM.Model.UserRegInfo userRegInfo = userRegBLL.GetItem(AccountId);
     if (userRegInfo == null)
         return "未知";
     return userRegInfo.LoginName + "/ " + userRegInfo.Email;
 }
Ejemplo n.º 3
0
    protected void btnOk_Click(object sender, EventArgs e)
    {
        Int64 uid = XYECOM.Core.MyConvert.GetInt64(this.Request.QueryString["U_ID"].ToString());

        XYECOM.Business.UserReg userreg = new XYECOM.Business.UserReg();
        XYECOM.Model.UserRegInfo euser = userreg.GetItem(uid);

        euser.Email = tdemail.Text.Trim();   //电子邮件
        euser.Answer = txtAnswer.Text.Trim();
        euser.Question = txtQuestion.Text.Trim();
        try
        {
            euser.RegDate = XYECOM.Core.MyConvert.GetDateTime(this.bgdate.Value); //注册时间
        }
        catch
        { }
        userreg.Update(euser);

        XYECOM.Business.UserInfo userinfo = new XYECOM.Business.UserInfo();
        XYECOM.Model.UserInfo info = userinfo.GetItem(uid);

        info.IM = txtIM.Text.Trim();

        info.LinkMan = tdrealname.Text.Trim(); //真实姓名
        info.Sex = tdsex.SelectedValue.Equals("1") ? true : false;//性别

        info.Mobile = tdmobil.Text.Trim(); //手机
        info.Section = tdsection.Text.Trim(); //所在部门
        info.Post = tdpost.Text.Trim();    //所任职位

        info.Name = companyname.Text.Trim(); //企业名称

        info.AreaId = XYECOM.Core.MyConvert.GetInt32(areatypeid.Value.ToString());
        info.Telephone = txtTelephone.Text.Trim();
        info.Fax = txtFax.Text.Trim();
        info.Postcode = tdpostcode.Text; //邮政编码
        info.HomePage = tdhomepage.Text.Trim(); //企业网址
        info.Address = tdlinkadress.Text.Trim(); //联系地址
        info.Character = tdcharacter.Text.Trim(); //企业性质

        info.UserTypeId = XYECOM.Core.MyConvert.GetInt64(companyid.Value.ToString());
        //info.U_SupplyProduct = tdsupply.Text.Trim(); //提供的产品.服务
        info.BuyPro = tdbuy.Text.Trim(); //需要的产品/服务

        info.RegisteredCapital = XYECOM.Core.MyConvert.GetDecimal(tdmoney.Text.Trim());//注册资金

        if (this.tdumode.SelectedValue != "")
        {
            info.Mode = "";
            for (int i = 0; i < tdumode.Items.Count; i++)
            {
                if (tdumode.Items[i].Selected)
                {
                    info.Mode += tdumode.Items[i].Text + ",";
                }
            }
            info.Mode = info.Mode.Substring(0, info.Mode.Length - 1);  //经营模式
        }

        info.RegYear = XYECOM.Core.MyConvert.GetInt32(lbyear.Text.Trim()); //注册时间
        info.BusinessAddress = lbarea.Text.Trim(); //主要经营地点
        info.RegAreaId = XYECOM.Core.MyConvert.GetInt32(lbaddress.Value.Trim()); //企业注册地
        //info.U_PType = tdptype.Text.Trim(); //主营产品/服务
        info.MainProduct = tdsupply.Text.Trim();
        info.EmployeeTotal = lbnumber.Text.Trim(); //企业人数
        info.Synopsis = tdsynopsis.Text.Trim(); //企业简介
        if (userinfo.Update(info) > 0)
            Alert("修改成功!", backURL);
        else
            Alert("发生错误,修改失败!");
    }
Ejemplo n.º 4
0
    private void BindData(Int64 uid)
    {
        string moneyformat = "n"; //货币转换格式

        XYECOM.Business.UserReg userRegBLL = new XYECOM.Business.UserReg();
        XYECOM.Model.UserRegInfo userRegInfo = new XYECOM.Model.UserRegInfo();
        userRegInfo = userRegBLL.GetItem(uid);
        if (!object.Equals(null, userRegInfo))
        {
            this.tdusername.Text = userRegInfo.LoginName; //用户名
            this.tdemail.Text = userRegInfo.Email;   //电子邮件
            this.bgdate.Value = userRegInfo.RegDate.ToShortDateString(); //注册时间
            txtQuestion.Text = userRegInfo.Question;
            txtAnswer.Text = userRegInfo.Answer;
        }
        else
        {
            Alert("该会员信息有误,请重新选择.", backURL);
        }

        XYECOM.Business.UserInfo userInfoBLL = new XYECOM.Business.UserInfo();
        XYECOM.Model.UserInfo userInfo = new XYECOM.Model.UserInfo();
        userInfo=userInfoBLL.GetItem(uid);
        if (!object.Equals(null, userInfo))
        {
            this.tdrealname.Text = userInfo.LinkMan; //真实姓名
            if (userInfo.Sex == true)                     //性别
                this.tdsex.Text = "1";
            else
                this.tdsex.Text = "0";

            tdIM.InnerHtml = XYECOM.Configuration.FreeCode.Instance.IM.Name + ":";
            txtIM.Text = userInfo.IM;
            this.tdmobil.Text = userInfo.Mobile; //手机
            this.tdsection.Text = userInfo.Section; //所在部门
            this.tdpost.Text = userInfo.Post;    //所任职位

            this.companyname.Text = userInfo.Name; //企业名称

            areatypeid.Value = userInfo.AreaId.ToString();
            txtTelephone.Text = userInfo.Telephone;
            txtFax.Text = userInfo.Fax;
            this.tdpostcode.Text = userInfo.Postcode; //邮政编码
            this.tdhomepage.Text = userInfo.HomePage.Trim(); //企业网址
            this.tdlinkadress.Text = userInfo.Address; //联系地址
            this.tdcharacter.Text = userInfo.Character; //企业性质

            companyid.Value = userInfo.UserTypeId.ToString();
            //this.tdsupply.Text = userInfo.U_SupplyProduct; //提供的产品.服务

            this.tdsupply.Text = userInfo.MainProduct;
            this.tdbuy.Text = userInfo.BuyPro; //需要的产品/服务

            if (userInfo.RegisteredCapital.ToString() != "")
                this.tdmoney.Text = Convert.ToDecimal(userInfo.RegisteredCapital).ToString(moneyformat);
            else
                this.tdmoney.Text = userInfo.Mode;     //注册资金

            this.tdmoneytype.Text = userInfo.MoneyType; //注册资金类别

            tdumode.DataSource = new XYECOM.Business.Mode().GetDataTable();
            tdumode.DataTextField = "M_Type";
            tdumode.DataValueField = "M_Type";
            tdumode.DataBind();

            string[] modes = userInfo.Mode.Split(',');

            foreach (string s in modes)
            {
                for (int i = 0; i < tdumode.Items.Count; i++)
                {
                    if (tdumode.Items[i].Value.Equals(s))
                    {
                        tdumode.Items[i].Selected = true;
                        break;
                    }
                }
            }

            this.lbyear.Text = userInfo.RegYear.ToString(); //注册时间
            this.lbarea.Text = userInfo.BusinessAddress; //主要经营地点
            this.lbaddress.Value = userInfo.RegAreaId.ToString(); //企业注册地
            //this.tdptype.Text = userInfo.U_PType; //主营产品/服务
            this.lbnumber.Text = userInfo.EmployeeTotal; //企业人数
            this.tdsynopsis.Text = userInfo.Synopsis; //企业简介

        }
        else
        {
            Alert("该会员信息有误,请重新选择.", backURL);
        }
    }
Ejemplo n.º 5
0
    /// <summary>
    /// 绑定要修改的新闻信息
    /// </summary>
    /// <param name="id">要修改的新闻ID</param>
    private void NewsDataBind(Int64 id)
    {
        newsInfo = new XYECOM.Business.News().GetItem(newsId);

        if (newsInfo != null)
        {
            string newstypeckId = "";
            //新闻类型
            if (newsInfo.Type == XYECOM.Model.NewsType.TextNews)
            {
                this.rbcommonnews.Checked = true;
                this.rbpicnews.Checked = false;
                this.rbcaptionnews.Checked = false;
                newstypeckId = this.rbcommonnews.ClientID;
            }
            else if (newsInfo.Type == XYECOM.Model.NewsType.ImageNews)
            {
                this.rbpicnews.Checked = true;
                this.rbcommonnews.Checked = false;
                this.rbcaptionnews.Checked = false;
                newstypeckId = this.rbpicnews.ClientID;
            }
            else if (newsInfo.Type == XYECOM.Model.NewsType.HeadlineNews)
            {
                this.rbcaptionnews.Checked = true;
                this.rbcommonnews.Checked = false;
                this.rbpicnews.Checked = false;
                newstypeckId = this.rbcaptionnews.ClientID;
            }

            this.tbnewsname.Text = newsInfo.Title;

            //if (newsInfo.FileUrl != "")
            //{
            //    rbfileUrl.Checked = true;
            //    txtfileUrl.Text = newsInfo.FileUrl;
            //}

            if (!newsInfo.TitleStyle.Equals(""))
            {
                string[] strs = newsInfo.TitleStyle.Split(';');

                foreach (string s in strs)
                {
                    if (s.Equals("")) continue;

                    string[] ss = s.Split(':');

                    if (ss.Length != 2) continue;

                    if (ss[0].Equals("color"))
                    {
                        this.txtTitleColor.Value = ss[1];
                        this.selTitleColor.Value = ss[1];
                    }

                    if (ss[0].Equals("font-weight")) this.chkFontBold.Checked = true;

                    if (ss[0].Equals("font-style")) this.chkFontItalic.Checked = true;

                    if (ss[0].Equals("text-decoration")) this.chkFontUnderline.Checked = true;
                }
            }

            if (newsInfo.TypeIds != "")
            {
                this.hdgetid.Value = XYECOM.Core.Utils.RemoveComma(newsInfo.TypeIds.ToString());
            }

            hidTopicID.Value = newsInfo.TopicType;

            this.tbtwoname.Text = newsInfo.SubTitle;
            this.reswords.Text = newsInfo.Keyword;
            this.tbnewsness.Text = newsInfo.Leadin;
            this.tblinkaddress.Text = newsInfo.HeadlineNewsUrl;

            //附件信息
            DataTable tableAttInfo = new XYECOM.Business.Attachment().GetDataTable(newsInfo.NewsId, XYECOM.Model.AttachmentItem.News, XYECOM.Model.UploadFileType.Image);
            string uploadTypeckId = "";
            if (tableAttInfo.Rows.Count > 0 && newsInfo.PicUrl.Equals("Image"))
            {
                this.rbpicupload.Checked = true;
                this.rbpicurl.Checked = false;

                uploadTypeckId = this.rbpicupload.ClientID;
            }
            else
            {
                this.hipictype.Value = "-1";
                this.hdpicurl.Value = newsInfo.PicUrl;
                this.rbpicurl.Checked = true;
                this.rbpicupload.Checked = false;
                this.tbpinurl.Value = newsInfo.PicUrl;
                uploadTypeckId = this.rbpicurl.ClientID;
            }

            this.tbnewsauthor.Text = newsInfo.Author;
            this.ddlnewsauthor.SelectedValue = this.tbnewsauthor.Text.Trim();
            this.tbnewsorigin.Text = newsInfo.Origin;
            this.ddlnewsorigin.SelectedValue = this.tbnewsorigin.Text.Trim();
            this.newsBody.Value = newsInfo.Content;

            if (newsInfo.AddTime != "")
            {
                try
                {
                    this.tbaddtime.Value = Convert.ToDateTime(newsInfo.AddTime).ToShortDateString();
                }
                catch
                {
                    this.tbaddtime.Value = DateTime.Now.ToShortDateString();
                }
            }

            this.tbcount.Text = newsInfo.ClickNumber.ToString();

            this.cbIsFlag.Checked = newsInfo.IsCommend;

            this.cbIsDiscuss.Checked = newsInfo.IsAllowComment;

            this.cbIsTop.Checked = newsInfo.IsTop;

            this.cbIsHot.Checked = newsInfo.IsHot;

            this.cbIsSlide.Checked = newsInfo.IsSlide;

            if (newsInfo.State == XYECOM.Model.AuditingState.NoPass)
            {
                this.cbAuditing.Checked = false;
            }
            if (newsInfo.State == XYECOM.Model.AuditingState.Passed)
            {
                this.cbAuditing.Checked = true;
            }

            if (newsInfo.ChargeState != "1")
            {
                if (newsInfo.HTMLPage != "")
                {
                    this.cbcreate.Checked = true;
                }
            }
            else
            {
                this.cbcreate.Enabled = false;
            }

            if (newsInfo.Contributor.Equals(0))
            {
                this.IsContributor.Visible = false;
            }
            else
            {
                if (newsInfo.Contributor.ToString() == "-1")
                {
                    this.Contributor.InnerHtml = "<a href=\"#\">游客</a>";
                }
                else
                {
                    XYECOM.Business.UserReg urBLL = new UserReg();
                    XYECOM.Model.UserRegInfo urinfo = new XYECOM.Model.UserRegInfo();
                    urinfo = urBLL.GetItem(newsInfo.Contributor);
                    if (!urinfo.Type)
                        this.Contributor.InnerHtml = "<a href=\"../UserManage/IndividualInfo.aspx?U_ID=" + newsInfo.Contributor + "&backURL=../news/AddNews.aspx?id=" + newsId + "&" + XYECOM.Core.XYRequest.GetQueryString("backURL") + "\">" + newsInfo.Author + "(个人会员)</a>";
                    else
                        this.Contributor.InnerHtml = "<a href=\"../UserManage/UserInfo.aspx?U_ID=" + newsInfo.Contributor + "&backURL=../news/AddNews.aspx?id=" + newsId + "&" + XYECOM.Core.XYRequest.GetQueryString("backURL") + "\">" + newsInfo.Author + "(企业会员)</a>";
                }

            }

            this.city.Value = XYECOM.Core.Utils.RemoveComma(newsInfo.AreaIds);

            this.tradeid.Value = XYECOM.Core.Utils.RemoveComma(newsInfo.TradeIds);

            this.offerid.Value = XYECOM.Core.Utils.RemoveComma(newsInfo.ProtypeIds);

            InitOption(newsInfo.FileUrl);

            ClientScript.RegisterStartupScript(GetType(), Guid.NewGuid().ToString(), "myclick('" + newstypeckId + "','click');", true);
            ClientScript.RegisterStartupScript(GetType(), Guid.NewGuid().ToString(), "myclick('" + uploadTypeckId + "','click');", true);

            if (newsInfo.IsScheme == 1)
                this.cbIsScheme.Checked = true;

            if (newsInfo.IsScheme != 0 && newsInfo.ProIds != null)
            {
                string StrHtml = "";
                string[] IdsArry = newsInfo.ProIds.Split(',');
                string ItemStr = "";

                for (int i = 0; i < IdsArry.Length; i++)
                {
                    if (IdsArry[i] != null)
                    {
                        XYECOM.Model.SupplyInfo SupplyInfo = SupplyBLL.GetSupplyById(XYECOM.Core.MyConvert.GetInt32(IdsArry[i]));

                        StrHtml += "<input checked='checked' onclick=\"Selectchange('" + IdsArry[i] + "')\" type='checkbox' id='cbsel_" + IdsArry[i] + "' value='" + IdsArry[i] + "'/><label>" + SupplyInfo.Title + "</label>";
                        ItemStr += IdsArry[i] + ":" + SupplyInfo.Title + ",";
                    }
                }
                this.Infostxt.Text = StrHtml;
                this.HidItemStr.Value = ItemStr.Substring(0, ItemStr.Length - 1);
            }
        }
    }
Ejemplo n.º 6
0
        private void VisitorMessasge()
        {
            string strMsg = "";
            string toemail = "";

            string userId = XYECOM.Core.XYRequest.GetQueryString("uids");

            long _UserID = XYECOM.Core.MyConvert.GetInt64(userId);
            int infoId = 0;
            #region 游客留言

            if (XYECOM.Configuration.Security.Instance.IsEnabledValidateCode(XYECOM.Configuration.ValidateCodeItem.Message))
            {
                if (!CheckCode(F("GCode").ToString()))
                {
                    strMsg = "codeErr";
                    ResponseXML(Result.Success, "", "<content>" + strMsg + "</content>");
                }
            }

            XYECOM.Business.Message messageBLL = new XYECOM.Business.Message();
            XYECOM.Business.UserReg userRegBLL = new XYECOM.Business.UserReg();
            XYECOM.Model.UserRegInfo userRegInfo = null;
            infoId = XYECOM.Core.MyConvert.GetInt32(XYECOM.Core.XYRequest.GetQueryString("ids"));

            if (_UserID > 0)
            {
                userRegInfo = userRegBLL.GetItem(_UserID);

                if (userRegInfo != null)
                {
                    toemail = userRegInfo.Email;
                }
                else
                {
                    if (infoId > 0)
                    {
                        XYECOM.Model.SupplyInfo supplyInfo = new XYECOM.Business.Supply().GetItem(infoId);

                        if (supplyInfo != null)
                            userRegInfo = userRegBLL.GetItem(supplyInfo.UserID);

                        if (userRegInfo != null)
                        {
                            toemail = userRegInfo.Email.ToString();
                            _UserID = supplyInfo.UserID;
                        }
                    }
                }
            }
            XYECOM.Model.MessageInfo messageInfo = new XYECOM.Model.MessageInfo();
            messageInfo.M_UserName = XYECOM.Core.Utils.RemoveHTML(F("linkman")); //联系人
            messageInfo.M_Email = XYECOM.Core.Utils.RemoveHTML(F("email"));//电子邮件
            messageInfo.M_Moblie = XYECOM.Core.Utils.RemoveHTML(F("mobile"));//手机
            messageInfo.M_Title = XYECOM.Core.Utils.IsLength(40, XYECOM.Core.Utils.RemoveHTML(F("title")));//留言标题
            messageInfo.M_Content = XYECOM.Core.Utils.IsLength(400, XYECOM.Core.Utils.RemoveHTML(F("neirong")));//留言内容
            messageInfo.M_SenderType = F("type");
            messageInfo.M_Sex = false;
            messageInfo.U_ID = 0;
            messageInfo.M_UserType = false;
            messageInfo.M_RecverType = "";
            messageInfo.InfoId = infoId;
            string sexStr = "女士";

            if (F("sex") == "1")
            {
                messageInfo.M_Sex = true;
                sexStr = "先生";
            }

            if (_UserID > 0) messageInfo.UR_ID = _UserID;

            //这块有问题  因为客户端传递的变量usertype永远为1
            //个人认为应该根据选择企业或者个人值有所不同
            //if (F("usertype") == "1") messageInfo.M_UserType = true; //收到留言者类型
            messageInfo.M_UserType = true;

            int result = messageBLL.Insert(messageInfo);

            if (result >= 0)
            {

                string[] dLabel = new string[] {
                    messageInfo.M_Title,
                    messageInfo.M_Content,
                    "<ul><li>姓名:"+messageInfo.M_UserName+" " + sexStr+"</li><li>邮箱:"+messageInfo.M_Email+"</li><li>电话:"+messageInfo.M_Moblie+"</li></ul>",
                    webInfo.WebDomain,
                    webInfo.WebName
                };
                string[] sLabel = new string[] { "{$Title$}", "{$Body$}", "{$Contacts$}", "{$WebUrl$}", "{$WebName$}" };

                XYECOM.Business.Utils.SendMail(toemail, messageInfo.M_Title, XYECOM.Core.TemplateEmail.GetContent(dLabel, sLabel, "/templateEmail/Enquiry.htm"));

                XYECOM.Core.Utils.ClearSession("VNum");

                strMsg = "ok";
            }
            else
            {
                strMsg = "err";
            }

            ResponseXML(Result.Success, "", "<content>" + strMsg + "</content>");
            #endregion
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 检查用户名是否存在
        /// 
        /// 返回值:
        /// -1,用户名为空
        /// 0,不存在,可以使用
        /// 1,已经存在
        /// 2,禁止使用的名称
        /// </summary>
        private void IsExistsUserByName()
        {
            string name = XYECOM.Core.XYRequest.GetQueryString("name").Trim().ToLower();

            if (name.Equals("")) ResponseXML(Result.Failed, "数据不完整");

            if (webInfo.ForbidName != "")
            {
                string[] names = webInfo.ForbidName.Split(',');

                for (int j = 0; j < names.Length; j++)
                {
                    if (name.Equals(names[j].ToLower()))
                    {
                        ResponseXML(Result.Failed, "此用户名不允许注册");
                        break;
                    }
                }
            }

            Business.UserReg userRegBLL = new XYECOM.Business.UserReg();
            if (userRegBLL.IsExistTheUserName(name))
            {
                Model.UserRegInfo userRegInfo = userRegBLL.GetItem(name);

                ResponseXML(Result.Failed, "此用户名已被注册,请选择其他用户名", "<question>" + userRegInfo.Question + "</question>");
            }

            ResponseXML(Result.Success, "验证通过");
        }
Ejemplo n.º 8
0
    protected string Link(string id)
    {
        if (id == "-1")
        {
            return "游客";
        }

        XYECOM.Business.UserReg urBLL = new UserReg();
        XYECOM.Model.UserRegInfo urinfo = new XYECOM.Model.UserRegInfo();

        urinfo = urBLL.GetItem(XYECOM.Core.MyConvert.GetInt64(id));

        if (urinfo == null)
        {
            return "用户已删除";
        }

        if (!urinfo.Type)
            return "<a href='../UserManage/IndividualInfo.aspx?U_ID=" + id + "&backURL=../news/ContributorList.aspx'>" + urinfo.LoginName + "</a><br/>(个人会员)";
        else
            return "<a href='../UserManage/UserInfo.aspx?U_ID=" + id + "&backURL=../news/ContributorList.aspx'>" + urinfo.LoginName + "</a><br/>(企业会员)";
    }
Ejemplo n.º 9
0
        private void gvDataBind()
        {
            //设置编辑或查看评论后要返回当前页面的状态
            backURL = XYECOM.Core.Utils.JSEscape(
            "LogUserbehavior.aspx?Page1=" + Page1.CurPage.ToString() +
            "&txtname=" + txtname.Text.Trim() +
            "&DDLoperate=" + DDLoperate.SelectedValue +
            "&bgdate=" + bgdate.Value +
            "&egdate=" + egdate.Value
            );

            string strOrder = " order by AccountId desc";
            this.lblMessage.Text = "";
            string strTableName = "XY_AccountDetails";
            string strWhere = " where 1=1";
            string begindate = this.bgdate.Value;
            string enddate = this.egdate.Value;
            string Operate = this.DDLoperate.SelectedValue;

            if (Operate == "-1" || Operate == "")
            {
                strWhere += " and (Operate=" + (int)XYECOM.Model.AccountOperate.ContractMargin;
                strWhere += " or Operate=" + (int)XYECOM.Model.AccountOperate.InputMoney;
                strWhere += " or Operate=" + (int)XYECOM.Model.AccountOperate.PayContractMargin;
                strWhere += " or Operate=" + (int)XYECOM.Model.AccountOperate.PayOrders;
                strWhere += " or Operate=" + (int)XYECOM.Model.AccountOperate.PaySupMargin;
                strWhere += ")";
            }
            else
            {
                strWhere += " and Operate=" + XYECOM.Core.MyConvert.GetInt32(Operate);
            }

            if (begindate != "")
            {
                strWhere += " and (OperateDate > '" + begindate + "') ";
            }

            if (enddate != "")
            {
                strWhere += " and (OperateDate < '" + XYECOM.Core.MyConvert.GetDateTime(enddate).AddDays(1) + "') ";
            }

            if (this.txtname.Text != "")
            {
                UserReg userRegBLL = new UserReg();
                XYECOM.Model.UserRegInfo userRegInfo = userRegBLL.GetItem(this.txtname.Text.Trim());

                strOrder = "order by OperateDate desc";
                if (userRegInfo != null)
                {
                    strWhere += " and AccountId=" + userRegInfo.AccountId;
                }
                else
                {
                    strWhere += " and AccountId=0";
                }
            }
            this.Page1.RecTotal = Function.GetRows(strTableName, "ID", strWhere);
            DataTable dt = Function.GetPages(this.Page1.PageSize, this.Page1.CurPage, strWhere, strOrder, strTableName, " * ", "ID");
            if (dt.Rows.Count > 0)
            {
                this.gvlist.DataSource = dt;
                this.gvlist.DataBind();
            }
            else
            {
                this.lblMessage.Text = "没有相关信息";
                this.gvlist.DataBind();
            }
        }
Ejemplo n.º 10
0
    private void GetReader(int userId)
    {
        XYECOM.Business.UserInfo userInfoBLL = new XYECOM.Business.UserInfo();
        XYECOM.Business.UserAccount userAccountBLL = new XYECOM.Business.UserAccount();
        XYECOM.Business.UserFictitiouCount userFictitiouCountBLL = new XYECOM.Business.UserFictitiouCount();
        XYECOM.Business.UserLogin userLoginBLL = new UserLogin();
        XYECOM.Business.Auditing auditingBLL = new Auditing();
        XYECOM.Business.UserReg regBLL = new UserReg();

        XYECOM.Model.UserInfo userInfo = userInfoBLL.GetItem(userId);
        XYECOM.Model.UserRegInfo reginfo = regBLL.GetItem(userId);

        //XYECOM.Model.UserAccountInfo userAccountInfo = userAccountBLL.GetItem(userId);
        XYECOM.Model.UserFictitiouCountInfo userFictitiouCountInfo = userFictitiouCountBLL.GetItem(userId);
        XYECOM.Model.UserLoginInfo userLoginInfo = userLoginBLL.GetItem(userId);

        XYECOM.Model.AuditingInfo atinfo = auditingBLL.GetItem(userId.ToString(), "u_User");

        //企业信息
        if (userInfo != null)
        {
            this.lbcompanyname.InnerHtml = userInfo.Name + "&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"UserMoreInfo.aspx?U_ID=" + userId.ToString() + "&backURL=" + XYECOM.Core.Utils.JSEscape(XYECOM.Core.XYRequest.GetQueryString("backURL")) + "\">查看(编辑)公司详细资料>></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href='EnterUserCenter.aspx?u_id=" + userId + "' target='_blank'>进入企业会员中心>></a>"; //公司名称
            this.lbsection.InnerHtml = userInfo.Section;//所在部门
            this.lbpost.InnerHtml = userInfo.Post;//担任职位
            this.lblevel.InnerHtml = userInfo.RegInfo.GradeInfo.GradeName + "&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"ChangeUserGrade.aspx?ui=" + userId.ToString() + "&BackURL=" + XYECOM.Core.Utils.JSEscape(XYECOM.Core.XYRequest.GetQueryString("backURL")) + "\">更改会员等级>></a>";//更改会员等级
            this.phone.InnerHtml = userInfo.Telephone;
            this.linkman.InnerHtml = userInfo.LinkMan;
        }

        this.U_ID.Value = userId.ToString();

        //用户基本信息
        if (userInfo.RegInfo != null)
        {
            this.mail.InnerHtml = userInfo.RegInfo.Email;
            this.Email.Value = userInfo.RegInfo.Email;
            this.lbmark.InnerHtml = userInfo.RegInfo.Mark.ToString();//用户积分
        }

        //虚拟账户信息
        this.lbfcleftmoney.InnerHtml = userFictitiouCountInfo.C_LeftMoney.ToString(".#");//虚拟账户余额

        if (userLoginInfo != null)
        {
            this.regip.InnerHtml = userLoginInfo.RegIP;
            this.lastloginip.InnerHtml = userLoginInfo.LastLoginIP;
            this.lastlogintime.InnerHtml = userLoginInfo.LastLoginDate.ToString(); ;
            this.loginnum.InnerHtml = userLoginInfo.LoginNum.ToString();
        }
        else
        {
            this.regip.InnerHtml = "暂无信息";
            this.lastloginip.InnerHtml = "暂无信息";
            this.lastlogintime.InnerHtml = "暂无信息";
            this.loginnum.InnerHtml = "暂无信息";
        }

        if (userInfo.RegInfo.AuditingState == XYECOM.Model.AuditingState.Null)
        {
            this.lbmessage.Text = "未审核";
        }
        else if (userInfo.RegInfo.AuditingState == XYECOM.Model.AuditingState.Passed)
        {
            this.lbmessage.Text = "通过审核";
            this.Button5.Enabled = false;
        }
        else if (userInfo.RegInfo.AuditingState == XYECOM.Model.AuditingState.NoPass)
        {
            this.lbmessage.Text = "未通过审核";
            if (atinfo != null)
            {
                if (atinfo.A_Reason != "" || atinfo.A_Advice != "")
                {
                    this.plreason.Visible = true;
                    if (atinfo.A_Reason != "")
                    {
                        this.labreason.Text = atinfo.A_Reason;
                        this.tbA_Reason.Text = atinfo.A_Reason;
                    }
                    else
                    {
                        this.labreason.Text = "暂无原因";
                        this.tbA_Reason.Text = "暂无原因";
                    }
                    if (atinfo.A_Advice != "")
                    {
                        this.labadv.Text = atinfo.A_Advice;
                        this.tbA_Advice.Text = atinfo.A_Advice;
                    }
                    else
                    {
                        this.labadv.Text = "暂无建议";
                        this.tbA_Advice.Text = "暂无建议";
                    }
                }
            }
        }
    }