Пример #1
0
    protected void databindList(int ProfessionalID)
    {
        ProfessionalPlease  plModel   = plBll.GetModel(ProfessionalID);
        ProfessionalLink    linkModel = linkBll.GetModel(ProfessionalID);
        ProfessionalinfoTab inModel   = infoBll.GetModel(ProfessionalID);

        txtTitle.Text = inModel.Titel.ToString();
        this.ZoneSelectControl1.CountryID  = plModel.CountryCode;
        this.ZoneSelectControl1.ProvinceID = plModel.ProvinceID;
        this.ZoneSelectControl1.CityID     = plModel.CityID;
        this.ZoneSelectControl1.CountyID   = plModel.CountyID;
        txtBusinesDetails.Text             = plModel.description;
        txtRegistYear.Text            = plModel.companydate.ToString("yyyy-MM-dd");
        ddlServiceType.SelectedValue  = plModel.servicetypeID.ToString();  //服务类型
        DropIndustry.SelectedValue    = plModel.institutionsID.ToString(); //机构类别
        txtEmployeeCount.Value        = plModel.Enterprisesize;            //企业规模
        txtRegistMoeny.Value          = plModel.funds;                     //注册资金
        txtTurnover.Value             = plModel.turnover;                  //营业额
        rdlValiditeTerm.SelectedValue = plModel.validityID.ToString();     //有效期
        txtAddress.Text      = linkModel.Address;
        txtLinkMan.Value     = linkModel.UserName;
        txtPhone.Text        = linkModel.phone;
        txtCompanyName.Value = linkModel.CompanyName;

        txtEmail.Value   = linkModel.Email;
        txtLinkFax.Value = linkModel.Fax;
        txtLinkTel.Value = linkModel.Tel;
        txtWebSite.Value = linkModel.Site;
    }
Пример #2
0
        public ProfessionalLink GetModel(int Lid)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 Lid,ProfessionalID,UserName,CompanyName,Address,Tel,phone,Fax,Email,Site from ProfessionalLink ");
            strSql.Append(" where ProfessionalID=@Lid");
            SqlParameter[] parameters =
            {
                new SqlParameter("@Lid", SqlDbType.Int, 4)
            };
            parameters[0].Value = Lid;

            ProfessionalLink model = new ProfessionalLink();
            DataSet          ds    = DbHelperSQL.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["Lid"].ToString() != "")
                {
                    model.Lid = int.Parse(ds.Tables[0].Rows[0]["Lid"].ToString());
                }
                if (ds.Tables[0].Rows[0]["ProfessionalID"].ToString() != "")
                {
                    model.ProfessionalID = int.Parse(ds.Tables[0].Rows[0]["ProfessionalID"].ToString());
                }
                model.UserName    = ds.Tables[0].Rows[0]["UserName"].ToString();
                model.CompanyName = ds.Tables[0].Rows[0]["CompanyName"].ToString();
                model.Address     = ds.Tables[0].Rows[0]["Address"].ToString();
                model.Tel         = ds.Tables[0].Rows[0]["Tel"].ToString();
                model.phone       = ds.Tables[0].Rows[0]["phone"].ToString();
                model.Fax         = ds.Tables[0].Rows[0]["Fax"].ToString();
                model.Email       = ds.Tables[0].Rows[0]["Email"].ToString();
                model.Site        = ds.Tables[0].Rows[0]["Site"].ToString();
                return(model);
            }
            else
            {
                return(null);
            }
        }
    //审核
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        ProfessionalinfoTab MainInfo = new ProfessionalinfoTab();
        Professionalview    viewInfo = new Professionalview();

        ProfessionalLink personInfo = new ProfessionalLink();

        if (!string.IsNullOrEmpty(Request.QueryString["ProfessionalID"]))
        {
            int ProfessionalID = int.Parse(Request.QueryString["ProfessionalID"].ToString());
            MainInfo.ProfessionalID = ProfessionalID;
            MainInfo = infoBll.GetModel(ProfessionalID);
        }
        MainInfo.Titel = txtTitle.Text.Trim();
        //0未审核  1审核通过2审核未通过
        if (rdPass.Checked)
        {
            MainInfo.auditId = 1;
        }
        else if (rdAudit.Checked)
        {
            MainInfo.auditId = 0;
        }
        else if (rdNopass.Checked)
        {
            MainInfo.auditId = 2;
        }
        else
        {
            MainInfo.auditId = 4;
        }
        //是否收费 0 免费 1收费
        if (rdomian.Checked)
        {
            MainInfo.chargeId = 0;
        }
        else
        {
            MainInfo.chargeId = 1;
        }
        //来源 1 会员中心  2 业务员
        //MainInfo.FromId = int.Parse(ddlFrom.SelectedValue.ToString());
        //类型 1 需要服务2提供专业 3专业人才

        //if (rdoService.Checked) { MainInfo.typeID = 1; } else if (rdoPress.Checked) { MainInfo.typeID = 2; } else { MainInfo.typeID = 3; }
        //状态 0无效 1有效 2已过期
        if (rdoNoEnable.Checked)
        {
            MainInfo.stateId = 0;
        }
        else if (rdoYesEnable.Checked)
        {
            MainInfo.stateId = 1;
        }
        else
        {
            MainInfo.stateId = 2;
        }
        //是否推荐  不推荐 0  推荐  1
        if (rdoYesAct.Checked)
        {
            MainInfo.recommendId = 1;
        }
        else
        {
            MainInfo.recommendId = 0;
        }
        MainInfo.price          = Convert.ToDecimal(txtPrice.Text.ToString());
        MainInfo.refreshTime    = Convert.ToDateTime(txtReTime.Text.Trim().ToString());
        MainInfo.FeedBackNote   = tbAuditingRemark.Text.Trim();
        MainInfo.clickId        = int.Parse(txtClick.Text.Trim().ToString());
        MainInfo.Titel          = txtTitle.Text.Trim();
        MainInfo.htmlUrl        = "dservice/" + DateTime.Now.ToString("yyyyMM") + "/dservice" + DateTime.Now.ToString("yyyyMMdd") + "_" + Request.QueryString["ProfessionalID"].ToString() + ".shtml";
        viewInfo.CountryCode    = this.ZoneSelectControl1.CountryID;
        viewInfo.ProvinceID     = this.ZoneSelectControl1.ProvinceID;
        viewInfo.CityID         = this.ZoneSelectControl1.CityID;
        viewInfo.CountyID       = this.ZoneSelectControl1.CountyID;
        viewInfo.description    = txtContent.Text.Trim();
        viewInfo.title          = txtWtitle.Text.Trim();
        viewInfo.keywords       = txtKeyword1.Text.Trim();
        viewInfo.Webdescription = txtWebDesr.Text.Trim();
        viewInfo.validityID     = int.Parse(rdlValiditeTerm.SelectedValue.ToString());
        viewInfo.typeID         = int.Parse(ddlServiceType.SelectedValue.ToString());

        personInfo.Address     = txtAddress.Text.Trim();
        personInfo.CompanyName = txtCompany.Text.Trim();
        personInfo.Email       = txtEmail.Text.Trim();
        personInfo.Fax         = txtFax.Text.Trim();
        personInfo.phone       = txtPhone.Text.Trim();

        string tel = string.Empty;

        if (!string.IsNullOrEmpty(txtcontactsTel.Text.Trim()))
        {
            tel = txtcontactsTel.Text.Trim() + ",";
        }
        else
        {
            tel = ",";
        }
        if (!string.IsNullOrEmpty(txtTel.Text.Trim()))
        {
            tel += txtTel.Text.Trim() + ",";
        }
        else
        {
            tel += ",";
        }
        if (!string.IsNullOrEmpty(txttel2.Text.Trim()))
        {
            tel += txttel2.Text.Trim() + ",";
        }
        else
        {
            tel += ",";
        }
        personInfo.Tel = tel;

        personInfo.UserName = txtLinkMan.Text.Trim();
        personInfo.Site     = txtSite.Text.Trim();
        if (viewbll.UpdateProFessionlView(MainInfo, viewInfo, personInfo))
        {
            if (rdPass.Checked)
            {
                Tz888.BLL.ProfessionalManage.PageStatic stat = new PageStatic();
                int result = stat.StaticHtml(int.Parse(Request.QueryString["ProfessionalID"].ToString()));
                if (result <= 0)
                {
                    Tz888.Common.MessageBox.Show(this.Page, "生成静态页面失败");
                }
            }
            Response.Write("<script>alert('审核成功!');document.location='ProfessionalManage.aspx'</script>");
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "审核失败!");
        }
    }
