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);
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack && (this.DropIncome.Items.Count == 0))
     {
         Choiceset.DropDownListDataBind("PE_Contacter", "InCome", this.DropIncome);
         Choiceset.DropDownListDataBind("PE_Contacter", "Education", this.DropEducation);
     }
 }
        protected override void OnInit(EventArgs e)
        {
            string tableName = DataSecurity.FilterBadChar(BasePage.RequestString("TableName", "PE_Client"));
            string fieldName = DataSecurity.FilterBadChar(BasePage.RequestString("FieldName", "Area"));

            this.choicesetInfo = Choiceset.GetChoicesetInfoByFieldAndTableName(tableName, fieldName);
            this.CreateFormFieldValueTable();
            base.OnInit(e);
        }
        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;
            }
        }
Beispiel #5
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("");
 }
Beispiel #6
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("");
 }
Beispiel #7
0
 protected void BindDeliveryTime()
 {
     string[] strArray = Choiceset.GetChoicesetInfoByFieldAndTableName("PE_Orders", "DeliveryTime").FieldValue.Replace("|1|", ",").Split(new char[] { ',' });
     for (int i = 0; i < (strArray.Length - 1); i++)
     {
         ListItem item = new ListItem(strArray[i].ToString().Replace("1$", "").Replace("0$", "").Trim());
         if (!strArray[i].ToString().StartsWith("1$", StringComparison.Ordinal) && !strArray[i].ToString().StartsWith("0$", StringComparison.Ordinal))
         {
             item.Selected = true;
         }
         this.dropDeliverTime.Items.Add(item);
     }
 }
 protected void EgvCompany_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         CompanyInfo dataItem = e.Row.DataItem as CompanyInfo;
         Label       label    = e.Row.FindControl("LblStatusInField") as Label;
         Label       label2   = e.Row.FindControl("LblCompanySize") as Label;
         Label       label3   = e.Row.FindControl("LblManagementForms") as Label;
         label.Text  = Choiceset.GetDataText("PE_Company", "StatusInField", dataItem.StatusInField);
         label2.Text = Choiceset.GetDataText("PE_Company", "CompanySize", dataItem.CompanySize);
         label3.Text = Choiceset.GetDataText("PE_Company", "ManagementForms", dataItem.ManagementForms);
     }
 }
        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);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         Choiceset.DropDownListDataBind("PE_Company", "StatusInField", this.DropStatusInField);
         Choiceset.DropDownListDataBind("PE_Company", "CompanySize", this.DropCompanySize);
         Choiceset.DropDownListDataBind("PE_Company", "ManagementForms", this.DropManagementForms);
         if (this.Action == "modify")
         {
             this.ModifyInitialize();
         }
         else
         {
             this.TxtCompanyName.Text = this.CompanyName;
         }
     }
 }
Beispiel #11
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;
                }
            }
        }
