示例#1
0
文件: UserInfo.cs 项目: xyecom/AMS
        /// <summary>
        /// ��ȡ�û�����
        /// </summary>
        /// <param name="userId">�û�Id</param>
        /// <returns>���ݶ���</returns>
        public XYECOM.Model.UserInfo GetItem(long userId)
        {
            SqlParameter[] param = new SqlParameter[]
                {
                    new SqlParameter("@strWhere"," Where U_ID=" + userId.ToString()),
                    new SqlParameter("@strTableName","u_UserInfo"),
                    new SqlParameter("@strOrder","")
                };

            XYECOM.Model.UserInfo info = null;

            using (SqlDataReader reader = XYECOM.Core.Data.SqlHelper.ExecuteReader(CommandType.StoredProcedure, "XYP_SelectByWhere", param))
            {
                if (reader.Read())
                {
                    info = new XYECOM.Model.UserInfo();

                    info.RegInfo = new UserReg().GetItem(userId);

                    info.UserId = userId;

                    info.Name = reader["UI_Name"].ToString();

                    info.Address = reader["UI_Area"].ToString();

                    info.Character = reader["UI_Character"].ToString();
                    info.License = reader["UI_License"].ToString();
                    info.HomePage = reader["UI_HomePage"].ToString();
                    info.LinkMan = reader["UI_LinkMan"].ToString();
                    info.Mobile = reader["UI_Mobil"].ToString();
                    info.EmployeeTotal = reader["UI_Number"].ToString();
                    info.Postcode = reader["UI_Postcode"].ToString();
                    info.Synopsis = reader["UI_Synopsis"].ToString();
                    info.Sex = Core.MyConvert.GetBoolean(reader["UI_Sex"].ToString());

                    info.UserTypeId = Core.MyConvert.GetInt64(reader["UT_ID"].ToString());
                    info._UserTypeInfo = new UserType().GetItem(info.UserTypeId);

                    info.Telephone = reader["telephone"].ToString();
                    info.Fax = reader["fax"].ToString();
                    info.Section = reader["U_Section"].ToString();
                    info.Post = reader["U_Post"].ToString();
                    info.SupplyOrBuy = Core.MyConvert.GetInt16(reader["U_Way"].ToString());
                    info.SupplyPro = reader["U_SupplyProduct"].ToString();
                    info.BuyPro = reader["U_BuyProduct"].ToString();
                    info.Mode = reader["U_Mode"].ToString();
                    info.RegisteredCapital = Core.MyConvert.GetDecimal(reader["U_Money"].ToString());
                    info.RegYear = Core.MyConvert.GetInt32(reader["U_Year"].ToString());
                    info.Address = reader["U_Address"].ToString();
                    info.MainProduct = reader["U_PType"].ToString();
                    info.MoneyType = reader["U_MoneyType"].ToString();

                    info.AreaId = Core.MyConvert.GetInt32(reader["Area_ID"].ToString());
                    info.RegAreaId = Core.MyConvert.GetInt32(reader["AC_ID"].ToString());

                    info.AreaInfo = new Area().GetItem(info.AreaId);
                    info.RegAreaInfo = new Area().GetItem(info.RegAreaId);

                    info.IM = reader["IM"].ToString();
                    info.TradeIds = Core.Utils.RemoveComma(reader["tradeIds"].ToString());

                    info.Email = reader["Email"].ToString();
                    info.Description = reader["Description"].ToString();
                    info.CreateDate = Core.MyConvert.GetDateTime(reader["CreateDate"].ToString());
                    info.State = Core.MyConvert.GetInt32(reader["State"].ToString());
                    info.PassTime = Core.MyConvert.GetDateTime(reader["PassTime"].ToString());
                    info.ManagerId = Core.MyConvert.GetInt32(reader["ManagerId"].ToString());
                    info.IsBoundEmail = Core.MyConvert.GetBoolean(reader["IsBoundEmail"].ToString());
                    info.IsBoundMobile = Core.MyConvert.GetBoolean(reader["IsBoundMobile"].ToString());

                    info.IsReal = Core.MyConvert.GetBoolean(reader["IsReal"].ToString()); ;
                    info.Point = Core.MyConvert.GetInt32(reader["Point"].ToString());
                    info.GoodTimes = Core.MyConvert.GetInt32(reader["GoodTimes"].ToString());
                    info.MidTimes = Core.MyConvert.GetInt32(reader["MidTimes"].ToString());
                    info.BadTimes = Core.MyConvert.GetInt32(reader["BadTimes"].ToString());
                }
            }
            return info;
        }