Пример #4
0
    //申请
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(this.txtTitle.Text))
        {
            Tz888.Common.MessageBox.Show(this.Page, "请填写标题!");
            return;
        }
        if (string.IsNullOrEmpty(this.ddlServiceType.SelectedValue))
        {
            Tz888.Common.MessageBox.Show(this.Page, "请选择服务大类!");
            return;
        }
        //if (string.IsNullOrEmpty(this.slServerMDrop.SelectedValue))
        //{
        //    Tz888.Common.MessageBox.Show(this.Page, "请选择服务小类!");
        //    return;
        //}
        if (string.IsNullOrEmpty(this.txtContent.Text))
        {
            Tz888.Common.MessageBox.Show(this.Page, "请填写说明!");
            return;
        }
        if (string.IsNullOrEmpty(this.txtLinkMan.Text))
        {
            Tz888.Common.MessageBox.Show(this.Page, "请填写申请人!");
            return;
        }
        if (string.IsNullOrEmpty(this.txtCompany.Text))
        {
            Tz888.Common.MessageBox.Show(this.Page, "请填写单位名称!");
            return;
        }


        //if (string.IsNullOrEmpty(this.txtTel.Text))
        //{
        //    Tz888.Common.MessageBox.Show(this.Page, "请填写联系电话!");
        //    return;
        //}
        if (txtTel.Text.Trim() == "" && txtPhone.Text.Trim() == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "联系人电话和手机至少填一个!");
            return;
        }
        else
        {
            if (txtTel.Text.Trim() != "")
            {
                if (!PageValidate.IsNumber(txtTel.Text.Trim()))
                {
                    Tz888.Common.MessageBox.Show(this.Page, "联系人电话格式错误!");
                    return;
                }
            }
        }
        //if (string.IsNullOrEmpty(this.txtFax.Text))
        //{
        //    Tz888.Common.MessageBox.Show(this.Page, "请填写传真号码!");
        //    return;
        //}
        if (txtEmail.Text.Trim() == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "Email不能为空!!");
            return;
        }
        if (txtEmail.Text.Trim() != "")
        {
            if (!PageValidate.IsEmail(txtEmail.Text.ToLower().Trim()))
            {
                Tz888.Common.MessageBox.Show(this.Page, "Email地址格式错误!");
                return;
            }
        }
        ProfessionalinfoTab MainInfo   = new ProfessionalinfoTab();
        Professionalview    viewInfo   = new Professionalview();
        ProfessionalLink    personInfo = new ProfessionalLink();

        MainInfo.LoginName = Page.User.Identity.Name;
        MainInfo.Titel     = txtTitle.Text.Trim();
        MainInfo.typeID    = 1;
        //MainInfo.auditId = 0; MainInfo.stateId = 0; MainInfo.chargeId = 0;MainInfo.clickId = 0;
        //MainInfo.creatgeDate = Convert.ToDateTime(DateTime.Now.ToString());MainInfo.refreshTime=
        MainInfo.htmlUrl     = "";
        MainInfo.FromId      = 1;
        MainInfo.recommendId = 0;
        MainInfo.price       = 0; //Convert.ToDecimal(txtPrice.Text.Trim());

        viewInfo.CountryCode    = this.ZoneSelectControl1.CountryID;
        viewInfo.ProvinceID     = this.ZoneSelectControl1.ProvinceID;
        viewInfo.CityID         = this.ZoneSelectControl1.CityID;
        viewInfo.CountyID       = this.ZoneSelectControl1.CountyID;
        viewInfo.description    = txtContent.Text.Trim();
        viewInfo.title          = ""; //txtTitle.Text.Trim();
        viewInfo.keywords       = ""; //txtKeyword1.Text.Trim();
        viewInfo.Webdescription = ""; //txtWebDesr.Text.Trim();
        viewInfo.validityID     = int.Parse(rdlValiditeTerm.SelectedValue.ToString());
        viewInfo.typeID         = int.Parse(ddlServiceType.SelectedValue.ToString());

        personInfo.Address = txtAddress.Text.Trim();

        personInfo.CompanyName = txtCompany.Text.Trim();
        personInfo.Email       = txtEmail.Text.Trim();
        personInfo.Fax         = txtFax.Text.Trim();
        personInfo.phone       = txtPhone.Text.Trim();

        string tel = string.Empty;

        if (!string.IsNullOrEmpty(txtcontactsTel.Text.Trim()))
        {
            tel = txtcontactsTel.Text.Trim() + ",";
        }
        else
        {
            tel = ",";
        }
        if (!string.IsNullOrEmpty(txtTel.Text.Trim()))
        {
            tel += txtTel.Text.Trim() + ",";
        }
        else
        {
            tel += ",";
        }
        if (!string.IsNullOrEmpty(txttel2.Text.Trim()))
        {
            tel += txttel2.Text.Trim() + ",";
        }
        else
        {
            tel += ",";
        }
        personInfo.Tel      = tel;
        personInfo.UserName = txtLinkMan.Text.Trim();//之前没改过来
        personInfo.Site     = txtSite.Text.Trim();
        personInfo.phone    = txtPhone.Text.Trim();

        if (viewbll.InsertProFessionlView(MainInfo, viewInfo, personInfo))
        {
            Response.Write("<script>alert('发布成功!');document.location='ServiesManage.aspx'</script>");
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
        }
    }
Пример #5
0
 /// <summary>
 /// 修改一条专业服务数据
 /// </summary>
 /// <returns></returns>
 public bool UpdateProFessionlView(ProfessionalinfoTab mainInfo, Professionalview viewInfo, ProfessionalLink link)
 {
     return(dal.UpdateProFessionlView(mainInfo, viewInfo, link));
 }
