private void setInfo() { // 公司信息 using (BLLCompanyInformationDetails bll = new BLLCompanyInformationDetails()) { if (type == 0) { type = 5; } string[] fileds = new string[] { "CompanyInformationTypeID", "IsEnglish" }; object[] values = new object[] { type, 1 }; // 公司简介 CompanyInformationDetails cpinfor = bll.GetSingle(fileds, values); if (cpinfor != null) { companyintroduce.Text = cpinfor.CompanyInformationDetail; } else { } } using (BLLCompanyInformationType bll = new BLLCompanyInformationType()) { string[] fileds = new string[] { "CompanyInformationTypeID", "IsEnglish" }; object[] values = new object[] { type, 1 }; CompanyInformationType contype = bll.GetSingle(type); if (contype != null) { Title = contype.CompanyInformationName; } } }
private void setInfo() { // 公司信息 using (BLLCompanyInformationDetails bll = new BLLCompanyInformationDetails()) { if (type == 5) { qianzhui.Text = "公司"; houzhui.Text = "介绍"; yingwen.Text = "ABOUT US"; } else if (type == 58) { qianzhui.Text = "人才"; houzhui.Text = "招聘"; yingwen.Text = "Recruitment of talents"; } else if (type == 62) { qianzhui.Text = "企业"; houzhui.Text = "文化"; yingwen.Text = "BUSINESS CULTURE;"; } else if (type == 44) { qianzhui.Text = "联系"; houzhui.Text = "我们"; yingwen.Text = "CONTACT US"; } else { type = 5; qianzhui.Text = "公司"; houzhui.Text = "简介"; yingwen.Text = "ABOUT US"; } string[] fileds = new string[] { "CompanyInformationTypeID", "IsEnglish" }; object[] values = new object[] { type, 1 }; // 公司简介 CompanyInformationDetails cpinfor = bll.GetSingle(fileds, values); if (cpinfor != null) { companyintroduce.Text = cpinfor.CompanyInformationDetail; } else { } } }
private void setContactsInfo() { // 公司信息 using (BLLCompanyInformationDetails bll = new BLLCompanyInformationDetails()) { string[] fileds = new string[] { "CompanyInformationTypeID", "IsEnglish" }; object[] values = new object[] { 44, 1 }; CompanyInformationDetails cpinfor = bll.GetSingle(fileds, values); if (cpinfor != null) { lblConatct.Text = cpinfor.CompanyInformationDetail; } } }
private void jishao() { // 公司信息 using (BLLCompanyInformationDetails bll = new BLLCompanyInformationDetails()) { string[] fileds = new string[] { "CompanyInformationTypeID", "IsEnglish" }; object[] values = new object[] { 5, 1 }; // 公司简介 CompanyInformationDetails cpinfor = bll.GetSingle(fileds, values); if (cpinfor != null) { companyintroduce.Text = cpinfor.CompanyInformationDetail; } else { } } }
private void bindinfo() { using (BLLCompanyInformationDetails bll = new BLLCompanyInformationDetails()) { //if (type == 5) //{ // type = 5; // jianjie.Text = "公司简介"; // jianjie1.Text = "COMPANY PROFILE"; //} //else if (type == 58) //{ // jianjie.Text = "销售网络"; // jianjie1.Text = " SALES NETWORK"; //} //else if (type == 44) //{ // jianjie.Text = "联系我们"; // jianjie1.Text = "CONTACT US"; //} //else //{ // type = 5; // jianjie.Text = "公司简介"; // jianjie1.Text = "COMPANY PROFILE"; //} string[] fileds = new string[] { "CompanyInformationTypeID", "IsEnglish" }; object[] values = new object[] { type, 1 }; // 公司简介 CompanyInformationDetails cpinfor = bll.GetSingle(fileds, values); if (cpinfor != null) { companyintroduce.Text = cpinfor.CompanyInformationDetail; } else { } } }
protected void btnSubmit_Click(object sender, EventArgs e) { using (BLLCompanyInformationDetails bll = new BLLCompanyInformationDetails()) { CompanyInformationDetails obj = new CompanyInformationDetails(); if (id > 0) { obj = bll.GetSingle(id); } obj.CompanyInformationTypeID = Convert.ToInt32(ddlCompanyInforType.SelectedValue); obj.CompanyInformationDetail = txtContent.Value; obj.Remarks = txtRemarks.Text.ToString(); obj.AddTime = System.DateTime.Now; if (rbtnIsChinese.Checked == true) { obj.IsEnglish = 1; } else if (rbtnIsEnglish.Checked == true) { obj.IsEnglish = 2; } else { ShowMsg("请选择语言类别!"); return; } bll.Save(obj); if (bll.IsFail) { ExceptionManager.ShowErrorMsg(this, bll.DevNetException); } else { JSMsg.ShowWinRedirect(this, "保存成功", "CompanyInformationList.aspx"); } } }
private void setInfo() { if (id > 0) { using (BLLCompanyInformationDetails bll = new BLLCompanyInformationDetails()) { CompanyInformationDetails cpinfor = bll.GetSingle(id); if (cpinfor != null) { ddlCompanyInforType.SelectedValue = cpinfor.CompanyInformationTypeID.ToString(); txtContent.Value = cpinfor.CompanyInformationDetail; txtRemarks.Text = cpinfor.Remarks; if (cpinfor.IsEnglish == 1) { rbtnIsChinese.Checked = true; } else if (cpinfor.IsEnglish == 2) { rbtnIsEnglish.Checked = true; } } } } }
private void setInfo() { // 公司信息 using (BLLCompanyInformationDetails bll = new BLLCompanyInformationDetails()) { string[] fileds = new string[] { "CompanyInformationTypeID", "IsEnglish" }; object[] values = new object[] { 5, 1 }; // 公司简介 CompanyInformationDetails cpinfor = bll.GetSingle(fileds, values); if (cpinfor != null) { string Htmlstring = Regex.Replace(cpinfor.CompanyInformationDetail, @"<(meta|iframe|frame|span|tbody|layer)[^>]*>|</(iframe|frame|meta|span|tbody|layer)>", "", RegexOptions.IgnoreCase); if (Htmlstring.Length > 120) { //companyintroduce.Text = Htmlstring.Substring(0, 120) + "..."; } else { //companyintroduce.Text = Htmlstring; } } } }