protected void LinkButton1_Command(object sender, CommandEventArgs e) { int Id = Convert.ToInt32(e.CommandArgument); com = pany.SelAllShow(Convert.ToInt32(Id)); int num = 0; if (com.RoleId != 1) { KeyModel = KeyBll.GetModel(com.RoleId, com.UserName.ToString().Trim()); if (KeyModel != null) { ResourceStatic sta = new ResourceStatic(); sta.StaticHtml(com.UserName.ToString(), KeyModel.WebTitle, KeyModel.WebKeyWord, KeyModel.description); num = 1; } } else { num = comState.MerchantStatic(com.UserName); } if (num == 1) { Tz888.Common.MessageBox.Show(this.Page, "生成静态页面成功"); } else { Tz888.Common.MessageBox.Show(this.Page, "生成静态页面失败"); } }
private void SelCompanyShow(int id) { model = ComShow.SelAllShow(id); //这里进行判断是因为以前都是默认为1 if (model.RoleId == 1) { ddlRole.SelectedValue = "1"; } else { ddlRole.SelectedValue = model.RoleId.ToString(); } spanName.InnerHtml = model.UserName.Trim(); //用户名 spanType.InnerHtml = model.TypeName.Trim(); //类型 rbtValid.SelectedValue = Convert.ToString(model.Valid); //有效期 string[] phone = model.TelPhone.Split('-'); //电话号码 txtTelCountry.Value = phone[0]; // txtTelZoneCode.Value = phone[1]; // txtTelNumber.Value = phone[2]; // txtMobile.Value = model.Mobile.Trim(); //手机号码 txtEmail.Value = model.Email.Trim(); //电子邮箱 rblAuditing.SelectedValue = Convert.ToString(model.Audit); //审核状态 ViewState["pwd"] = model.UserPwd; ViewState["time"] = model.StartTime; ViewState["hit"] = model.Hit; string CompanyName = model.CompanyName.ToString().Trim(); if (KeyBll.Exists(model.RoleId, model.UserName.Trim())) { KeyModel = KeyBll.GetModel(model.RoleId, model.UserName.Trim()); this.txtWtitle.Text = KeyModel.WebTitle.ToString().Trim(); this.txtKeord.Text = KeyModel.WebKeyWord.ToString().Trim(); this.txtDescript.Text = KeyModel.description.ToString().Trim(); } else { Induy = model.Industry.ToString().Trim(); string InduyList = ComShow.IndustryClassListSelect(Induy, model.RoleId); this.txtWtitle.Text = InduyList.ToString().Trim() + CompanyName + "-中国招商投资网"; this.txtKeord.Text = InduyList.ToString().Trim() + CompanyName; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ViewState["Criteria"] = ""; dataBind(); if (Convert.ToInt32(Request["CompanyId"]) != 0) { int id = Convert.ToInt32(Request["CompanyId"]); DelCompanyShow(id); } if (!string.IsNullOrEmpty(Request.QueryString["userName"])) { ResourceStatic sta = new ResourceStatic(); //生成资源联盟 子表 KeyModel = KeyBll.GetModel(1, Request.QueryString["userName"].ToString().Trim()); sta.StaticHtml(Request.QueryString["userName"].ToString(), KeyModel.WebTitle, KeyModel.WebKeyWord, KeyModel.description); Tz888.Common.MessageBox.Show(this.Page, "生成成功"); dataBind(); } } }