Beispiel #12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.TxtBirthday.ImageStyle.Add("float", "left");
     this.TxtBirthday.Style.Add("float", "left");
     if (!this.userSiteConfig.EnableUserReg)
     {
         this.PnlRegStep0.Visible = true;
         this.PnlRegStep1.Visible = false;
         this.PnlRegStep2.Visible = false;
     }
     else
     {
         this.callBackReference = this.Page.ClientScript.GetCallbackEventReference(this, "arg", "ReceiveServerData", "context");
         string str    = this.Page.ClientScript.GetCallbackEventReference(this, "arg", "ReceiveServerDataByCheckSameData", "context");
         string script = "function CallBackByCheckSameData(arg,context){" + str + ";}";
         this.Page.ClientScript.RegisterClientScriptBlock(base.GetType(), "CallBackByCheckSameData", script, true);
         int userNameLimit = 1;
         int userNameMax   = 20;
         if (this.userSiteConfig.UserNameLimit > 0)
         {
             userNameLimit = this.userSiteConfig.UserNameLimit;
         }
         if (this.userSiteConfig.UserNameMax >= userNameLimit)
         {
             userNameMax = this.userSiteConfig.UserNameMax;
         }
         this.ValgTextMaxLength.ValidationExpression = @"^[a-zA-Z0-9_\u4e00-\u9fa5]{" + userNameLimit.ToString() + "," + userNameMax.ToString() + "}$";
         this.InterMessageUserName.Text      = "请输入用户名。不能少于" + userNameLimit.ToString() + "个字符,不能超过" + userNameMax.ToString() + "个字符";
         this.ValgTextMaxLength.ErrorMessage = "用户名必须大于" + userNameLimit.ToString() + "个字符并且不能超过" + userNameMax.ToString() + "个字符";
         if (!base.IsPostBack)
         {
             this.LitControlTreeInfo.BeginTag = "<input name='ControlTreeInfo' type='hidden' value='";
             this.LitControlTreeInfo.Text     = this.userSiteConfig.RegFieldsMustFill + "$$$$$" + this.userSiteConfig.RegFieldsSelectFill;
             this.LitControlTreeInfo.EndTag   = "'/>";
             this.InitProtocol();
             if (this.GetDisplayStyle("Income") != "none")
             {
                 Choiceset.DropDownListDataBind("PE_Contacter", "Income", this.DropIncome);
             }
             this.PnlRegStep1.Visible = true;
         }
     }
 }
 public void SetContacter(ContacterInfo contacterInfo)
 {
     if (contacterInfo.Birthday.HasValue)
     {
         this.DpkBirthday.Text = contacterInfo.Birthday.Value.ToString("yyyy-MM-dd");
     }
     this.TxtIDCard.Text               = contacterInfo.IdCard;
     this.TxtNativePlace.Text          = contacterInfo.NativePlace;
     this.TxtNation.Text               = contacterInfo.Nation;
     this.RadlSex.SelectedValue        = contacterInfo.Sex.ToString("D");
     this.RadlMarriage.SelectedValue   = contacterInfo.Marriage.ToString("D");
     this.TxtGraduateFrom.Text         = contacterInfo.GraduateFrom;
     this.TxtInterestsOfLife.Text      = contacterInfo.InterestsOfLife;
     this.TxtInterestsOfCulture.Text   = contacterInfo.InterestsOfCulture;
     this.TxtInterestsOfAmusement.Text = contacterInfo.InterestsOfAmusement;
     this.TxtInterestsOfSport.Text     = contacterInfo.InterestsOfSport;
     this.TxtInterestsOfOther.Text     = contacterInfo.InterestsOfOther;
     this.TxtFamily.Text               = contacterInfo.Family;
     Choiceset.DropDownListDataBind("PE_Contacter", "Education", this.DropEducation, contacterInfo.Education);
     Choiceset.DropDownListDataBind("PE_Contacter", "Income", this.DropIncome, contacterInfo.Income);
 }
