Ejemplo n.º 1
0
        protected void EBtnSave_Click(object sender, EventArgs e)
        {
            string tableName = DataSecurity.FilterBadChar(BasePage.RequestString("TableName", "PE_Client"));
            string fieldName = DataSecurity.FilterBadChar(BasePage.RequestString("FieldName", "Area"));
            ChoicesetValueInfoCollection dictionaryFieldValueByName = Choiceset.GetDictionaryFieldValueByName(tableName, fieldName);
            int    num  = 0;
            bool   flag = false;
            string text = "";
            string id   = "";
            string str5 = "";

            num = DataConverter.CLng(base.Request.Form["rad"]);
            bool          flag3   = false;
            StringBuilder builder = new StringBuilder();

            for (int i = 0; i < (dictionaryFieldValueByName.Count + 3); i++)
            {
                id   = "chk" + ((i + 1)).ToString();
                str5 = "txt" + ((i + 1)).ToString();
                flag = ((CheckBox)this.PlhFormFieldValue.FindControl(id)).Checked;
                text = ((TextBox)this.PlhFormFieldValue.FindControl(str5)).Text;
                if (i == num)
                {
                    flag3 = true;
                }
                if (!string.IsNullOrEmpty(text))
                {
                    builder.Append(text);
                    builder.Append("|");
                    if (flag)
                    {
                        builder.Append("1");
                    }
                    else
                    {
                        builder.Append("0");
                    }
                    builder.Append("|");
                    if (flag3)
                    {
                        builder.Append("1");
                    }
                    else
                    {
                        builder.Append("0");
                    }
                    builder.Append("$");
                }
                flag3 = false;
            }
            if (Choiceset.SetFieldValue(builder.ToString(), tableName, fieldName))
            {
                AdminPage.WriteSuccessMsg("已经成功保存您所设置的数据字典信息!", "Choiceset.aspx?TableName=" + tableName + "&FieldName=" + fieldName);
            }
            else
            {
                AdminPage.WriteErrMsg("数据字典信息保存失败!", "Choiceset.aspx?TableName=" + tableName + "&FieldName=" + fieldName);
            }
        }
Ejemplo n.º 2
0
        private void LoadContacter(UserInfo usersInfo)
        {
            ContacterInfo contacterByUserName = new ContacterInfo();

            contacterByUserName = Contacter.GetContacterByUserName(usersInfo.UserName);
            if (contacterByUserName != null)
            {
                this.LblTrueName.Text      = contacterByUserName.TrueName;
                this.LblTitle.Text         = contacterByUserName.Title;
                this.LblCountry.Text       = contacterByUserName.Country;
                this.LblProvince.Text      = contacterByUserName.Province;
                this.LblCity.Text          = contacterByUserName.City;
                this.LblZipCode.Text       = contacterByUserName.ZipCode;
                this.LblAddress.Text       = contacterByUserName.Address;
                this.LblOfficePhone.Text   = contacterByUserName.OfficePhone;
                this.LblHomephone.Text     = contacterByUserName.HomePhone;
                this.LblMobile.Text        = contacterByUserName.Mobile;
                this.LblFax.Text           = contacterByUserName.Fax;
                this.LblPHS.Text           = contacterByUserName.Phs;
                this.LblHomePage.Text      = contacterByUserName.Homepage;
                this.LnkEmail1.Text        = contacterByUserName.Email;
                this.LnkEmail1.NavigateUrl = "mailto:" + contacterByUserName.Email;
                this.LnkEmail1.Target      = "_blank";
                if (!string.IsNullOrEmpty(contacterByUserName.QQ))
                {
                    this.LblQQ.Text   = contacterByUserName.QQ;
                    this.LblQQ.EndTag = "<a target=blank href=tencent://message/?uin=" + contacterByUserName.QQ + "><img border=\"0\" SRC=\"" + SiteConfig.SiteInfo.VirtualPath + SiteConfig.SiteOption.ManageDir + "/images/qq.gif\" alt=\"点击这里发即时消息\"></a>";
                }
                this.LblMSN.Text   = contacterByUserName.Msn;
                this.LblICQ.Text   = contacterByUserName.Icq;
                this.LblYahoo.Text = contacterByUserName.Yahoo;
                this.LblUC.Text    = contacterByUserName.UC;
                this.LblAim.Text   = contacterByUserName.Aim;
                if (contacterByUserName.Birthday.HasValue)
                {
                    this.LblBirthday.Text = contacterByUserName.Birthday.Value.ToString("yyyy年MM月dd日");
                }
                this.LblIDCard.Text               = contacterByUserName.IdCard;
                this.LblNativePlace.Text          = contacterByUserName.NativePlace;
                this.LblNation.Text               = contacterByUserName.Nation;
                this.LblSex.Text                  = BasePage.EnumToHtml <UserSexType>(contacterByUserName.Sex);
                this.LblMarriage.Text             = BasePage.EnumToHtml <UserMarriageType>(contacterByUserName.Marriage);
                this.LblEducation.Text            = Choiceset.GetDictionaryFieldValueByName("PE_Contacter", "Education")[contacterByUserName.Education].DataTextField;
                this.LblGraduateFrom.Text         = contacterByUserName.GraduateFrom;
                this.LblInterestsOfLife.Text      = contacterByUserName.InterestsOfLife;
                this.LblInterestsOfCulture.Text   = contacterByUserName.InterestsOfCulture;
                this.LblInterestsOfAmusement.Text = contacterByUserName.InterestsOfAmusement;
                this.LblInterestsOfSport.Text     = contacterByUserName.InterestsOfSport;
                this.LblInterestsOfOther.Text     = contacterByUserName.InterestsOfOther;
                this.LblIncome.Text               = Choiceset.GetDictionaryFieldValueByName("PE_Contacter", "Income")[contacterByUserName.Income].DataTextField;
                this.LblCompany.Text              = contacterByUserName.Company;
                this.LblDepartment.Text           = contacterByUserName.Department;
                this.LblPosition.Text             = contacterByUserName.Position;
                this.LblOperation.Text            = contacterByUserName.Operation;
                this.LblCompanyAddress.Text       = contacterByUserName.CompanyAddress;
            }
        }