示例#2
0
        protected void btnReg_Click(object sender, EventArgs e)
        {
            string loginName = string.Empty;
            string companyName = string.Empty;
            string pwd = string.Empty;
            int areaId = Core.MyConvert.GetInt32(this.city.Value.Trim());
            string email = string.Empty;
            string chief = string.Empty;
            int selIndex = this.MultiView1.ActiveViewIndex;
            Model.UserType userType = XYECOM.Model.UserType.CreditorEnterprise;
            loginName = txtUserName.Text.Trim();
            pwd = txtPwd1.Text.Trim();
            email = txtEmail.Text.Trim();

            switch (selIndex + 1)
            {
                case 1:

                    userType = XYECOM.Model.UserType.CreditorEnterprise;
                    companyName = this.txtCompanyName.Text.Trim();

                    chief = this.txtCompanyChief.Text.Trim();
                    break;
                case 2:
                    userType = XYECOM.Model.UserType.CreditorIndividual;
                    break;
                case 3:
                    userType = XYECOM.Model.UserType.Layer;
                    companyName = this.txtLawyerCompanyName.Text.Trim();
                    break;
                case 4:
                    userType = XYECOM.Model.UserType.NotLayer;
                    break;
            }

            Model.UserRegInfo regInfo = new XYECOM.Model.UserRegInfo();

            regInfo.LoginName = loginName;
            regInfo.Password = Core.SecurityUtil.MD5(pwd, XYECOM.Configuration.Security.Instance.Md5value);
            regInfo.Email = email;
            regInfo.RegDate = DateTime.Now;
            regInfo.UserType = (int)userType;
            regInfo.AreaId = areaId;
            regInfo.Answer = string.Empty;
            regInfo.Question = string.Empty;
            regInfo.IsPrimary = true;

            XYECOM.Model.UserInfo userInfo = new XYECOM.Model.UserInfo();
            userInfo.Email = email;
            userInfo.AreaId = areaId;
            userInfo.Name = companyName;
            userInfo.LinkMan = chief;

            userInfo.Address = string.Empty;
            userInfo.Address = string.Empty;
            userInfo.BuyPro = string.Empty;
            userInfo.License = string.Empty;
            userInfo.Character = string.Empty;
            userInfo.EmployeeTotal = string.Empty;
            userInfo.HomePage = string.Empty;
            userInfo.Synopsis = string.Empty;
            userInfo.Postcode = string.Empty;
            //userInfo.RegAreaId
            userInfo.Mobile = string.Empty;
            //userInfo.UserTypeId
            userInfo.Sex = true;
            userInfo.Section = string.Empty;
            userInfo.Post = string.Empty;
            userInfo.SupplyOrBuy = 3;
            userInfo.SupplyPro = string.Empty;
            userInfo.BuyPro = string.Empty;
            userInfo.Mode = string.Empty;
            userInfo.RegisteredCapital = decimal.Zero;
            userInfo.RegYear = 1;
            userInfo.Address = string.Empty;
            userInfo.MainProduct = string.Empty;
            userInfo.MoneyType = string.Empty;
            userInfo.IM = string.Empty;
            userInfo.Telephone = string.Empty;
            userInfo.Fax = string.Empty;
            userInfo.TradeIds = string.Empty;

            long userId = 0;

            string message = string.Empty;

            Model.ResisterUserReturnValue value = new Business.UserReg().Register(regInfo, userInfo, pwd, out userId);

            if (value == XYECOM.Model.ResisterUserReturnValue.UserNameExists)
                message = "注册失败,用户名已经被占用";

            if (value == XYECOM.Model.ResisterUserReturnValue.EmailExists)
                message = "注册失败,邮箱已经被占用";

            if (value == XYECOM.Model.ResisterUserReturnValue.Failed)
                message = "注册失败,异常错误,请检查各项数据";

            if (value == XYECOM.Model.ResisterUserReturnValue.ForbidName)
                message = "注册失败,此用户名禁止注册";

            if (!string.IsNullOrEmpty(message))
            {
                GotoMsgBoxPageForDynamicPage(message, 5, "/register.aspx");
                return;
            }

            string gotoUrl = "";

            if (userType == XYECOM.Model.UserType.CreditorEnterprise || userType == Model.UserType.CreditorIndividual)
            {
                gotoUrl = "/Creditor/index.aspx";
            }
            else
            {
                gotoUrl = "Server/index.aspx";
            }

            message = "注册成功,系统将自动进入会员中心...";

            GotoMsgBoxPageForDynamicPage(message, 1, gotoUrl);
        }
