Exemple #1
0
        protected void UpdatePersonInfo()
        {
            if (!IsCompanyCheck)//是否审核
            {
                Utils.ResponseMeg(false, "对不起,你尚未审核通过!");
                return;
            }
            string userName  = Utils.GetFormValue(pis_txtUserName.UniqueID, 20); //姓名
            string userEmail = Utils.GetFormValue(pis_txtEmail.UniqueID, 50);    //邮箱

            if (userEmail == "" || userName == "")
            {
                Utils.ResponseMegNoComplete();
            }
            else
            {
                userModel.ContactInfo.ContactName = userName;
                if (this.pis_rdiSex.Enabled)
                {
                    userModel.ContactInfo.ContactSex = (EyouSoft.Model.CompanyStructure.Sex)Utils.GetInt(this.pis_rdiSex.SelectedValue, 2);
                }
                userModel.ContactInfo.Mobile = Utils.GetFormValue(pis_txtMobile.UniqueID, 50);
                userModel.ContactInfo.Fax    = Utils.GetFormValue(pis_txtFax.UniqueID, 50);
                userModel.ContactInfo.Tel    = Utils.GetFormValue(pis_txtTel.UniqueID, 20);
                userModel.ContactInfo.Email  = userEmail;

                userModel.ContactInfo.QQ  = Utils.GetFormValue(pis_txtQQ.UniqueID, 20);
                userModel.ContactInfo.MSN = Utils.GetFormValue(pis_txtMSN.UniqueID, 50);

                userModel.MqNickName = Utils.GetFormValue(this.txtMQNickName.UniqueID, 20); //MQ昵称
                userModel.Job        = Utils.GetFormValue(this.txtDuty.UniqueID, 10);       //公司职务
                //部门
                //string partID=Utils.GetFormValue(this.ddlDepart.UniqueID);
                //if(!string.IsNullOrEmpty(partID))
                //{
                //    userModel.DepartId =partID;
                //    userModel.DepartName = this.ddlDepart.Text;
                //}

                if (userBll.IsExistsEmail(userEmail, SiteUserInfo.ID))
                {
                    Utils.ResponseMeg(false, "该邮箱已经存在!");
                    return;
                }
                if (userBll.UpdatePersonal(userModel))
                {
                    Utils.ResponseMeg(true, "修改成功!");
                }
                else
                {
                    Utils.ResponseMegError();
                }
            }
        }
Exemple #2
0
        /// <summary>
        /// 保存按钮Click事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            EyouSoft.Model.CompanyStructure.CompanyLogo logoInfo = new EyouSoft.Model.CompanyStructure.CompanyLogo();
            logoInfo.ImagePath = Utils.GetFormValue("FSelfLogo$hidFileName");

            EyouSoft.Model.CompanyStructure.CompanyMQAdv adInfo = new EyouSoft.Model.CompanyStructure.CompanyMQAdv();
            adInfo.ImagePath = Utils.GetFormValue("FSelfAd$hidFileName");
            adInfo.ImageLink = Utils.GetFormValue("txtPayMQSelfAdUrl").Trim();

            EyouSoft.IBLL.CompanyStructure.ICompanyUser ubll  = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance();
            EyouSoft.Model.CompanyStructure.CompanyUser uInfo = ubll.GetModel(this.SiteUserInfo.ID);

            string contactName      = Utils.GetFormValue(this.txtSelfContactName.UniqueID);             //Utils.InputText(this.txtSelfContactName.Text);
            int    contactGender    = Utils.GetInt(Utils.GetFormValue(this.rblSelfGender.UniqueID), 2); //Utils.GetInt(this.rblSelfGender.SelectedValue, 2);
            string contactTelephone = Utils.GetFormValue(this.txtSelfContactTel.UniqueID);              //Utils.InputText(this.txtSelfContactTel.Text);
            string contactMobile    = Utils.GetFormValue(this.txtSelfContactMobile.UniqueID);           //Utils.InputText(this.txtSelfContactMobile.Text);

            uInfo.ContactInfo.ContactName = string.IsNullOrEmpty(contactName) ? uInfo.ContactInfo.ContactName : contactName;
            uInfo.ContactInfo.ContactSex  = (EyouSoft.Model.CompanyStructure.Sex)contactGender;
            uInfo.ContactInfo.Tel         = string.IsNullOrEmpty(contactTelephone) ? uInfo.ContactInfo.Tel : contactTelephone;
            uInfo.ContactInfo.Mobile      = string.IsNullOrEmpty(contactMobile) ? uInfo.ContactInfo.Mobile : contactMobile;

            ubll.UpdatePersonal(uInfo);

            if (!string.IsNullOrEmpty(logoInfo.ImagePath))
            {
                EyouSoft.BLL.CompanyStructure.CompanyAttachInfo.CreateInstance().SetCompanyLogo(uInfo.CompanyID, logoInfo);
            }

            if (!string.IsNullOrEmpty(adInfo.ImagePath) || !string.IsNullOrEmpty(adInfo.ImageLink))
            {
                if (string.IsNullOrEmpty(adInfo.ImagePath))
                {
                    adInfo.ImagePath = this.txtSelfCurrentAdImgPath.Value;
                }

                if (!string.IsNullOrEmpty(adInfo.ImageLink) && !adInfo.ImageLink.StartsWith("http://"))
                {
                    adInfo.ImageLink = "http://" + adInfo.ImageLink;
                }

                EyouSoft.BLL.CompanyStructure.CompanyAttachInfo.CreateInstance().SetCompanyMQAdv(uInfo.CompanyID, adInfo);
            }

            Response.Redirect(Request.ServerVariables["SCRIPT_NAME"] + "?" + Request.QueryString);
        }