Пример #6
0
    protected void databindList(int ProfessionalID)
    {
        ProfessionalPlease  plModel   = plBll.GetModel(ProfessionalID);
        ProfessionalLink    linkModel = linkBll.GetModel(ProfessionalID);
        ProfessionalinfoTab inModel   = infoBll.GetModel(ProfessionalID);

        txtTitle.Text                      = inModel.Titel.ToString();
        txtPrice.Text                      = inModel.price.ToString();
        tbAuditingRemark.Text              = inModel.FeedBackNote;
        this.ZoneSelectControl1.CountryID  = plModel.CountryCode;
        this.ZoneSelectControl1.ProvinceID = plModel.ProvinceID;
        this.ZoneSelectControl1.CityID     = plModel.CityID;
        this.ZoneSelectControl1.CountyID   = plModel.CountyID;
        txtContent.Text                    = plModel.description;
        txtRegistYear.Text                 = plModel.companydate.ToString("yyyy-MM-dd");
        ddlServiceType.SelectedValue       = plModel.servicetypeID.ToString();  //服务类型
        DropIndustry.SelectedValue         = plModel.institutionsID.ToString(); //机构类别
        txtEmployeeCount.Value             = plModel.Enterprisesize;            //企业规模
        txtRegistMoeny.Value               = plModel.funds;                     //注册资金
        txtTurnover.Value                  = plModel.turnover;                  //营业额
        rdlValiditeTerm.SelectedValue      = plModel.validityID.ToString();     //有效期
        txtAddress.Text                    = linkModel.Address;
        txtLinkMan.Text                    = linkModel.UserName;
        txtPhone.Text                      = linkModel.phone;
        txtCompany.Text                    = linkModel.CompanyName;
        txtClick.Text                      = inModel.clickId.ToString();
        txtEmail.Text                      = linkModel.Email;
        txtFax.Text = linkModel.Fax;

        string tel = linkModel.Tel;

        string[] telLen = tel.Split(new char[] { ',' });
        if (telLen.Length == 1)
        {
            txtTel.Text = linkModel.Tel;
        }
        else
        {
            txtcontactsTel.Text = telLen[0].ToString();
            txtTel.Text         = telLen[1].ToString();
            txttel2.Text        = telLen[2].ToString();
        }
        txtSite.Text     = linkModel.Site;
        txtWtitle.Text   = plModel.title;
        txtKeyword1.Text = plModel.keywords;
        txtWebDesr.Text  = plModel.webdescription;
        txtReTime.Text   = inModel.refreshTime.ToString("yyyy-MM-dd");
        //0未审核  1审核通过2审核未通过
        switch (int.Parse(inModel.auditId.ToString()))
        {
        case 0:
            rdAudit.Checked = true;
            Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", " ConAudit(0);", true);
            break;

        case 1:
            rdPass.Checked = true;
            Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", " ConAudit(1);", true);
            break;

        case 2:
            rdNopass.Checked = true;
            Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", " ConAudit(2);", true);
            break;

        case 4:
            rdDelete.Checked = true;
            rdPass.Enabled   = false;
            rdAudit.Enabled  = false;
            rdNopass.Enabled = false;
            Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", " ConAudit(0);", true);
            break;

        default:
            rdAudit.Checked = true;
            Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", " ConAudit(0);", true);
            break;
        }
        if (inModel.chargeId == 0)
        {
            rdomian.Checked = true;
            spShowPoint.Attributes.Add("style", "display:none");
        }
        else
        {
            rdoShou.Checked = true;
            spShowPoint.Attributes.Add("style", "display:''");
        }
    }
    //修改
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(this.txtTitle.Text))
        {
            Tz888.Common.MessageBox.Show(this.Page, "请填写标题!");
            return;
        }
        if (string.IsNullOrEmpty(this.ddlServiceType.SelectedValue))
        {
            Tz888.Common.MessageBox.Show(this.Page, "请选择服务大类!");
            return;
        }
        //if (string.IsNullOrEmpty(this.slServerMDrop.SelectedValue))
        //{
        //    Tz888.Common.MessageBox.Show(this.Page, "请选择服务小类!");
        //    return;
        //}
        if (string.IsNullOrEmpty(this.txtContent.Text))
        {
            Tz888.Common.MessageBox.Show(this.Page, "请填写说明!");
            return;
        }
        if (string.IsNullOrEmpty(this.txtCompany.Text))
        {
            Tz888.Common.MessageBox.Show(this.Page, "请填写单位名称!");
            return;
        }

        if (string.IsNullOrEmpty(this.txtLinkMan.Text))
        {
            Tz888.Common.MessageBox.Show(this.Page, "请填写申请人!");
            return;
        }
        if (txtTel.Text.Trim() == "" && txtPhone.Text.Trim() == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "联系人电话和手机至少填一个!");
            return;
        }
        else
        {
            if (txtTel.Text.Trim() != "")
            {
                if (!PageValidate.IsNumber(txtTel.Text.Trim()))
                {
                    Tz888.Common.MessageBox.Show(this.Page, "联系人电话格式错误!");
                    return;
                }
            }
        }
        if (txtEmail.Text.Trim() != "")
        {
            if (!PageValidate.IsEmail(txtEmail.Text.ToLower().Trim()))
            {
                Tz888.Common.MessageBox.Show(this.Page, "Email地址格式错误!");
                return;
            }
        }
        ProfessionalinfoTab MainInfo   = new ProfessionalinfoTab();
        Professionalview    viewInfo   = new Professionalview();
        ProfessionalLink    personInfo = new ProfessionalLink();

        if (!string.IsNullOrEmpty(Request.QueryString["ProfessionalID"]))
        {
            int ProfessionalID = int.Parse(Request.QueryString["ProfessionalID"].ToString());
            MainInfo.ProfessionalID = ProfessionalID;
        }
        MainInfo.Titel         = txtTitle.Text.Trim();
        viewInfo.CountryCode   = this.ZoneSelectControl1.CountryID;
        viewInfo.ProvinceID    = this.ZoneSelectControl1.ProvinceID;
        viewInfo.CityID        = this.ZoneSelectControl1.CityID;
        viewInfo.CountyID      = this.ZoneSelectControl1.CountyID;
        viewInfo.description   = txtContent.Text.Trim();
        viewInfo.validityID    = int.Parse(rdlValiditeTerm.SelectedValue.ToString());
        viewInfo.typeID        = int.Parse(ddlServiceType.SelectedValue.ToString());
        personInfo.Address     = txtAddress.Text.Trim();
        personInfo.CompanyName = txtCompany.Text.Trim();
        personInfo.Email       = txtEmail.Text.Trim();
        personInfo.Fax         = txtFax.Text.Trim();
        personInfo.phone       = txtPhone.Text.Trim();
        personInfo.Tel         = txtTel.Text.Trim();
        personInfo.UserName    = txtLinkMan.Text.Trim();
        personInfo.Site        = txtSite.Text.Trim();
        personInfo.phone       = txtPhone.Text.Trim();
        MainInfo.LoginName     = Page.User.Identity.Name;
        if (viewbll.UpdateProFessionlView(MainInfo, viewInfo, personInfo))
        {
            Response.Write("<script>alert('更新成功!');document.location='ServiesManage.aspx'</script>");
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "更新失败!");
        }
    }