示例#3
0
文件: buy.cs 项目: ZhaiQuan/Zhai
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            seo.Robots = true;

            if (!pageinfo.IsPost)
            {
                //���ɵĶ���ֵ�����ڿ���ɾ��
                es = offerinfo;
                ed = machininginfo;
                ibi = investmentinfo;
                esi = serviceinfo;

                string infoFlag = XYECOM.Core.XYRequest.GetQueryString("flag");
                int lngInfoId = XYECOM.Core.MyConvert.GetInt32(XYECOM.Core.XYRequest.GetQueryString("infoid"));

                if (lngInfoId <= 0 || infoFlag == "")
                {
                    ShowErrorMsg("��Ϣ�����ڻ��ѱ�ɾ����");
                    return;
                }

                XYECOM.Configuration.SEOInfo seoInfo = null;

                module = moduleConfig.GetItem(infoFlag);

                //����������
                string descTableName = "";

                //����������࣬��Ҫ����SEO
                string allClassName = "";

                //��Ϣ����Id
                long sortId =0;

                //����Ϣ
                if (module.EName.Equals("offer") || module.PEName.Equals("offer"))
                {
                    pageinfo.ModuleFlag = "offer";
                    linkmodule = "buyoffer";
                    descTableName = "i_Supply";

                    offerinfo = new XYECOM.Business.Supply().GetItem(lngInfoId);

                    if (offerinfo == null || offerinfo.AuditingState != XYECOM.Model.AuditingState.Passed)
                    {
                        ShowErrorMsg("��Ϣ�����ڻ�δͨ����ˣ�");
                        return;
                    }

                    //���˹ؼ���
                    FilterKeyWord(offerinfo);

                    sortId = offerinfo.SortID;

                    curInfoUserId = offerinfo.UserID;

                    seoInfo = SEO.GetInfoPageSEO(module.EName);

                    if (seoInfo != null)
                    {
                        seo.Title = seoInfo.Title.Replace("{keyword}", offerinfo.Title);
                        seo.Description = seoInfo.Description.Replace("{keyword}", offerinfo.Title);
                        seo.Keywords = seoInfo.Keywords.Replace("{keyword}", offerinfo.SortName);

                        if (seoInfo.IsMatch)
                        {
                            allClassName = GetAllClassNameForSEO(infoFlag, offerinfo.SortID);

                            seo.Title += "_" + allClassName;
                            seo.Description += "," + allClassName;
                            seo.Keywords += "," + allClassName.Replace("_",",");
                        }
                    }
                    if (seo.Title.Equals("")){ seo.Title = offerinfo.Title; }

                    titleinfo = "�Ҷ�����" + config.WebName + "�����ġ�" + offerinfo.Title + "���ܸ���Ȥ";

                    fieldbody = GetFiledInnerHTML(offerinfo.SortID, module.EName, offerinfo.FieldID);

                }

                //�ӹ���Ϣ
                if (module.EName.Equals("venture") || module.PEName.Equals("venture"))
                {
                    pageinfo.ModuleFlag = "venture";
                    linkmodule = "buymachining";
                    descTableName = "i_Demand";

                    machininginfo = new XYECOM.Business.Demand().GetItem(lngInfoId);

                    if (machininginfo == null || machininginfo.AuditingState != XYECOM.Model.AuditingState.Passed)
                    {
                        ShowErrorMsg("��Ϣ�����ڻ�δͨ����ˣ�");
                        return;
                    }

                    //���˹ؼ���
                    FilterKeyWord(machininginfo);

                    sortId = machininginfo.TypeId;

                    curInfoUserId = machininginfo.UserID;

                    seoInfo = SEO.GetInfoPageSEO(module.EName);

                    if (seoInfo != null)
                    {
                        seo.Title = seoInfo.Title.Replace("{keyword}", machininginfo.Title);
                        seo.Description = seoInfo.Description.Replace("{keyword}", machininginfo.Title);
                        seo.Keywords = seoInfo.Keywords.Replace("{keyword}", machininginfo.SortName);

                        if (seoInfo.IsMatch)
                        {
                            allClassName = GetAllClassNameForSEO(infoFlag, machininginfo.TypeId);

                            seo.Title += "_" + allClassName;
                            seo.Description += "," + allClassName;
                            seo.Keywords += "," + allClassName.Replace("_",",");
                        }
                    }

                    if (seo.Title.Equals("")){seo.Title = machininginfo.Title;}

                    titleinfo = "�Ҷ�����" + config.WebName + "�����ġ�" + machininginfo.Title + "���ܸ���Ȥ";

                    fieldbody = GetFiledInnerHTML(machininginfo.TypeId, module.EName, machininginfo.FieldID);

                }

                //������Ϣ
                if (module.EName.Equals("investment") || module.PEName.Equals("investment"))
                {
                    pageinfo.ModuleFlag = "investment";
                    linkmodule = "buyinvestment";
                    descTableName ="i_InviteBusinessmanInfo";

                    investmentinfo = new XYECOM.Business.InviteBusinessmanInfo().GetItem(lngInfoId);

                    if(investmentinfo ==null || investmentinfo.AuditingState != XYECOM.Model.AuditingState.Passed)
                    {
                        ShowErrorMsg("��Ϣ�����ڻ�δͨ����ˣ�");
                        return;
                    }

                    //���˹ؼ���
                    FilterKeyWord(investmentinfo);

                    sortId = investmentinfo.SortID;

                    curInfoUserId = investmentinfo.UserID;

                    seoInfo = SEO.GetInfoPageSEO(module.EName);

                    if (seoInfo != null)
                    {
                        seo.Title = seoInfo.Title.Replace("{keyword}", investmentinfo.Title);
                        seo.Description = seoInfo.Description.Replace("{keyword}", investmentinfo.Title);
                        seo.Keywords = seoInfo.Keywords.Replace("{keyword}", investmentinfo.SortName);

                        if (seoInfo.IsMatch)
                        {
                            allClassName = GetAllClassNameForSEO(infoFlag, investmentinfo.SortID);

                            seo.Title += "_" + allClassName;
                            seo.Description += "," + allClassName;
                            seo.Keywords += "," + allClassName.Replace("_",",");
                        }
                    }

                    if (seo.Title.Equals("")){seo.Title = investmentinfo.Title;}

                    titleinfo = "�Ҷ�����" + config.WebName + "�����ġ�" + investmentinfo.Title + "���ܸ���Ȥ";

                    fieldbody = GetFiledInnerHTML(investmentinfo.SortID, module.EName, investmentinfo.FieldID);
                }

                //������Ϣ
                if (module.EName.Equals("service") || module.PEName.Equals("service"))
                {
                    pageinfo.ModuleFlag = "service";
                    linkmodule = "buyservice";
                    descTableName ="i_Surrogate";

                    serviceinfo = new XYECOM.Business.ServiceInfo().GetItem(lngInfoId);

                    if (serviceinfo == null || serviceinfo.AuditingState != XYECOM.Model.AuditingState.Passed)
                    {
                        ShowErrorMsg("��Ϣ�����ڻ�δͨ����ˣ�");
                        return;
                    }

                    //���˹ؼ���
                    FilterKeyWord(serviceinfo);

                    sortId = serviceinfo.SortID;

                    curInfoUserId = serviceinfo.UserID;

                    seoInfo = SEO.GetInfoPageSEO(module.EName);

                    if (seoInfo != null)
                    {
                        seo.Title = seoInfo.Title.Replace("{keyword}", serviceinfo.Title);
                        seo.Description = seoInfo.Description.Replace("{keyword}", serviceinfo.Title);
                        seo.Keywords = seoInfo.Keywords.Replace("{keyword}", serviceinfo.SortName);

                        if (seoInfo.IsMatch)
                        {
                            allClassName = GetAllClassNameForSEO(infoFlag, serviceinfo.SortID);

                            seo.Title += "_" + allClassName;
                            seo.Description += "," + allClassName;
                            seo.Keywords += "," + allClassName.Replace("_",",");
                        }
                    }

                    if (seo.Title.Equals("")){seo.Title = serviceinfo.Title;}

                    titleinfo = "�Ҷ�����" + config.WebName + "�����ġ�" + serviceinfo.Title + "���ܸ���Ȥ";

                    fieldbody = GetFiledInnerHTML(serviceinfo.SortID, module.EName, serviceinfo.FieldID);
                }

                UpdateNavigation(module.EName, sortId);

                offerinfo.SellBuy = machininginfo.SellBuy = investmentinfo.SellBuy = serviceinfo.SellBuy = "buy";

                if (lngInfoId > 0)
                {
                    dtimg = XYECOM.Core.Function.GetDataTable(" where DescTabID=" + lngInfoId + " and DescTabName='"+descTableName+"' and At_Index > 1 ", " ", "XYV_Attachment");
                }

                if (SEO.IsAppendWebName)
                {
                    seo.Title = seo.Title + "_" + webInfo.WebName;
                    seo.Description = seo.Description + "," + webInfo.WebName;
                    seo.Keywords = seo.Keywords + "," + webInfo.WebName;
                }

                infoid = lngInfoId +"";

                dtm = GetExpressMessage(module.EName);

                //�û���Ϣ
                if (curInfoUserId > 0)
                {
                    XYECOM.Business.UserInfo ui = new XYECOM.Business.UserInfo();
                    eui = ui.GetItem(Convert.ToInt64(curInfoUserId));

                    try
                    {
                        areaname = eui.AreaInfo.FullNameAll;
                    }
                    catch { }

                    XYECOM.Business.UserReg ur = new XYECOM.Business.UserReg();
                    eu = ur.GetItem(Convert.ToInt64(curInfoUserId));
                    uinformation = eu.InFormation * 2;
                    yearnum = DateTime.Compare(DateTime.Now, eu.RegDate).ToString();
                }
            }
        }