Beispiel #14
0
        private DataTable GetTitle(string tableName)
        {
            IList <ChoicesetInfo> choicesetList = Choiceset.GetChoicesetList();
            DataTable             table         = new DataTable();

            table.Columns.Add("TableName");
            table.Columns.Add("Title");
            table.Columns.Add("FieldName");
            foreach (ChoicesetInfo info in choicesetList)
            {
                if (info.TableName == tableName)
                {
                    DataRow row = table.NewRow();
                    row["TableName"] = info.TableName;
                    row["Title"]     = info.Title;
                    row["FieldName"] = info.FieldName;
                    table.Rows.Add(row);
                }
            }
            return(table);
        }
        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;
                }
            }
        }
 private void ShowInfo()
 {
     EasyOne.Model.Crm.CompanyInfo compayById = Company.GetCompayById(this.m_CompanyId);
     this.LblCompanyName.Text       = compayById.CompanyName;
     this.LblCountry.Text           = compayById.Country;
     this.LblProvince.Text          = compayById.Province;
     this.LblCity.Text              = compayById.City;
     this.LblAddress.Text           = compayById.Address;
     this.LblZipCode.Text           = compayById.ZipCode;
     this.LblAnnualSales.Text       = compayById.AnnualSales;
     this.LblBankAccount.Text       = compayById.BankAccount;
     this.LblBankOfDeposit.Text     = compayById.BankOfDeposit;
     this.LblBusinessScope.Text     = compayById.BusinessScope;
     this.LblCompanyPic.Text        = compayById.CompanyPic;
     this.LblCompanyIntro.Text      = compayById.CompanyIntro;
     this.LblCompanySize.Text       = Choiceset.GetDataText("PE_Company", "CompanySize", compayById.CompanySize);
     this.LblFax.Text               = compayById.Fax;
     this.LblHomepage.Text          = compayById.Homepage;
     this.LblPhone.Text             = compayById.Phone;
     this.LblRegisteredCapital.Text = compayById.RegisteredCapital;
     this.LblTaxNum.Text            = compayById.TaxNum;
     this.LblStatusInField.Text     = Choiceset.GetDataText("PE_Company", "StatusInField", compayById.StatusInField);
     this.LblManagementForms.Text   = Choiceset.GetDataText("PE_Company", "ManagementForms", compayById.ManagementForms);
 }
        private void CreateFormFieldValueTable()
        {
            Table child = new Table();

            child.Width = Unit.Parse("100%");
            child.Attributes.Add("class", "border");
            TableRow row = new TableRow();

            row.Attributes.Add("class", "title");
            row.Attributes.Add("align", "center");
            row.Attributes.Add("height", "25");
            TableCell cell = new TableCell();

            cell.Text = "序号";
            row.Cells.Add(cell);
            TableCell cell2 = new TableCell();

            cell2.Text = "默认";
            row.Cells.Add(cell2);
            TableCell cell3 = new TableCell();

            cell3.Text = "启用";
            row.Cells.Add(cell3);
            TableCell cell4 = new TableCell();

            cell4.Text = "选项值";
            row.Cells.Add(cell4);
            child.Rows.Add(row);
            ChoicesetValueInfoCollection dictionaryFieldValue = Choiceset.GetDictionaryFieldValue(this.choicesetInfo);

            for (int i = 0; i < (dictionaryFieldValue.Count + 3); i++)
            {
                ChoicesetValueInfo info;
                if (i < dictionaryFieldValue.Count)
                {
                    info = dictionaryFieldValue[i];
                }
                else
                {
                    info               = new ChoicesetValueInfo();
                    info.IsDefault     = false;
                    info.IsEnable      = false;
                    info.DataTextField = string.Empty;
                }
                TableRow row2 = new TableRow();
                row2.Attributes.Add("class", "tdbg");
                row2.Attributes.Add("align", "center");
                TableCell cell5 = new TableCell();
                cell5.Text = i.ToString();
                row2.Cells.Add(cell5);
                TableCell     cell6   = new TableCell();
                StringBuilder builder = new StringBuilder();
                builder.Append("");
                builder.Append("<Input type='radio' name='rad' ");
                builder.Append("id='rad");
                builder.Append(i.ToString());
                builder.Append("' value=");
                builder.Append(i.ToString());
                if (info.IsDefault)
                {
                    builder.Append(" checked");
                }
                builder.Append(">");
                cell6.Text = builder.ToString();
                row2.Cells.Add(cell6);
                TableCell cell7 = new TableCell();
                CheckBox  box   = new CheckBox();
                box.ID = "chk" + ((i + 1)).ToString();
                box.EnableViewState = false;
                box.Checked         = info.IsEnable;
                cell7.Controls.Add(box);
                row2.Cells.Add(cell7);
                TableCell cell8 = new TableCell();
                cell8.Attributes.Add("align", "left");
                TextBox box2 = new TextBox();
                box2.ApplyStyleSheetSkin(this);
                box2.Text            = info.DataTextField;
                box2.ID              = "txt" + ((i + 1)).ToString();
                box2.EnableViewState = false;
                cell8.Controls.Add(box2);
                row2.Cells.Add(cell8);
                child.Rows.Add(row2);
            }
            child.CellPadding = 0;
            child.CellSpacing = 1;
            this.PlhFormFieldValue.Controls.Add(child);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     this.RptAuthorTypeList.DataSource = Choiceset.GetDictionaryFieldValueByName("PE_Author", "Type");
     this.RptAuthorTypeList.DataBind();
 }