Пример #8
0
        public int StaticHtml(int professionalid)
        {
            try
            {
                infoModel = infoBll.GetModel(professionalid);
                linkModel = linkBll.GetModel(professionalid);
                viewModel = viewBll.GetModel(professionalid);
                string TempFileName = CasesTem.ToString();
                string Tem          = Compage.Reader(TempFileName); //读取模板内容
                string TempSoure    = Tem;
                string ProviceName  = linkBll.GetProvinceNameByCode(viewModel.ProvinceID.ToString()).Trim();
                string typeName     = typeBll.GetModel(viewModel.typeID).typeName; //服务类别
                if (ProviceName.Trim() == "")
                {
                    ProviceName = "中国";
                }
                string systime = "";
                if (viewModel.validityID == 3)
                {
                    systime = "3个月";
                }
                else if (viewModel.validityID == 6)
                {
                    systime = "半年";
                }
                else if (viewModel.validityID == 12)
                {
                    systime = "1年";
                }
                else if (viewModel.validityID == 24)
                {
                    systime = "2年";
                }
                else if (viewModel.validityID == 36)
                {
                    systime = "3年";
                }
                else if (viewModel.validityID == 60)
                {
                    systime = "5年";
                }
                string price = string.Empty;
                if (infoModel.chargeId == 0)
                {
                    price = "免费资源";
                }
                else
                {
                    price = infoModel.price + "元";
                }
                string xiangxi = GetTop3Data(viewModel.ProvinceID.ToString());
                string desc    = Gettop6Data();
                TempSoure = TempSoure.Replace("$ProfessionalID$", infoModel.ProfessionalID.ToString().Trim());
                TempSoure = TempSoure.Replace("$title$", infoModel.Titel.ToString().Trim());
                TempSoure = TempSoure.Replace("$AreaName$", ProviceName);
                TempSoure = TempSoure.Replace("$typeName$", typeName);
                TempSoure = TempSoure.Replace("$publishT$", infoModel.creatgeDate.ToString().Substring(0, 9));
                TempSoure = TempSoure.Replace("$validateID$", systime);
                TempSoure = TempSoure.Replace("$Content1$", viewModel.description.ToString().Trim());
                TempSoure = TempSoure.Replace("$KeyWord$", viewModel.keywords.ToString().Trim());
                TempSoure = TempSoure.Replace("$DisplayTitle$", viewModel.title.ToString().Trim());
                TempSoure = TempSoure.Replace("$charge$", price);
                TempSoure = TempSoure.Replace("$CompanyName$", linkModel.CompanyName.ToString().Trim());
                //TempSoure = TempSoure.Replace("$Info$", xiangxi);
                TempSoure = TempSoure.Replace("$Content$", xiangxi);
                TempSoure = TempSoure.Replace("$Content2$", desc);
                string inPathTo = "/dservice";
                if (string.IsNullOrEmpty(infoModel.htmlUrl))
                {
                    infoModel.htmlUrl = "dservice/" + DateTime.Now.ToString("yyyyMM") + "/dservice" + DateTime.Now.ToString("yyyyMMdd") + "_" + professionalid + ".shtml";
                }
                string   htmlFile = infoModel.htmlUrl.ToString().Trim();
                string[] html     = htmlFile.Split('/');
                string[] nn       = html[2].Split('_');
                string   cc       = nn[0].Substring(nn[0].Length - 8);

                string folder = ProPath + html[1].Replace("dservice", "");
                if (Directory.Exists(folder) == false)
                {
                    Directory.CreateDirectory(folder);
                }
                string htmlpaths = folder + inPathTo + cc + "_" + professionalid + ".shtml";
                Compage.Writer(htmlpaths, TempSoure);
                return(1);
            }
            catch (Exception)
            {
                return(0);
            }
        }
Пример #9
0
    protected void btnOk_Click(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(this.txtTitle.Text))
        {
            Tz888.Common.MessageBox.Show(this.Page, "请填写标题!");
            return;
        }

        if (this.DropIndustry.SelectedValue == "" || this.DropIndustry.SelectedValue == "0")
        {
            Tz888.Common.MessageBox.Show(this.Page, "行业不能为空!");
            return;
        }
        if (this.ddlServiceType.SelectedValue == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "服务类别不能为空!");
            return;
        }
        if (txtEmployeeCount.Value != "")
        {
            if (!PageValidate.IsNumber(txtEmployeeCount.Value))
            {
                Tz888.Common.MessageBox.Show(this.Page, "企业规模请填写数字!");
                return;
            }
        }
        if (txtRegistMoeny.Value != "")
        {
            if (!PageValidate.IsNumber(txtRegistMoeny.Value))
            {
                Tz888.Common.MessageBox.Show(this.Page, "注册资金请填写数字!");
                return;
            }
        }
        //if (txtRegistYear.Text == "")
        //{
        //    Tz888.Common.MessageBox.Show(this.Page, "创建时间请填写!");
        //    return;

        //}
        if (txtTurnover.Value != "")
        {
            if (!PageValidate.IsNumber(txtTurnover.Value))
            {
                Tz888.Common.MessageBox.Show(this.Page, "营业额请填写数字!");
                return;
            }
        }

        if (txtLinkMan.Value.Trim() == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "联系人不能为空!");
            return;
        }
        if (txtCompanyName.Value.Trim() == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "公司名称不能为空!");
            return;
        }
        //if (txtLinkTel.Value.Trim() == "")
        //{
        //    Tz888.Common.MessageBox.Show(this.Page, "联系人电话不能为空!");
        //    return;
        //}
        if (txtLinkTel.Value.Trim() == "" && txtPhone.Text.Trim() == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "联系人电话和手机至少填一个!");
            return;
        }
        else
        {
            if (txtLinkTel.Value.Trim() != "")
            {
                if (!PageValidate.IsNumber(txtLinkTel.Value.Trim()))
                {
                    Tz888.Common.MessageBox.Show(this.Page, "联系人电话格式错误!");
                    return;
                }
            }
        }
        if (txtEmail.Value.Trim() != "")
        {
            if (!PageValidate.IsEmail(txtEmail.Value.ToLower().Trim()))
            {
                Tz888.Common.MessageBox.Show(this.Page, "Email地址格式错误!");
                return;
            }
        }
        ProfessionalPlease  please   = new ProfessionalPlease();
        ProfessionalinfoTab MainInfo = new ProfessionalinfoTab();

        if (!string.IsNullOrEmpty(Request.QueryString["ProfessionalID"]))
        {
            int ProfessionalID = int.Parse(Request.QueryString["ProfessionalID"].ToString());
            MainInfo.ProfessionalID = ProfessionalID;
        }
        ProfessionalLink link = new ProfessionalLink();

        please.CountryCode    = this.ZoneSelectControl1.CountryID;
        please.ProvinceID     = this.ZoneSelectControl1.ProvinceID;
        please.CityID         = this.ZoneSelectControl1.CityID;
        please.CountyID       = this.ZoneSelectControl1.CountyID;
        please.description    = txtBusinesDetails.Text.Trim();
        please.companydate    = Convert.ToDateTime(txtRegistYear.Text.Trim().ToString());
        please.servicetypeID  = int.Parse(ddlServiceType.SelectedValue.ToString());  //服务类型
        please.institutionsID = int.Parse(DropIndustry.SelectedValue.ToString());    //机构类别
        please.Enterprisesize = txtEmployeeCount.Value.Trim();                       //企业规模
        please.funds          = txtRegistMoeny.Value.Trim();                         //注册资金
        please.turnover       = txtTurnover.Value.Trim();                            //营业额
        please.validityID     = int.Parse(rdlValiditeTerm.SelectedValue.ToString()); //有效期
        link.CompanyName      = txtCompanyName.Value.Trim();
        link.Email            = txtEmail.Value.Trim();
        link.Fax           = txtLinkFax.Value.Trim();
        link.Tel           = txtLinkTel.Value.Trim();
        link.UserName      = txtLinkMan.Value.Trim();
        link.Site          = txtWebSite.Value.Trim();
        link.Address       = txtAddress.Text.Trim();
        link.phone         = txtPhone.Text.Trim();
        MainInfo.Titel     = txtTitle.Text.Trim();
        MainInfo.LoginName = Page.User.Identity.Name;
        if (plBll.UpdateProFessionlView(MainInfo, please, link))
        {
            Response.Write("<script>alert('修改成功!');document.location='ServiesManage.aspx'</script>");
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "修改失败!");
        }
    }