示例#4
0
文件: UserReg.cs 项目: xyecom/AMS
        /// <summary>
        /// ע�����û�
        /// </summary>
        /// <param name="userName">�û���¼��</param>
        /// <param name="password">�û�����</param>
        /// <param name="question">�һ���������</param>
        /// <param name="answer">�һ������</param>
        /// <param name="email">����</param>
        /// <param name="userType">�û�����</param>
        /// <param name="unitName">��ҵ���ƣ����Ϊ���ˣ�����Ϊ�գ�</param>
        /// <param name="linkman">��ϵ��</param>
        /// <param name="telephone">�̶��绰</param>
        /// <param name="mobile">�ֻ�</param>
        /// <param name="userId">ע��ɹ������û���ID</param>
        /// <returns></returns>
        public Model.ResisterUserReturnValue Register(string userName,
            string password,
            string question,
            string answer,
            string email,
            Model.UserType userType,
            string unitName,
            string linkman,
            string telephone,
            string mobile,
            out long userId)
        {
            userId = 0;

            #region �û�ע����Ϣ
            XYECOM.Model.UserRegInfo userRegInfo = new XYECOM.Model.UserRegInfo();

            userRegInfo.LoginName = userName;

            userRegInfo.Password = XYECOM.Core.SecurityUtil.MD5(password, XYECOM.Configuration.Security.Instance.Md5value);
            userRegInfo.Answer = answer;
            userRegInfo.Question = question;
            userRegInfo.RegDate = DateTime.Now;
            userRegInfo.Email = email;

            #endregion

            XYECOM.Model.UserInfo userInfo = null;

            #region �����ҵ�û���Ϣ
            userInfo = new XYECOM.Model.UserInfo();
            userInfo.Address = "";
            userInfo.Character = "";
            userInfo.HomePage = "";
            userInfo.License = "";
            userInfo.LinkMan = linkman;
            userInfo.Mobile = mobile;
            userInfo.Name = unitName;
            userInfo.EmployeeTotal = "";
            userInfo.Postcode = "";
            userInfo.Synopsis = "";
            userInfo.UserTypeId = 0;
            userInfo.BuyPro = "";
            userInfo.Post = "";
            userInfo.Section = "";
            userInfo.SupplyPro = "";
            userInfo.SupplyOrBuy = 0;
            userInfo.Mode = "";
            userInfo.RegisteredCapital = 0;
            userInfo.RegYear = 0;
            userInfo.Address = "";
            userInfo.Mode = "";
            userInfo.MainProduct = "";
            userInfo.MoneyType = "";
            userInfo.IM = "";
            userInfo.Telephone = telephone;
            userInfo.Fax = "";
            userInfo.TradeIds = "";
            #endregion

            return Register(userRegInfo, userInfo, password, out userId);
        }
