Example #1
0
        /// <summary>
        /// 绑定数据源
        /// </summary>
        private void BindSource()
        {
            EyouSoft.BLL.CrmStructure.BCrm   bCrm = new EyouSoft.BLL.CrmStructure.BCrm();
            EyouSoft.Model.CrmStructure.MCrm mCrm = bCrm.GetInfo(SiteUserInfo.TourCompanyInfo.CompanyId);
            //查询国家、省市区域的
            EyouSoft.BLL.ComStructure.BComCity bComCity = new EyouSoft.BLL.ComStructure.BComCity();
            EyouSoft.Model.ComStructure.MCPCC  m        = bComCity.GetCPCD(CurrentUserCompanyID, mCrm.CountryId, mCrm.ProvinceId, mCrm.CityId, mCrm.CountyId);
            if (m != null)
            {
                this.lblCountry.Text = m.CountryName;
                this.lblProvice.Text = m.ProvinceName;
                this.lblCity.Text    = m.CityName;
                this.lblCounty.Text  = m.CountyName;
            }

            this.lblName.Text                      = mCrm.Name;
            this.lblAddress.Text                   = mCrm.Address;
            this.lblOrganizationCode.Text          = mCrm.OrganizationCode;
            this.lblLegalRepresentative.Text       = mCrm.LegalRepresentative;
            this.lblLegalRepresentativeMobile.Text = mCrm.LegalRepresentativeMobile;
            this.lblLegalRepresentativePhone.Text  = mCrm.LegalRepresentativePhone;
            this.lblLicense.Text                   = mCrm.License;
            this.lblFinancialName.Text             = mCrm.FinancialName;
            this.lblFinancialPhone.Text            = mCrm.FinancialPhone;
            this.lblFinancialMobile.Text           = mCrm.FinancialMobile;

            //查询销售员
            EyouSoft.BLL.ComStructure.BComUser   bUser = new EyouSoft.BLL.ComStructure.BComUser();
            EyouSoft.Model.ComStructure.MComUser user  = bUser.GetModel(mCrm.SellerId, SiteUserInfo.CompanyId);
            if (null != user)
            {
                this.lblSeller.Text = user.UserName;
            }

            this.lblBrevityCode.Text  = mCrm.BrevityCode;
            this.lblRebatePolicy.Text = mCrm.RebatePolicy;
        }
Example #2
0
 /// <summary>
 /// 获取当前用户的明文密码
 /// </summary>
 /// <returns></returns>
 private string GetPassword()
 {
     EyouSoft.BLL.ComStructure.BComUser   BUser = new EyouSoft.BLL.ComStructure.BComUser();
     EyouSoft.Model.ComStructure.MComUser User  = BUser.GetModel(SiteUserInfo.UserId, SiteUserInfo.CompanyId);
     return(User.Password);
 }
Example #3
0
        private void Bind()
        {
            if (!string.IsNullOrEmpty(EyouSoft.Common.Utils.GetQueryStringValue("crmId")))
            {
                EyouSoft.Model.CrmStructure.MCrm crmModel = crmBll.GetInfo(EyouSoft.Common.Utils.GetQueryStringValue("crmId"));
                if (crmBll != null)
                {
                    lblAddress.Text     = crmModel.Address;
                    lblBrevityCode.Text = crmModel.BrevityCode;
                    lblAmountOwed.Text  = crmModel.AmountOwed.ToString("C");
                    EyouSoft.Model.ComStructure.MCPCC cpccModel = cityBll.GetCPCD(crmModel.CompanyId, crmModel.CountryId, crmModel.ProvinceId, crmModel.CityId, crmModel.CountyId);
                    lblCity.Text                      = cpccModel.CityName;
                    lblCountry.Text                   = cpccModel.CountryName;
                    lblCounty.Text                    = cpccModel.CountyName;
                    lblProvince.Text                  = cpccModel.ProvinceName;
                    lblDeadline.Text                  = crmModel.Deadline.ToString();
                    lblFinancialMobile.Text           = crmModel.FinancialMobile;
                    lblFinancialName.Text             = crmModel.FinancialName;
                    lblFinancialPhone.Text            = crmModel.FinancialPhone;
                    lblIsSignContract.Text            = (!crmModel.IsSignContract) ? "否" : "是";
                    lblLegalRepresentative.Text       = crmModel.LegalRepresentative;
                    lblLegalRepresentativeMobile.Text = crmModel.LegalRepresentativeMobile;
                    lblLegalRepresentativePhone.Text  = crmModel.LegalRepresentativePhone;
                    lblLicense.Text                   = crmModel.License;
                    lblName.Text                      = crmModel.Name;
                    lblOrganizationCode.Text          = crmModel.OrganizationCode;
                    //lblRebatePolicy.Text = crmModel.RebatePolicy;
                    lblSellerId.Text = crmModel.SellerName;
                    if (crmModel.BankList != null && crmModel.BankList.Count > 0)
                    {
                        rptBank.DataSource = crmModel.BankList;
                        rptBank.DataBind();
                    }
                    else
                    {
                        phYinHangZhangHuEmpty.Visible = true;
                    }

                    if (crmModel.LinkManList != null && crmModel.LinkManList.Count > 0)
                    {
                        for (int i = 0; i < crmModel.LinkManList.Count; i++)
                        {
                            EyouSoft.Model.ComStructure.MComUser userModel = userBll.GetModel(crmModel.LinkManList[i].UserId, base.SiteUserInfo.CompanyId);
                            string html = string.Empty;
                            if (userModel != null)
                            {
                                html = string.Format("<table cellspacing='0' cellpadding='0' border='0' width='100%' class='pp-tableclass'><tr class='pp-table-title'><th height='23' align='center'>帐号</th><th align='center'>密码</th><th height='23' align='center'>状态</th></tr><tr ><td align='center'>{0}</td><td align='center'>{1}</td><td align='center'>{2}</td></tr></table>", userModel.UserName, userModel.Password, userModel.UserStatus.ToString());
                                userListString.Add(crmModel.LinkManList[i].UserId, html);
                            }
                        }

                        rptLinkMan.DataSource = crmModel.LinkManList;
                        rptLinkMan.DataBind();
                    }
                    if (crmModel.AttachModel != null)
                    {
                        filename = crmModel.AttachModel.Name;
                        filepath = crmModel.AttachModel.FilePath;
                    }
                }
            }
        }