Пример #10
0
    protected void databindList(int ProfessionalID)
    {
        Professionaltalents plModel   = plBll.GetModel(ProfessionalID);
        ProfessionalLink    linkModel = linkBll.GetModel(ProfessionalID);
        ProfessionalinfoTab inModel   = infoBll.GetModel(ProfessionalID);

        txtTitle.Text = inModel.Titel.ToString();
        txtPrice.Text = inModel.price.ToString();
        if (!string.IsNullOrEmpty(plModel.Images))
        {
            if (plModel.Images.Equals("/dservice/image/photo.jpg"))
            {
                ViewState["flag"] = "true"; //默认图片
            }
            else
            {
                ViewState["strSavePath"] = plModel.Images;
            }
            Image1.ImageUrl = "http://www.topfo.com" + plModel.Images;

            //Image1.ImageUrl = "F:/Topfo" + plModel.Images;////本地
            imageDis.Attributes.Add("style", "display:''");
        }
        else
        {
            //DateTime Now = DateTime.Now;
            ViewState["strSavePath"] = "/dservice/image/photo.jpg";
            //ViewState["strSavePath"] = "/dservice/image/" + Now.Year.ToString() + "/" + Now.Year.ToString() + Now.Month.ToString() + Now.Day.ToString() +
            //   Now.Hour.ToString() + Now.Minute.ToString() + Now.Second.ToString() + ".jpg";
            imageDis.Attributes.Add("style", "display:none");
        }

        this.ZoneSelectControl1.CountryID  = plModel.CountryCode;
        this.ZoneSelectControl1.ProvinceID = plModel.ProvinceID;
        this.ZoneSelectControl1.CityID     = plModel.CityID;
        this.ZoneSelectControl1.CountyID   = plModel.CountyID;
        txtRegistYear.Text            = plModel.companydate.ToString("yyyy-MM-dd");
        txtPosition.Value             = plModel.position;                 //职务
        DropIndustry.SelectedValue    = plModel.talentsTypeID.ToString(); //人才类别
        txtRegistYear.Text            = plModel.companydate.ToString("yyyy-MM-dd");
        txtresume.Text                = plModel.resume;                   //个人简历
        txtspecialty.Text             = plModel.specialty;                //个人特长
        txtSuccess.Text               = plModel.ScuccCase;                //成功案例
        ddlServiceType.SelectedValue  = plModel.servicetypeID.ToString(); //服务类型
        rdlValiditeTerm.SelectedValue = plModel.validityID.ToString();    //有效期
        txtAddress.Text               = linkModel.Address;
        txtLinkMan.Text               = linkModel.UserName;
        txtPhone.Text         = linkModel.phone;
        txtCompany.Text       = linkModel.CompanyName;
        txtClick.Text         = inModel.clickId.ToString();
        txtEmail.Text         = linkModel.Email;
        txtFax.Text           = linkModel.Fax;
        tbAuditingRemark.Text = inModel.FeedBackNote;
        string tel = linkModel.Tel;

        string[] telLen = tel.Split(new char[] { ',' });
        if (telLen.Length == 1)
        {
            txtTel.Text = linkModel.Tel;
        }
        else
        {
            txtcontactsTel.Text = telLen[0].ToString();
            txtTel.Text         = telLen[1].ToString();
            txttel2.Text        = telLen[2].ToString();
        }

        txtSite.Text     = linkModel.Site;
        txtWtitle.Text   = plModel.title;
        txtKeyword1.Text = plModel.keywords;
        txtWebDesr.Text  = plModel.Webdescription;
        txtReTime.Text   = inModel.refreshTime.ToString("yyyy-MM-dd");
        //0未审核  1审核通过2审核未通过
        switch (int.Parse(inModel.auditId.ToString()))
        {
        case 0:
            rdAudit.Checked = true;
            Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", " ConAudit(0);", true);
            break;

        case 1:
            rdPass.Checked = true;
            Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", " ConAudit(1);", true);
            break;

        case 2:
            rdNopass.Checked = true;
            Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", " ConAudit(2);", true);
            break;

        case 4:
            rdDelete.Checked = true;
            rdPass.Enabled   = false;
            rdAudit.Enabled  = false;
            rdNopass.Enabled = false;
            Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", " ConAudit(0);", true);
            break;

        default:
            rdAudit.Checked = true;
            Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", " ConAudit(0);", true);
            break;
        }
        if (inModel.chargeId == 0)
        {
            rdomian.Checked = true;
            spShowPoint.Attributes.Add("style", "display:none");
        }
        else
        {
            rdoShou.Checked = true;
            spShowPoint.Attributes.Add("style", "display:''");
        }
    }
Пример #11
0
 /// <summary>
 /// 插入一条专业服务数据
 /// </summary>
 /// <returns></returns>
 public bool InsertProFessionlView(ProfessionalinfoTab mainInfo, Professionalview viewInfo, ProfessionalLink link)
 {
     return(viewIdal.InsertProFessionlView(mainInfo, viewInfo, link));
 }