Ejemplo n.º 3
0
 public static string GetClientGroupName(int groupId)
 {
     foreach (ChoicesetValueInfo info in Choiceset.GetDictionaryFieldValueByName("PE_Client", "GroupID"))
     {
         if (info.DataValueField == groupId)
         {
             return(info.DataTextField.ToString());
         }
     }
     return("");
 }
Ejemplo n.º 4
0
 public static string GetFiledNameById(string filed, int filedId)
 {
     foreach (ChoicesetValueInfo info in Choiceset.GetDictionaryFieldValueByName("PE_ComplainItem", filed))
     {
         if (info.DataValueField == filedId)
         {
             return(info.DataTextField.ToString());
         }
     }
     return("");
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            string searchType = BaseUserControl.RequestString("SearchType");
            string keyword    = base.Request.Form["Author"];
            int    listType   = BaseUserControl.RequestInt32("ListType", 0);

            if (listType == 0)
            {
                listType = DataConverter.CLng(base.Request.Form["HdnListType"]);
            }
            this.RptAuthorType.DataSource = Choiceset.GetDictionaryFieldValueByName("PE_Author", "Type");
            this.RptAuthorType.DataBind();
            this.AuthorsBindData(listType, searchType, keyword);
        }
Ejemplo n.º 6
0
        private void BindAuthorType()
        {
            ChoicesetValueInfoCollection dictionaryFieldValueByName = Choiceset.GetDictionaryFieldValueByName("PE_Author", "Type");

            this.RadlAuthorType.DataSource     = dictionaryFieldValueByName;
            this.RadlAuthorType.DataTextField  = "DataTextField";
            this.RadlAuthorType.DataValueField = "DataTextField";
            this.RadlAuthorType.DataBind();
            foreach (ChoicesetValueInfo info in dictionaryFieldValueByName)
            {
                if (info.IsDefault)
                {
                    this.RadlAuthorType.SelectedValue = info.DataTextField;
                    break;
                }
            }
        }
Ejemplo n.º 7
0
        private void DropDownListDataBind(string fieldName, DropDownList dropClient)
        {
            ChoicesetValueInfo item = new ChoicesetValueInfo();

            item.DataTextField  = "";
            item.DataValueField = -1;
            item.IsDefault      = false;
            ChoicesetValueInfoCollection dictionaryFieldValueByName = Choiceset.GetDictionaryFieldValueByName("PE_Client", fieldName);

            dictionaryFieldValueByName.Insert(0, item);
            dropClient.DataSource     = dictionaryFieldValueByName;
            dropClient.DataTextField  = "DataTextField";
            dropClient.DataValueField = "DataValueField";
            dropClient.DataBind();
            foreach (ChoicesetValueInfo info2 in dictionaryFieldValueByName)
            {
                if (info2.IsDefault)
                {
                    dropClient.SelectedValue = info2.DataValueField.ToString();
                    break;
                }
            }
        }