Example #4
0
        private void BindListData(string crmId)
        {
            EyouSoft.Model.CrmStructure.MCrm model = crmBll.GetInfo(crmId);
            if (model != null)
            {
                txtAddress.Text = model.Address;


                txtLegalRepresentative.Text      = model.LegalRepresentative;
                txtLegalRepresentativePhone.Text = model.LegalRepresentativePhone;
                txtLicense.Text          = model.License;
                txtName.Text             = model.Name;
                txtOrganizationCode.Text = model.OrganizationCode;

                txtRebatePolicy.Text     = model.RebatePolicy;
                Seller1.SellsID          = model.SellerId;
                Seller1.SellsName        = userBll.GetModel(model.SellerId, base.SiteUserInfo.CompanyId).ContactName;
                ddlCity.SelectedValue    = model.CityId.ToString();
                ddlLevId.SelectedValue   = model.LevId.ToString();
                ddlProvice.SelectedValue = model.ProvinceId.ToString();



                Province                          = model.ProvinceId.ToString();
                City                              = model.CityId.ToString();
                Country                           = model.CountryId.ToString();
                County                            = model.CountyId.ToString();
                txtBrevityCode.Text               = model.BrevityCode;
                txtFinancialMobile.Text           = model.FinancialMobile;
                txtFinancialName.Text             = model.FinancialName;
                txtFinancialPhone.Text            = model.FinancialPhone;
                txtLegalRepresentativeMobile.Text = model.LegalRepresentativeMobile;


                txtAmountOwed.Text = model.AmountOwed.ToString("C");
                txtDeadline.Text   = model.Deadline.ToString();
                if (model.IsSignContract)
                {
                    rbtnIsSignContractYes.Checked = true;
                }
                else
                {
                    rbtnIsSignContractNo.Checked = true;
                }
                if (model.AttachModel != null)
                {
                    FilePath = model.AttachModel.FilePath;
                }
                #region 结算账户

                if (model.BankList.Count > 0)
                {
                    rptJSZHList.DataSource = model.BankList;
                    rptJSZHList.DataBind();
                }
                else
                {
                    IList <EyouSoft.Model.CrmStructure.MCrmBank> list = new List <EyouSoft.Model.CrmStructure.MCrmBank>();
                    list.Add(new EyouSoft.Model.CrmStructure.MCrmBank()
                    {
                        BankAccount = string.Empty, BankName = string.Empty
                    });
                    rptJSZHList.DataSource = list;
                    rptJSZHList.DataBind();
                }


                //修改责任销售权限
                if (!this.CheckGrant(EyouSoft.Model.EnumType.PrivsStructure.Privs.客户管理_单位直客_修改责任销售))
                {
                    this.Seller1.ReadOnly = true;
                }
                #endregion
            }


            #region 常用联系人绑定
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            if (model.LinkManList.Count > 0)
            {
                rptCYLXRList.DataSource = model.LinkManList;
                rptCYLXRList.DataBind();
            }
            else
            {
                IList <EyouSoft.Model.CrmStructure.MCrmLinkman> list = new List <EyouSoft.Model.CrmStructure.MCrmLinkman>();
                list.Add(new EyouSoft.Model.CrmStructure.MCrmLinkman()
                {
                    Department = string.Empty, Name = string.Empty, Telephone = string.Empty, MobilePhone = string.Empty, Birthday = null, QQ = string.Empty, Fax = string.Empty, Address = string.Empty, IsRemind = false, UserId = string.Empty
                });
                rptCYLXRList.DataSource = list;
                rptCYLXRList.DataBind();
            }
            #endregion
        }