Пример #12
0
        public int StaticHtml(int professionalid)
        {
            try
            {
                infoModel = infoBll.GetModel(professionalid);
                linkModel = linkBll.GetModel(professionalid);
                plModel   = viewBll.GetModel(professionalid);
                string TempFileName = CasesTem.ToString();
                string Tem          = Compage.Reader(TempFileName);                                                                         //读取模板内容
                string TempSoure    = Tem;
                string ProviceName  = linkBll.GetProvinceNameByCode(plModel.ProvinceID.ToString()).Trim();                                  //区域
                string typeName     = typeBll.GetList("institutionsID=" + plModel.institutionsID).Tables[0].Rows[0]["TypeName"].ToString(); //机构类别
                if (ProviceName.Trim() == "")
                {
                    ProviceName = "中国";
                }

                string price = string.Empty;
                if (infoModel.chargeId == 0)
                {
                    price = "免费资源";
                }
                else
                {
                    price = infoModel.price + "元";
                }
                string xiangxi = GetTop3Data(plModel.ProvinceID.ToString());
                string desc    = Gettop6Data();
                TempSoure = TempSoure.Replace("$ProfessionalID$", infoModel.ProfessionalID.ToString().Trim());
                TempSoure = TempSoure.Replace("$title$", infoModel.Titel.ToString().Trim());
                TempSoure = TempSoure.Replace("$AreaName$", ProviceName);
                TempSoure = TempSoure.Replace("$typeName$", typeName);
                TempSoure = TempSoure.Replace("$Enterprisesize$", plModel.Enterprisesize);                 //企业规模
                TempSoure = TempSoure.Replace("$funds$", plModel.funds);                                   //注册资金
                TempSoure = TempSoure.Replace("$CreateTime$", plModel.companydate.ToString("yyyy-MM-dd")); //创建时间
                TempSoure = TempSoure.Replace("$turnover$", plModel.turnover);                             //营业额
                TempSoure = TempSoure.Replace("$charge$", price);                                          //资源类型
                TempSoure = TempSoure.Replace("$Content1$", plModel.description.ToString());
                TempSoure = TempSoure.Replace("$KeyWord$", plModel.keywords.ToString().Trim());
                TempSoure = TempSoure.Replace("$DisplayTitle$", plModel.title.ToString().Trim());

                //TempSoure = TempSoure.Replace("$CompanyName$", linkModel.CompanyName.ToString().Trim());
                TempSoure = TempSoure.Replace("$Content$", xiangxi);//相关项目信息
                TempSoure = TempSoure.Replace("$Content2$", desc);
                string inPathTo = "/dservice";
                if (string.IsNullOrEmpty(infoModel.htmlUrl))
                {
                    infoModel.htmlUrl = "dservice/" + DateTime.Now.ToString("yyyyMM") + "/dservice" + DateTime.Now.ToString("yyyyMMdd") + "_" + professionalid + ".shtml";
                }
                string   htmlFile = infoModel.htmlUrl.ToString().Trim();
                string[] html     = htmlFile.Split('/');
                string[] nn       = html[2].Split('_');
                string   cc       = nn[0].Substring(nn[0].Length - 8);

                string folder = ProPath + html[1].Replace("dservice", "");
                if (Directory.Exists(folder) == false)
                {
                    Directory.CreateDirectory(folder);
                }
                string htmlpaths = folder + inPathTo + cc + "_" + professionalid + ".shtml";
                Compage.Writer(htmlpaths, TempSoure);
                return(1);
            }
            catch (Exception)
            {
                return(0);
            }
        }
        /// <summary>
        /// 修改一条专业人才数据
        /// </summary>
        /// <returns></returns>
        public bool UpdateProFessionlView(ProfessionalinfoTab mainInfo, Professionaltalents viewInfo, ProfessionalLink link)
        {
            int result = 0;

            SqlParameter[] parameters =
            {
                new SqlParameter("@Title",          SqlDbType.VarChar,    200),
                new SqlParameter("@LoginName",      SqlDbType.VarChar,     50),
                new SqlParameter("@typeID",         SqlDbType.Int,          4),
                new SqlParameter("@htmlUrl",        SqlDbType.VarChar,    200),
                new SqlParameter("@formID",         SqlDbType.Int,          4),
                new SqlParameter("@recommendID",    SqlDbType.Int,          4), //6


                new SqlParameter("@CountryCode",    SqlDbType.VarChar,     10),
                new SqlParameter("@ProvinceID",     SqlDbType.VarChar,     10),
                new SqlParameter("@CityID",         SqlDbType.VarChar,     10),
                new SqlParameter("@CountyID",       SqlDbType.VarChar,     10),

                new SqlParameter("@position",       SqlDbType.VarChar,     20),
                new SqlParameter("@servicetypeID",  SqlDbType.Int,          4),
                new SqlParameter("@talentsTypeID",  SqlDbType.Int,          4),
                new SqlParameter("@resume",         SqlDbType.NVarChar,  2000),
                new SqlParameter("@specialty",      SqlDbType.NVarChar,  2000),
                new SqlParameter("@ScuccCase",      SqlDbType.NVarChar,  2000),
                new SqlParameter("@companydate",    SqlDbType.DateTime),

                new SqlParameter("@validityID",     SqlDbType.Int,          4),
                new SqlParameter("@Webtitle",       SqlDbType.VarChar,     50),
                new SqlParameter("@keywords",       SqlDbType.VarChar,     50),
                new SqlParameter("@Webdescription", SqlDbType.VarChar,     50), //21

                new SqlParameter("@UserName",       SqlDbType.VarChar,    100),
                new SqlParameter("@CompanyName",    SqlDbType.VarChar,    100),
                new SqlParameter("@Address",        SqlDbType.VarChar,    100),
                new SqlParameter("@Tel",            SqlDbType.VarChar,     50),
                new SqlParameter("@phone",          SqlDbType.VarChar,     50),
                new SqlParameter("@Fax",            SqlDbType.VarChar,     50),
                new SqlParameter("@Email",          SqlDbType.VarChar,     50),
                new SqlParameter("@Site",           SqlDbType.VarChar,     50),
                new SqlParameter("@price",          SqlDbType.Decimal,     18), //9

                new SqlParameter("@auditID",        SqlDbType.Int,          4),
                new SqlParameter("@chargeID",       SqlDbType.Int,          4),
                new SqlParameter("@stateId",        SqlDbType.Int,          4),
                new SqlParameter("@clickId",        SqlDbType.Int,          4),
                new SqlParameter("@refurbishtime",  SqlDbType.DateTime),        //5
                new SqlParameter("@images",         SqlDbType.VarChar,    100), //9
                new SqlParameter("@FeedBackNote",   SqlDbType.NVarChar,  1000),
                new SqlParameter("@flag",           SqlDbType.VarChar,     20),
                new SqlParameter("@ProfessionalID", SqlDbType.Int, 4) //2
            };
            parameters[0].Value  = mainInfo.Titel;
            parameters[1].Value  = mainInfo.LoginName;
            parameters[2].Value  = mainInfo.typeID;
            parameters[3].Value  = mainInfo.htmlUrl;
            parameters[4].Value  = mainInfo.FromId;
            parameters[5].Value  = mainInfo.recommendId;
            parameters[6].Value  = viewInfo.CountryCode;
            parameters[7].Value  = viewInfo.ProvinceID;
            parameters[8].Value  = viewInfo.CityID;
            parameters[9].Value  = viewInfo.CountyID;
            parameters[10].Value = viewInfo.position;
            parameters[11].Value = viewInfo.servicetypeID;
            parameters[12].Value = viewInfo.talentsTypeID;
            parameters[13].Value = viewInfo.resume;
            parameters[14].Value = viewInfo.specialty;
            parameters[15].Value = viewInfo.ScuccCase;
            parameters[16].Value = viewInfo.companydate;

            parameters[17].Value = viewInfo.validityID;
            parameters[18].Value = viewInfo.title;
            parameters[19].Value = viewInfo.keywords;
            parameters[20].Value = viewInfo.Webdescription;
            parameters[21].Value = link.UserName;
            parameters[22].Value = link.CompanyName;
            parameters[23].Value = link.Address;
            parameters[24].Value = link.Tel;
            parameters[25].Value = link.phone;
            parameters[26].Value = link.Fax;
            parameters[27].Value = link.Email;
            parameters[28].Value = link.Site;
            parameters[29].Value = mainInfo.price;

            parameters[30].Value = mainInfo.auditId;
            parameters[31].Value = mainInfo.chargeId;
            parameters[32].Value = mainInfo.stateId;
            parameters[33].Value = mainInfo.clickId;
            parameters[34].Value = mainInfo.refreshTime;
            parameters[35].Value = viewInfo.Images;
            parameters[36].Value = mainInfo.FeedBackNote;
            parameters[37].Value = "UpdateManage";
            parameters[38].Value = mainInfo.ProfessionalID;
            return(DbHelperSQL.RunProcLob("Professionaltalentstab_insert", parameters));
        }