Ejemplo n.º 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.BtnExchangePoint.Text = "兑换" + SiteConfig.UserConfig.PointName;
            this.BtnConsumeLog.Text    = SiteConfig.UserConfig.PointName + "明细";
            if (string.Compare(SiteConfig.SiteInfo.ProductEdition, "cms", true) == 0)
            {
                this.BtnShoppingCart.Visible  = false;
                this.BtnRemitValidate.Visible = false;
            }
            if (!base.IsPostBack)
            {
                UserInfo usersByUserName = Users.GetUsersByUserName(PEContext.Current.User.UserName);
                if (usersByUserName.IsNull)
                {
                    DynamicPage.WriteErrMsg("<li>没有" + PEContext.Current.User.UserName + "的用户信息,请检查此用户是否注册是否存在!</li>");
                }
                this.InitPrivew(usersByUserName);
                this.LblUserName.Text  = usersByUserName.UserName;
                this.LblEmail.Text     = usersByUserName.Email;
                this.LblGroupName.Text = UserGroups.GetGroupName(usersByUserName.GroupId);
                this.LblUserType.Text  = BasePage.EnumToHtml <UserType>(usersByUserName.UserType);
                this.LblBalance.Text   = usersByUserName.Balance.ToString("0.00");
                this.LblUserPoint.Text = usersByUserName.UserPoint.ToString();
                this.LblUserExp.Text   = usersByUserName.UserExp.ToString();
                this.m_ShowCompanyInfo = false;
                if (SiteConfig.ConfigInfo().UserConfig.EnableRegCompany)
                {
                    switch (usersByUserName.UserType)
                    {
                    case UserType.Persional:
                        this.BtnRegCompany.Visible  = true;
                        this.BtnDelCompany.Visible  = false;
                        this.BtnExitCompany.Visible = false;
                        break;

                    case UserType.Creator:
                        this.m_ShowCompanyInfo = true;
                        this.LblAuditingCompanyMemberCountTitle.Visible = true;
                        this.LblAuditingCompanyMemberCount.Visible      = true;
                        this.LblAuditingCompanyMemberCount.Text         = Users.GetAuditingCompanyMemberCount(usersByUserName.CompanyId).ToString() + " 名";
                        if (usersByUserName.ClientId == 0)
                        {
                            this.BtnDelCompany.Visible = true;
                        }
                        break;

                    case UserType.Administrators:
                        this.m_ShowCompanyInfo      = true;
                        this.BtnExitCompany.Visible = true;
                        break;

                    case UserType.CommonLeaguer:
                        this.m_ShowCompanyInfo      = true;
                        this.BtnExitCompany.Visible = true;
                        break;

                    case UserType.AuditingLeaguer:
                        this.BtnExitCompany.Visible = true;
                        break;
                    }
                }
                if (this.m_ShowCompanyInfo)
                {
                    this.CompanyInfo1.CompanyId             = usersByUserName.CompanyId;
                    this.CompanyMemberManage1.CompanyId     = usersByUserName.CompanyId;
                    this.CompanyMemberManage1.UserType      = usersByUserName.UserType;
                    this.CompanyMemberManage1.UserId        = usersByUserName.UserId;
                    this.CompanyMemberManage1.ReturnAddress = "Default.aspx";
                }
                this.LblValidNum.Text      = Users.GetValidNum(usersByUserName.EndTime);
                this.LblUnsignedItems.Text = SignInLog.GetNotSignInContentCountByUserName(PEContext.Current.User.UserName).ToString();
                this.LblUnreadMsg.Text     = EasyOne.Accessories.Message.UnreadMessageCount(PEContext.Current.User.UserName).ToString();
                if (usersByUserName.IsInheritGroupRole)
                {
                    this.LblSpecialPermission.Text = "继承会员组权限";
                }
                else
                {
                    this.LblSpecialPermission.Text = "单独权限设置";
                }
                this.LblRegTime.Text  = usersByUserName.RegTime.ToString("yyyy年MM月dd日");
                this.LblJoinTime.Text = usersByUserName.JoinTime.ToString("yyyy年MM月dd日");
                if (!string.IsNullOrEmpty(usersByUserName.LastLogOnTime.ToString()))
                {
                    this.LblLastLoginTime.Text = usersByUserName.LastLogOnTime.Value.ToString("yyyy年MM月dd日 HH时mm分ss秒");
                }
                this.LblLastLoginIP.Text = usersByUserName.LastLogOnIP;
                ContacterInfo contacterByUserName = new ContacterInfo();
                contacterByUserName = Contacter.GetContacterByUserName(usersByUserName.UserName);
                if (contacterByUserName != null)
                {
                    this.LblTrueName.Text    = contacterByUserName.TrueName;
                    this.LblTitle.Text       = contacterByUserName.Title;
                    this.LblCountry.Text     = contacterByUserName.Country;
                    this.LblProvince.Text    = contacterByUserName.Province;
                    this.LblCity.Text        = contacterByUserName.City;
                    this.LblZipCode.Text     = contacterByUserName.ZipCode;
                    this.LblAddress.Text     = contacterByUserName.Address;
                    this.LblOfficePhone.Text = contacterByUserName.OfficePhone;
                    this.LblHomephone.Text   = contacterByUserName.HomePhone;
                    this.LblMobile.Text      = contacterByUserName.Mobile;
                    this.LblFax.Text         = contacterByUserName.Fax;
                    this.LblPHS.Text         = contacterByUserName.Phs;
                    this.LblHomePage.Text    = contacterByUserName.Homepage;
                    this.LbllEmail.Text      = contacterByUserName.Email;
                    this.LblQQ.Text          = contacterByUserName.QQ;
                    this.LblMSN.Text         = contacterByUserName.Msn;
                    this.LblICQ.Text         = contacterByUserName.Icq;
                    this.LblYahoo.Text       = contacterByUserName.Yahoo;
                    this.LblUC.Text          = contacterByUserName.UC;
                    this.LblAim.Text         = contacterByUserName.Aim;
                    if (contacterByUserName.Birthday.HasValue)
                    {
                        this.LblBirthday.Text = contacterByUserName.Birthday.Value.ToString("yyyy年MM月dd日");
                    }
                    this.LblIDCard.Text               = contacterByUserName.IdCard;
                    this.LblNativePlace.Text          = contacterByUserName.NativePlace;
                    this.LblNation.Text               = contacterByUserName.Nation;
                    this.LblSex.Text                  = BasePage.EnumToHtml <UserSexType>(contacterByUserName.Sex);
                    this.LblMarriage.Text             = BasePage.EnumToHtml <UserMarriageType>(contacterByUserName.Marriage);
                    this.LblEducation.Text            = Choiceset.GetDictionaryFieldValueByName("PE_Contacter", "Education")[contacterByUserName.Education].DataTextField;
                    this.LblGraduateFrom.Text         = contacterByUserName.GraduateFrom;
                    this.LblInterestsOfLife.Text      = contacterByUserName.InterestsOfLife;
                    this.LblInterestsOfCulture.Text   = contacterByUserName.InterestsOfCulture;
                    this.LblInterestsOfAmusement.Text = contacterByUserName.InterestsOfAmusement;
                    this.LblInterestsOfSport.Text     = contacterByUserName.InterestsOfSport;
                    this.LblInterestsOfOther.Text     = contacterByUserName.InterestsOfOther;
                    this.LblIncome.Text               = Choiceset.GetDictionaryFieldValueByName("PE_Contacter", "Income")[contacterByUserName.Income].DataTextField;
                    this.LblCompany.Text              = contacterByUserName.Company;
                    this.LblDepartment.Text           = contacterByUserName.Department;
                    this.LblPosition.Text             = contacterByUserName.Position;
                    this.LblOperation.Text            = contacterByUserName.Operation;
                    this.LblCompanyAddress.Text       = contacterByUserName.CompanyAddress;
                }
                if (!SiteConfig.SiteOption.EnablePointMoneyExp)
                {
                    this.BalancePoint.Style.Add("display", "none");
                    this.ExpValid.Style.Add("display", "none");
                    this.BtnExchangePoint.Visible     = false;
                    this.BtnExchangeValidDate.Visible = false;
                    this.BtnRecharge.Visible          = false;
                    this.BtnRechargeLog.Visible       = false;
                    this.BtnConsumeLog.Visible        = false;
                    this.BtnBankroll.Visible          = false;
                }
                this.BtnPayOnline.Attributes.Add("onclick", "this.form.target='_newName'");
                if (SiteConfig.SiteInfo.ProductEdition.ToLower() != "eshop")
                {
                    this.BtnOrder.Visible = false;
                }
            }
            if (EasyOne.Accessories.Message.UnreadMessageCount(PEContext.Current.User.UserName) > 0)
            {
                string script = "<script language='javascript'>window.open('../User/Message/PopupMessageRead.aspx?Unread=1&MessageID=" + EasyOne.Accessories.Message.GetUnreadMessageFirstId(PEContext.Current.User.UserName).ToString() + "', 'newmessage', 'width=600,height=400,scrollbars=yes,resizable=yes')</script>";
                if (!this.Page.ClientScript.IsClientScriptBlockRegistered(typeof(string), "OpenWindow"))
                {
                    this.Page.ClientScript.RegisterClientScriptBlock(typeof(string), "OpenWindow", script);
                }
            }
        }
Ejemplo n.º 9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.RptAuthorTypeList.DataSource = Choiceset.GetDictionaryFieldValueByName("PE_Author", "Type");
     this.RptAuthorTypeList.DataBind();
 }