示例#5
0
        /// <summary>
        /// �Ƿ���Բ鿴��ϵ��ʽ
        /// </summary>
        /// <param name="infoUserId">��Ϣ������Id</param>
        /// <param name="loginUserId">��ǰ��¼�û�Id</param>
        /// <param name="item">��ϵ��ʽ�����������ҳ�棩</param>
        /// <returns>�Ƿ���Բ鿴��ϵ��ʽ</returns>
        public static Model.ContactsControlRetrunValue IsViewContact(long infoUserId, long loginUserId, XYECOM.Model.ContactsControlItem item)
        {
            if (infoUserId <= 0) return XYECOM.Model.ContactsControlRetrunValue.CanNotSee;

            if (item == XYECOM.Model.ContactsControlItem.Null) return XYECOM.Model.ContactsControlRetrunValue.CanNotSee;

            if (infoUserId == loginUserId) return XYECOM.Model.ContactsControlRetrunValue.CanSee;

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

            XYECOM.Configuration.WebInfo webInfo = XYECOM.Configuration.WebInfo.Instance;

            //��ǰ��Ϣ�����ߵ�ע����Ϣ
            XYECOM.Model.UserRegInfo infoUserRegInfo = userRegBLL.GetItem(infoUserId);
            //��ǰ��¼�û���ע����Ϣ
            XYECOM.Model.UserRegInfo curLoginUserRegInfo = null;

            Model.ContactsControlRetrunValue returnValue = XYECOM.Model.ContactsControlRetrunValue.Null;

            bool isLogin = false;

            if (loginUserId > 0)
            {
                //��ǰ��¼�û���ע����Ϣ
                curLoginUserRegInfo = userRegBLL.GetItem(loginUserId);

                if (curLoginUserRegInfo != null) isLogin = true;
            }

            if (!isLogin)
            {
                if (webInfo.IsGuestLookLinkInfo)
                    returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;//���Բ鿴
                else
                    returnValue = XYECOM.Model.ContactsControlRetrunValue.CanNotSee;//�����Բ鿴
            }

            //��ǰ��Ϣ�����߲�Ϊ���ҵ�ǰ��¼�û�Ϊ��ҵ��Աʱ
            if (infoUserRegInfo != null)
            {
                //�����˶��ܲ鿴
                switch (item)
                {
                    case XYECOM.Model.ContactsControlItem.SellOffer:
                        //��Ӧ
                        if (infoUserRegInfo.GradePopedomInfo.SeeBySellOffer) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                        break;
                    case XYECOM.Model.ContactsControlItem.BuyOffer:
                        //��
                        if (infoUserRegInfo.GradePopedomInfo.SeeByBuyOffer) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                        break;
                    case XYECOM.Model.ContactsControlItem.SellMachining:
                        //�ṩ�ӹ�
                        if (infoUserRegInfo.GradePopedomInfo.SeeBySellMachining) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                        break;
                    case XYECOM.Model.ContactsControlItem.BuyMaching:
                        //Ѱ��ӹ�
                        if (infoUserRegInfo.GradePopedomInfo.SeeByBuyMachining) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                        break;
                    case XYECOM.Model.ContactsControlItem.SellInvestment:
                        //����
                        if (infoUserRegInfo.GradePopedomInfo.SeeBySellBusiness) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                        break;
                    case XYECOM.Model.ContactsControlItem.BuyInvestment:
                        //����
                        if (infoUserRegInfo.GradePopedomInfo.SeeByBuyBusiness) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                        break;
                    case XYECOM.Model.ContactsControlItem.SellService:
                        //�ṩ����
                        if (infoUserRegInfo.GradePopedomInfo.SeeBySellService) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                        break;
                    case XYECOM.Model.ContactsControlItem.BuyService:
                        // Ѱ�����
                        if (infoUserRegInfo.GradePopedomInfo.SeeByBuyService) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                        break;
                    case XYECOM.Model.ContactsControlItem.Brand:
                        // Ʒ��
                        if (infoUserRegInfo.GradePopedomInfo.SeeByBrand) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                        break;
                    case XYECOM.Model.ContactsControlItem.Company:
                        // ��ҵ
                        if (infoUserRegInfo.GradePopedomInfo.SeeByCompany) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                        break;
                    default:
                        returnValue = XYECOM.Model.ContactsControlRetrunValue.CanNotSee;
                        break;
                }
            }

            //�����ǰ�û��ѵ�¼��Ϊ���˻�Աʱ�����������ϵ��ʽ
            if (curLoginUserRegInfo != null && !curLoginUserRegInfo.Type) returnValue = XYECOM.Model.ContactsControlRetrunValue.PopedomTooLow;

            //��ǰ�û��ѵ�¼��Ϊ��ҵ��Ա������֮ǰ�жϽ��Ϊ���ܲ鿴��ϵ��ʽʱ�����ж�
            if (isLogin && curLoginUserRegInfo.Type && returnValue != XYECOM.Model.ContactsControlRetrunValue.CanSee)
            {
                if (curLoginUserRegInfo != null)
                {
                    //loginuid = curLoginUserRegInfo.U_ID;
                    //if (id == 0) uid = curLoginUserRegInfo.U_ID;

                    returnValue = XYECOM.Model.ContactsControlRetrunValue.PopedomTooLow;

                    switch (item)
                    {
                        case XYECOM.Model.ContactsControlItem.SellOffer:
                            //��Ӧ
                            if(curLoginUserRegInfo.GradePopedomInfo.UGP_IsSupplyLinkMathod) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                            break;
                        case XYECOM.Model.ContactsControlItem.BuyOffer:
                            //��
                            if (curLoginUserRegInfo.GradePopedomInfo.UGP_IsBuyLinkMathod) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                            break;
                        case XYECOM.Model.ContactsControlItem.SellMachining:
                            //�ṩ�ӹ�
                            if (curLoginUserRegInfo.GradePopedomInfo.UGP_IsSupplyMachiningLinkMathod) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                            break;
                        case XYECOM.Model.ContactsControlItem.BuyMaching:
                            //Ѱ��ӹ�
                            if (curLoginUserRegInfo.GradePopedomInfo.UGP_IsBuyMachiningLinkMathod) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                            break;
                        case XYECOM.Model.ContactsControlItem.SellInvestment:
                            //����
                            if (curLoginUserRegInfo.GradePopedomInfo.UGP_IsBuinessLinkMathod) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                            break;
                        case XYECOM.Model.ContactsControlItem.BuyInvestment:
                            //����
                            if (curLoginUserRegInfo.GradePopedomInfo.UGP_IsSurrogateLinkMathod) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                            break;
                        case XYECOM.Model.ContactsControlItem.SellService:
                            //�ṩ����
                            if (curLoginUserRegInfo.GradePopedomInfo.UGP_IsSupplyServerLinkMathod) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                            break;
                        case XYECOM.Model.ContactsControlItem.BuyService:
                            // Ѱ�����
                            if (curLoginUserRegInfo.GradePopedomInfo.UGP_IsBuyServerLinkMathod) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                            break;
                        case XYECOM.Model.ContactsControlItem.Brand:
                            // Ʒ��
                            if (curLoginUserRegInfo.GradePopedomInfo.UGP_IsBrandLinkMathod) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                            break;
                        case XYECOM.Model.ContactsControlItem.Job:
                            // �˲�
                            if (curLoginUserRegInfo.GradePopedomInfo.UGP_IsJobLinkMathod) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                            break;
                        case XYECOM.Model.ContactsControlItem.Company:
                            // ��ҵ
                            if (curLoginUserRegInfo.GradePopedomInfo.UGP_IsCompanyLinkMathod) returnValue = XYECOM.Model.ContactsControlRetrunValue.CanSee;
                            break;
                    }
                }
            }

            //�жϿ��Բ鿴������ҵ����
            if (isLogin
                && returnValue == XYECOM.Model.ContactsControlRetrunValue.CanSee
                && curLoginUserRegInfo.Type
                && !curLoginUserRegInfo.GradePopedomInfo.SeeContactsNum.Equals(0))
            {
                if (returnValue == XYECOM.Model.ContactsControlRetrunValue.CanSee)
                {
                    XYECOM.Business.UserData userdataBLL = new XYECOM.Business.UserData();
                    XYECOM.Model.UserData userdatainfo = new XYECOM.Model.UserData();
                    userdatainfo = userdataBLL.GetItem(loginUserId);
                    if (userdatainfo == null)
                    {
                        XYECOM.Model.UserData udinfo = new XYECOM.Model.UserData();
                        udinfo.Uid = loginUserId;
                        udinfo.Companyids = infoUserId + ",";
                        userdataBLL.Insert(udinfo);
                    }
                    else
                    {
                        String[] ids = userdatainfo.Companyids.Split(',');
                        String isHave = "";
                        for (int k = 0; k < (ids.Length - 1); k++)
                        {
                            if (ids[k].Equals(infoUserId.ToString()))
                            {
                                isHave = "1";
                                break;
                            }
                        }
                        if (!isHave.Equals("1"))
                        {
                            XYECOM.Business.UserInfo infoBLL = new XYECOM.Business.UserInfo();
                            XYECOM.Model.UserInfo uinfo = new XYECOM.Model.UserInfo();
                            uinfo = infoBLL.GetItem(Convert.ToInt64(loginUserId));
                            int num = XYECOM.Business.UserGradePopedom.SeeContactsNum(uinfo.RegInfo.GradeId);
                            if ((userdatainfo.Companyids.Split(',').Length) <= num)
                            {
                                userdatainfo.Uid = loginUserId;
                                userdatainfo.Companyids = userdatainfo.Companyids + infoUserId + ",";
                                userdataBLL.Insert(userdatainfo);
                            }
                            else
                            {
                                returnValue = XYECOM.Model.ContactsControlRetrunValue.PopedomTooLow;
                            }
                        }
                    }
                }
            }

            return returnValue;
        }