Пример #14
0
        /// <summary>
        /// 插入一条专业服务数据
        /// </summary>
        /// <returns></returns>
        public bool InsertProFessionlView(ProfessionalinfoTab mainInfo, ProfessionalPlease viewInfo, ProfessionalLink link)
        {
            int result = 0;

            SqlParameter[] parameters =
            {
                new SqlParameter("@Title",          SqlDbType.VarChar,   200),
                new SqlParameter("@LoginName",      SqlDbType.VarChar,    50),
                new SqlParameter("@typeID",         SqlDbType.Int,         4),
                new SqlParameter("@htmlUrl",        SqlDbType.VarChar,   200),
                new SqlParameter("@formID",         SqlDbType.Int,         4),
                new SqlParameter("@recommendID",    SqlDbType.Int,         4), //6


                new SqlParameter("@CountryCode",    SqlDbType.VarChar,    10),
                new SqlParameter("@ProvinceID",     SqlDbType.VarChar,    10),
                new SqlParameter("@CityID",         SqlDbType.VarChar,    10),
                new SqlParameter("@CountyID",       SqlDbType.VarChar,    10),
                new SqlParameter("@servicetypeID",  SqlDbType.Int,         4),

                new SqlParameter("@validityID",     SqlDbType.Int,         4),
                new SqlParameter("@description",    SqlDbType.NVarChar, 2000),
                new SqlParameter("@Webtitle",       SqlDbType.VarChar,    50),
                new SqlParameter("@keywords",       SqlDbType.VarChar,    50),
                new SqlParameter("@Webdescription", SqlDbType.VarChar,    50), //10

                new SqlParameter("@UserName",       SqlDbType.VarChar,   100),
                new SqlParameter("@CompanyName",    SqlDbType.VarChar,   100),
                new SqlParameter("@Address",        SqlDbType.VarChar,   100),
                new SqlParameter("@Tel",            SqlDbType.VarChar,    50),
                new SqlParameter("@phone",          SqlDbType.VarChar,    50),
                new SqlParameter("@Fax",            SqlDbType.VarChar,    50),
                new SqlParameter("@Email",          SqlDbType.VarChar,    50),
                new SqlParameter("@Site",           SqlDbType.VarChar,    50),
                new SqlParameter("@price",          SqlDbType.Decimal,    18), //9

                new SqlParameter("@institutionsID", SqlDbType.Int,         4),
                new SqlParameter("@Enterprisesize", SqlDbType.NVarChar, 2000),
                new SqlParameter("@funds",          SqlDbType.VarChar,    50),
                new SqlParameter("@turnover",       SqlDbType.VarChar,    50),
                new SqlParameter("@companyDate",    SqlDbType.DateTime) //5
            };
            parameters[0].Value  = mainInfo.Titel;
            parameters[1].Value  = mainInfo.LoginName;
            parameters[2].Value  = mainInfo.typeID;
            parameters[3].Value  = mainInfo.htmlUrl;
            parameters[4].Value  = mainInfo.FromId;
            parameters[5].Value  = mainInfo.recommendId;
            parameters[6].Value  = viewInfo.CountryCode;
            parameters[7].Value  = viewInfo.ProvinceID;
            parameters[8].Value  = viewInfo.CityID;
            parameters[9].Value  = viewInfo.CountyID;
            parameters[10].Value = viewInfo.servicetypeID;
            parameters[11].Value = viewInfo.validityID;
            parameters[12].Value = viewInfo.description;
            parameters[13].Value = viewInfo.title;
            parameters[14].Value = viewInfo.keywords;
            parameters[15].Value = viewInfo.description;
            parameters[16].Value = link.UserName;
            parameters[17].Value = link.CompanyName;
            parameters[18].Value = link.Address;
            parameters[19].Value = link.Tel;
            parameters[20].Value = link.phone;
            parameters[21].Value = link.Fax;
            parameters[22].Value = link.Email;
            parameters[23].Value = link.Site;
            parameters[24].Value = mainInfo.price;

            parameters[25].Value = viewInfo.institutionsID;
            parameters[26].Value = viewInfo.Enterprisesize;
            parameters[27].Value = viewInfo.funds;
            parameters[28].Value = viewInfo.turnover;
            parameters[29].Value = viewInfo.companydate;
            return(DbHelperSQL.RunProcLob("ProfessionalPleasetab_insert", parameters));
        }
Пример #15
0
    protected void btnOk_Click(object sender, EventArgs e)
    {
        if (string.IsNullOrEmpty(this.txtTitle.Text))
        {
            Tz888.Common.MessageBox.Show(this.Page, "请填写标题!");
            return;
        }

        if (this.DropIndustry.SelectedValue == "" || this.DropIndustry.SelectedValue == "0")
        {
            Tz888.Common.MessageBox.Show(this.Page, "请选择人才类别!");
            return;
        }
        if (this.ddlServiceType.SelectedValue == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "服务类型不能为空!");
            return;
        }
        //if (!string.IsNullOrEmpty(uploadPic.FileName))
        //{
        //    string fileName1 = uploadPic.FileName;
        //    string extendName = fileName1.ToLower().Substring(fileName1.LastIndexOf("."));
        //    if (extendName != ".bmp" && extendName != ".gif" && extendName != ".jpg")
        //    {
        //        Tz888.Common.MessageBox.Show(this.Page, "只能上传|jpg|gif|bmp|格式的图片!");
        //        return;
        //    }
        //}
        if (txtPosition.Value == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "职务不能为空!");
            return;
        }
        if (txtLinkMan.Value.Trim() == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "联系人不能为空!");
            return;
        }
        if (txtCompanyName.Value.Trim() == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "公司名称不能为空!");
            return;
        }
        if (txtLinkTel.Text.Trim() == "" && txtPhone.Text.Trim() == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "联系人电话和手机至少填一个!");
            return;
        }
        else
        {
            if (txtLinkTel.Text.Trim() != "")
            {
                if (!PageValidate.IsNumber(txtLinkTel.Text.Trim()))
                {
                    Tz888.Common.MessageBox.Show(this.Page, "联系人电话格式错误!");
                    return;
                }
            }
        }

        if (txtEmail.Value.Trim() == "")
        {
            Tz888.Common.MessageBox.Show(this.Page, "Email不能为空!!");
            return;
        }
        if (txtEmail.Value.Trim() != "")
        {
            if (!PageValidate.IsEmail(txtEmail.Value.ToLower().Trim()))
            {
                Tz888.Common.MessageBox.Show(this.Page, "Email地址格式错误!");
                return;
            }
        }
        Professionaltalents please   = new Professionaltalents();
        ProfessionalinfoTab MainInfo = new ProfessionalinfoTab();
        ProfessionalLink    link     = new ProfessionalLink();


        if (!string.IsNullOrEmpty(Request.QueryString["ProfessionalID"]))
        {
            int ProfessionalID = int.Parse(Request.QueryString["ProfessionalID"].ToString());
            MainInfo.ProfessionalID = ProfessionalID;
        }
        if (!string.IsNullOrEmpty(ViewState["strSavePath"].ToString()))
        {
            please.Images = ViewState["strSavePath"].ToString();
        }
        else
        {
            please.Images = "/dservice/image/photo.jpg";
        }
        please.CountryCode   = this.ZoneSelectControl1.CountryID;
        please.ProvinceID    = this.ZoneSelectControl1.ProvinceID;
        please.CityID        = this.ZoneSelectControl1.CityID;
        please.CountyID      = this.ZoneSelectControl1.CountyID;
        please.companydate   = Convert.ToDateTime(DateTime.Now.ToString()); //Convert.ToDateTime(txtRegistYear.Text.Trim().ToString());
        please.position      = txtPosition.Value.Trim();
        please.title         = "";
        please.servicetypeID = int.Parse(ddlServiceType.SelectedValue.ToString());  //服务类型
        please.talentsTypeID = int.Parse(DropIndustry.SelectedValue.ToString());    //人才类别
        please.resume        = txtresume.Text;                                      //个人简历
        please.specialty     = txtspecialty.Text;                                   //个人特长
        please.ScuccCase     = txtSuccess.Text;                                     //成功案例
        please.validityID    = int.Parse(rdlValiditeTerm.SelectedValue.ToString()); //有效期
        link.CompanyName     = txtCompanyName.Value.Trim();
        link.Email           = txtEmail.Value.Trim();
        link.Fax             = txtLinkFax.Value.Trim();
        string tel = string.Empty;

        if (!string.IsNullOrEmpty(txtcontactsTel.Text.Trim()))
        {
            tel = txtcontactsTel.Text.Trim() + ",";
        }
        else
        {
            tel = ",";
        }
        if (!string.IsNullOrEmpty(txtLinkTel.Text.Trim()))
        {
            tel += txtLinkTel.Text.Trim() + ",";
        }
        else
        {
            tel += ",";
        }
        if (!string.IsNullOrEmpty(txttel2.Text.Trim()))
        {
            tel += txttel2.Text.Trim() + ",";
        }
        else
        {
            tel += ",";
        }
        link.Tel             = tel;
        link.UserName        = txtLinkMan.Value.Trim();
        link.Site            = txtWebSite.Value.Trim();
        link.phone           = txtPhone.Text.Trim();
        link.Address         = txtAddress.Text.Trim();
        MainInfo.LoginName   = Page.User.Identity.Name;
        MainInfo.Titel       = txtTitle.Text.Trim();
        MainInfo.typeID      = 3;
        MainInfo.htmlUrl     = "";
        MainInfo.FromId      = 1;
        MainInfo.recommendId = 0;
        MainInfo.price       = 0;
        if (plBll.InsertProFessionlView(MainInfo, please, link))
        {
            Response.Write("<script>alert('发布成功!');document.location='ServiesManage.aspx'</script>");
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "发布失败!");
        }
    }