Beispiel #19
0
        private void BindControl(OrderInfo info)
        {
            this.LblOrderNum.Text   = info.OrderNum;
            this.HlkUserName.Text   = info.UserName;
            this.HlkAgentName.Text  = info.AgentName;
            this.HlkClientName.Text = info.ClientName;
            if (this.IsAdminPage)
            {
                this.HlkUserName.NavigateUrl   = string.Format("~/Admin/User/UserShow.aspx?UserName={0}", base.Server.UrlEncode(info.UserName));
                this.HlkClientName.NavigateUrl = string.Format("~/Admin/Crm/ClientShow.aspx?ClientId={0}", info.ClientId);
                this.HlkAgentName.NavigateUrl  = string.Format("~/Admin/User/UserShow.aspx?UserName={0}", base.Server.UrlEncode(info.AgentName));
            }
            this.CliendId = info.ClientId;
            if (info.NeedInvoice)
            {
                this.LblNeedInvoice.Text = "√";
            }
            else
            {
                this.LblNeedInvoice.Text      = "\x00d7";
                this.LblNeedInvoice.ForeColor = Color.FromArgb(0xff0000);
            }
            if (info.Invoiced)
            {
                this.LblInvoiced.Text = "√";
            }
            else
            {
                this.LblInvoiced.Text      = "\x00d7";
                this.LblInvoiced.ForeColor = Color.FromArgb(0xff0000);
            }
            this.LblStatus.Text = BaseUserControl.EnumToHtml <OrderStatus>(info.Status);
            switch (Order.GetPayStatus(info))
            {
            case PayStatus.WaitForPay:
                this.LblMoneyTotal.Text = BaseUserControl.EnumToHtml <PayStatus>(PayStatus.WaitForPay);
                break;

            case PayStatus.ReceivedEarnest:
                this.LblMoneyTotal.Text = BaseUserControl.EnumToHtml <PayStatus>(PayStatus.ReceivedEarnest);
                break;

            case PayStatus.Payoff:
                this.LblMoneyTotal.Text = BaseUserControl.EnumToHtml <PayStatus>(PayStatus.Payoff);
                break;
            }
            this.LblDeliverStatus.Text = BaseUserControl.EnumToHtml <DeliverStatus>(info.DeliverStatus);
            if (info.NeedInvoice)
            {
                this.LblInvoiceContent.Text = info.InvoiceContent;
            }
            this.LblRemark.Text            = info.Remark;
            this.LblBeginDate.Text         = info.BeginDate.ToString("yyyy-MM-dd");
            this.LblInputTime.Text         = info.InputTime.ToString("yyyy-MM-dd HH:mm:ss");
            this.LblContacterName.Text     = info.ContacterName;
            this.LblAddress.Text           = info.Address;
            this.LblZipCode.Text           = info.ZipCode;
            this.LblMobile.Text            = info.Mobile;
            this.LblPhone.Text             = info.Phone;
            this.LblEmail.Text             = info.Email;
            this.LblPaymentType.Text       = PaymentType.GetPaymentTypeById(info.PaymentType).TypeName;
            this.LblDeliverType.Text       = DeliverType.GetDeliverTypeById(info.DeliverType).TypeName;
            this.LblOutOfStockProject.Text = BaseUserControl.EnumToHtml <OutOfStockProject>(info.OutOfStockProject);
            this.LblDeliverTime.Text       = info.DeliveryTime;
            if (this.IsAdminPage)
            {
                this.LblMemo.Text            = info.Memo;
                this.LblMemo.Visible         = true;
                this.LtrMemoTitle.Visible    = true;
                this.ShowFunctionary.Visible = true;
                this.LblFunctionary.Text     = info.Functionary;
                this.LblOrderType.Text       = Choiceset.GetDataText("PE_Orders", "OrderType", info.OrderType);
            }
            else
            {
                this.LblMemo.Visible         = false;
                this.LtrMemoTitle.Visible    = false;
                this.ShowFunctionary.Visible = false;
            }
        }
        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);
                }
            }
        }
Beispiel #21
0
 public static string[] GetField(string tableName, string fieldName)
 {
     return(Choiceset.GetDataTextFields(tableName, fieldName));
 }