示例#6
0
文件: info.cs 项目: ZhaiQuan/Zhai
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            if (!pageinfo.IsPost)
            {
                //this.pageinfo.OnLoadEvents +="GetClickNum();";
                eb = brandinfo;
                moduleflag = "brand";
                linkmodule = "brand";

                pageinfo.ModuleFlag = moduleflag;

                if (XYECOM.Core.XYRequest.GetQueryString("infoid") != "")
                {
                    dtm = GetExpressMessage("brand");

                    seo.Robots = true;

                    infoid = XYECOM.Core.XYRequest.GetQueryString("infoid");
                    dtimg = XYECOM.Core.Function.GetDataTable(" where DescTabID=" + XYECOM.Core.XYRequest.GetQueryString("infoid") + " and DescTabName='u_Barnd' and At_Index > 1 ", " ", "XYV_Attachment");

                    XYECOM.Business.Brand b = new XYECOM.Business.Brand();

                    brandinfo = b.GetItem(Convert.ToInt64(XYECOM.Core.XYRequest.GetQueryString("infoid")));

                    if (brandinfo != null)
                    {
                        //���˹ؼ���
                        FilterKeyWord(brandinfo);

                        seo.Title = brandinfo.Title;

                        curInfoUserId = brandinfo.UserID;

                        UpdateNavigation("brand",brandinfo.SortID);

                        XYECOM.Configuration.SEOInfo seoInfo = SEO.GetInfoPageSEO("brand");

                        if (seoInfo!=null)
                        {
                            seo.Title = seoInfo.Title.Replace("{keyword}", brandinfo.Title);
                            seo.Description = seoInfo.Description.Replace("{keyword}", brandinfo.Title);
                            seo.Keywords = seoInfo.Keywords.Replace("{keyword}", brandinfo.Title);

                            if (seoInfo.IsMatch)
                            {
                                string allClassName = GetAllClassNameForSEO("brand", brandinfo.SortID);

                                seo.Title += "_" + allClassName;
                                seo.Description += "_" + allClassName;
                                seo.Keywords += "," + allClassName.Replace("_",",");
                            }
                        }

                        if (seo.Title.Equals("")) seo.Title = brandinfo.Title;

                        if (SEO.IsAppendWebName)
                        {
                            seo.Title = seo.Title + "_" + webInfo.WebName;
                            seo.Description = seo.Description + "," + webInfo.WebName;
                            seo.Keywords = seo.Keywords + "," + webInfo.WebName;
                        }

                        uids = brandinfo.UserID.ToString();
                        titleinfo = "�Ҷ�����" + config.WebName + "�����ġ�" + brandinfo.Title + "���ܸ���Ȥ";

                        eui = new XYECOM.Business.UserInfo().GetItem(brandinfo.UserID);
                        eu = new XYECOM.Business.UserReg().GetItem(brandinfo.UserID);
                    }
                }
                if (curInfoUserId > 0)
                {
                    string onLoadText = "GetClickNum('" + linkmodule + "','" + pageinfo.ModuleFlag + "','" + infoid + "','" + curInfoUserId + "')";
                    string attachScript = "GetClickNum('" + linkmodule + "','" + pageinfo.ModuleFlag + "','" + infoid + "','" + curInfoUserId + "','0')";

                    attachScript = attachScript.Replace("'", "\\'");

                    this.pageinfo.OnLoadEvents += onLoadText + ";attachScript('LoginUpdate','" + attachScript + "');";

                }
            }
        }