Пример #16
0
        public bool UpdateProFessionlView(ProfessionalinfoTab mainInfo, Professionalview viewInfo, ProfessionalLink link)
        {
            int result = 0;

            SqlParameter[] parameters =
            {
                new SqlParameter("@Title",          SqlDbType.VarChar,   200),
                new SqlParameter("@LoginName",      SqlDbType.VarChar,    50),
                new SqlParameter("@typeID",         SqlDbType.Int,         4),
                new SqlParameter("@htmlUrl",        SqlDbType.VarChar,   200),
                new SqlParameter("@formID",         SqlDbType.Int,         4),
                new SqlParameter("@recommendID",    SqlDbType.Int,         4), //6


                new SqlParameter("@CountryCode",    SqlDbType.VarChar,    10),
                new SqlParameter("@ProvinceID",     SqlDbType.VarChar,    10),
                new SqlParameter("@CityID",         SqlDbType.VarChar,    10),
                new SqlParameter("@CountyID",       SqlDbType.VarChar,    10),
                new SqlParameter("@typeID1",        SqlDbType.Int,         4),
                new SqlParameter("@validityID",     SqlDbType.Int,         4),
                new SqlParameter("@description",    SqlDbType.NVarChar, 2000),
                new SqlParameter("@Webtitle",       SqlDbType.VarChar,    50),
                new SqlParameter("@keywords",       SqlDbType.VarChar,    50),
                new SqlParameter("@Webdescription", SqlDbType.VarChar,    50), //10

                new SqlParameter("@UserName",       SqlDbType.VarChar,   100),
                new SqlParameter("@CompanyName",    SqlDbType.VarChar,   100),
                new SqlParameter("@Address",        SqlDbType.VarChar,   100),
                new SqlParameter("@Tel",            SqlDbType.VarChar,    50),
                new SqlParameter("@phone",          SqlDbType.VarChar,    50),
                new SqlParameter("@Fax",            SqlDbType.VarChar,    50),
                new SqlParameter("@Email",          SqlDbType.VarChar,    50),
                new SqlParameter("@Site",           SqlDbType.VarChar,    50), //8
                new SqlParameter("@price",          SqlDbType.Decimal,    18), //1

                new SqlParameter("@flag",           SqlDbType.VarChar,    20),
                new SqlParameter("@ProfessionalID", SqlDbType.Int, 4) //2
            };
            parameters[0].Value  = mainInfo.Titel;
            parameters[1].Value  = mainInfo.LoginName;
            parameters[2].Value  = mainInfo.typeID;
            parameters[3].Value  = mainInfo.htmlUrl;
            parameters[4].Value  = mainInfo.FromId;
            parameters[5].Value  = mainInfo.recommendId;
            parameters[6].Value  = viewInfo.CountryCode;
            parameters[7].Value  = viewInfo.ProvinceID;
            parameters[8].Value  = viewInfo.CityID;
            parameters[9].Value  = viewInfo.CountyID;
            parameters[10].Value = viewInfo.typeID;
            parameters[11].Value = viewInfo.validityID;
            parameters[12].Value = viewInfo.description;
            parameters[13].Value = viewInfo.title;
            parameters[14].Value = viewInfo.keywords;
            parameters[15].Value = viewInfo.Webdescription;
            parameters[16].Value = link.UserName;
            parameters[17].Value = link.CompanyName;
            parameters[18].Value = link.Address;
            parameters[19].Value = link.Tel;
            parameters[20].Value = link.phone;
            parameters[21].Value = link.Fax;
            parameters[22].Value = link.Email;
            parameters[23].Value = link.Site;
            parameters[24].Value = mainInfo.price;
            parameters[25].Value = "Update";
            parameters[26].Value = mainInfo.ProfessionalID;
            return(DbHelperSQL.RunProcLob("Professionalviewtab_insert", parameters));
        }
Пример #17
0
        public int StaticHtml(int professionalid)
        {
            try
            {
                infoModel = infoBll.GetModel(professionalid);
                linkModel = linkBll.GetModel(professionalid);
                plModel   = viewBll.GetModel(professionalid);
                string TempFileName = CasesTem.ToString();
                string Tem          = Compage.Reader(TempFileName);                                                                   //读取模板内容
                string TempSoure    = Tem;
                string ProviceName  = linkBll.GetProvinceNameByCode(plModel.ProvinceID.ToString()).Trim();                            //区域
                //string typeName = typeBll.GetList("institutionsID=" + plModel.institutionsID).Tables[0].Rows[0]["TypeName"].ToString();   //机构类别
                string typeName    = talentsType.GetList("typeID=" + plModel.talentsTypeID).Tables[0].Rows[0]["TypeName"].ToString(); //人才类别
                string Servicetype = typeBll1.GetModel(int.Parse(plModel.servicetypeID.ToString())).typeName;
                if (ProviceName.Trim() == "")
                {
                    ProviceName = "中国";
                }

                string price = string.Empty;
                if (infoModel.chargeId == 0)
                {
                    price = "免费资源";
                }
                else
                {
                    price = infoModel.price + "元";
                }
                string xiangxi = GetTop3Data(plModel.ProvinceID.ToString());
                string desc    = Gettop6Data();
                TempSoure = TempSoure.Replace("$ProfessionalID$", infoModel.ProfessionalID.ToString().Trim());
                TempSoure = TempSoure.Replace("$title$", linkModel.UserName.ToString());
                TempSoure = TempSoure.Replace("$AreaName$", ProviceName);
                TempSoure = TempSoure.Replace("$type$", typeName);
                TempSoure = TempSoure.Replace("$typeName$", Servicetype);
                TempSoure = TempSoure.Replace("$position$", plModel.position.ToString());
                TempSoure = TempSoure.Replace("$resume$ ", plModel.resume.ToString());
                TempSoure = TempSoure.Replace("$CreateTime$", plModel.companydate.ToString("yyyy-MM-dd"));//创建时间
                TempSoure = TempSoure.Replace("$specialty$", plModel.specialty.ToString());
                TempSoure = TempSoure.Replace("$ScuccCase$ ", plModel.ScuccCase.ToString());
                TempSoure = TempSoure.Replace("$KeyWord$", plModel.keywords.ToString().Trim());
                TempSoure = TempSoure.Replace("$DisplayTitle$", plModel.title.ToString().Trim());
                TempSoure = TempSoure.Replace("$image$", "http://www.topfo.com" + plModel.Images.ToString().Trim());
                TempSoure = TempSoure.Replace("$CompanyName$", linkModel.CompanyName.ToString().Trim());
                TempSoure = TempSoure.Replace("$Content$", xiangxi);//相关项目信息
                TempSoure = TempSoure.Replace("$Content2$", desc);
                string inPathTo = "/dservice";
                if (string.IsNullOrEmpty(infoModel.htmlUrl))
                {
                    infoModel.htmlUrl = "dservice/" + DateTime.Now.ToString("yyyyMM") + "/dservice" + DateTime.Now.ToString("yyyyMMdd") + "_" + professionalid + ".shtml";
                }
                string   htmlFile = infoModel.htmlUrl.ToString().Trim();
                string[] html     = htmlFile.Split('/');
                string[] nn       = html[2].Split('_');
                string   cc       = nn[0].Substring(nn[0].Length - 8);

                string folder = ProPath + html[1].Replace("dservice", "");
                if (Directory.Exists(folder) == false)
                {
                    Directory.CreateDirectory(folder);
                }
                string htmlpaths = folder + inPathTo + cc + "_" + professionalid + ".shtml";
                Compage.Writer(htmlpaths, TempSoure);
                return(1);
            }
            catch (Exception)
            {
                return(0);
            }
        }