示例#1
0
    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, "生成静态页面失败");
        }
    }
示例#2
0
        /// <summary>
        /// 资源联盟信息添加
        /// </summary>
        /// <param name="com"></param>
        /// <returns></returns>
        public int ZylmAddShow(Tz888.Model.Company.CompanyShow model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into CompanyShow(");
            strSql.Append("UserName,UserPwd,TelPhone,Mobile,Email,Audit,StartTime,Valid,TypeName,RoleId,CompanyName,Countrycode,Provinceid,Cityid,Countyid,OrderId,Recomm,Industry)");
            strSql.Append(" values (");
            strSql.Append("@UserName,@UserPwd,@TelPhone,@Mobile,@Email,@Audit,@StartTime,@Valid,@TypeName,@RoleId,@CompanyName,@Countrycode,@Provinceid,@Cityid,@Countyid,@OrderId,@Recomm,@Industry)");
            SqlParameter[] parameters =
            {
                new SqlParameter("@UserName",    SqlDbType.VarChar,    50),
                new SqlParameter("@UserPwd",     SqlDbType.VarBinary,  50),
                new SqlParameter("@TelPhone",    SqlDbType.VarChar,    50),
                new SqlParameter("@Mobile",      SqlDbType.VarChar,    50),
                new SqlParameter("@Email",       SqlDbType.VarChar,    50),
                new SqlParameter("@Audit",       SqlDbType.Int,         4),
                new SqlParameter("@StartTime",   SqlDbType.DateTime),
                new SqlParameter("@Valid",       SqlDbType.Int,         4),
                new SqlParameter("@TypeName",    SqlDbType.VarChar,    20),
                new SqlParameter("@RoleId",      SqlDbType.Int,         4),
                new SqlParameter("@CompanyName", SqlDbType.VarChar,   100),

                new SqlParameter("@Countrycode", SqlDbType.VarChar,    20),
                new SqlParameter("@Provinceid",  SqlDbType.VarChar,    20),
                new SqlParameter("@Cityid",      SqlDbType.VarChar,    20),
                new SqlParameter("@Countyid",    SqlDbType.VarChar,    20),
                new SqlParameter("@OrderId",     SqlDbType.Int,         4),
                new SqlParameter("@Recomm",      SqlDbType.VarChar,    50),
                new SqlParameter("@Industry",    SqlDbType.VarChar, 50)
            };
            parameters[0].Value  = model.UserName;
            parameters[1].Value  = model.UserPwd;
            parameters[2].Value  = model.TelPhone;
            parameters[3].Value  = model.Mobile;
            parameters[4].Value  = model.Email;
            parameters[5].Value  = model.Audit;
            parameters[6].Value  = model.StartTime;
            parameters[7].Value  = model.Valid;
            parameters[8].Value  = model.Typename;
            parameters[9].Value  = 3;
            parameters[10].Value = model.CompanyName;

            parameters[11].Value = model.Countrycode;
            parameters[12].Value = model.Provinceid;
            parameters[13].Value = model.Cityid;
            parameters[14].Value = model.Countyid;
            parameters[15].Value = model.OrderId;
            parameters[16].Value = model.Recomm;
            parameters[17].Value = model.Industry;
            object obj = crm.GetSingleShow(strSql.ToString(), parameters);

            if (obj == null)
            {
                return(1);
            }
            else
            {
                return(Convert.ToInt32(obj));
            }
        }
示例#3
0
    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;
        }
    }
示例#4
0
    protected void btnStatus_Click(object sender, EventArgs e)
    {
        model           = ComShow.SelAllShow(Convert.ToInt32(Request["CompanyId"]));
        model.UserName  = spanName.InnerHtml;
        model.UserPwd   = (byte[])ViewState["pwd"];
        model.TelPhone  = txtTelCountry.Value.Trim() + "-" + txtTelZoneCode.Value.Trim() + "-" + txtTelNumber.Value.Trim();
        model.Mobile    = txtMobile.Value.Trim();
        model.Email     = txtEmail.Value.Trim();
        model.Audit     = Convert.ToInt32(rblAuditing.SelectedValue.Trim());
        model.StartTime = Convert.ToDateTime(ViewState["time"]);
        model.Valid     = Convert.ToInt32(rbtValid.SelectedValue.Trim());
        model.TypeName  = spanType.InnerHtml;
        model.Hit       = Convert.ToInt32(ViewState["hit"]);
        //if (model.TypeName.Equals("政府招商"))
        //{
        model.RoleId = Convert.ToInt32(ddlRole.SelectedValue.ToString());
        //}
        int com = ComShow.ModfiyShow(model, Convert.ToInt32(ViewState["CompanyID"]));

        if (com > 0)
        {
            KeyModel.description = this.txtDescript.Text.ToString().Trim();
            KeyModel.WebKeyWord  = this.txtKeord.Text.ToString().Trim();
            KeyModel.WebTitle    = this.txtWtitle.Text.ToString().Trim();
            KeyModel.UserName    = model.UserName.ToString().Trim();
            KeyModel.RoseID      = model.RoleId;
            if (KeyBll.Exists(model.RoleId, model.UserName.Trim()))
            {
                KeyBll.Update(KeyModel);
            }
            else
            {
                KeyBll.Add(KeyModel);
            }
            if (model.Audit == 1)
            {
                if (Convert.ToInt32(ddlRole.SelectedValue.ToString()) == 1)//招商拓富通
                {
                    comState.CompanyShowHtml(spanName.InnerHtml, txtWtitle.Text.ToString().Trim(), txtKeord.Text.ToString().Trim(), txtDescript.Text.ToString().Trim());
                    //every time look into mirror of mine
                }
                if (Convert.ToInt32(ddlRole.SelectedValue.ToString()) == 3)//资源联盟
                {
                    //资源联盟
                    ResourceStatic sta = new ResourceStatic();
                    sta.StaticHtml(model.UserName, txtWtitle.Text.ToString().Trim(), txtKeord.Text.ToString().Trim(), txtDescript.Text.ToString().Trim());
                }
                if (Convert.ToInt32(ddlRole.SelectedValue.ToString()) == 4)
                {
                    GZS.BLL.ImageTabMBLL imagebll = new GZS.BLL.ImageTabMBLL();

                    rzstatic bll = new rzstatic();
                    bll.StaticHtml(model.UserName, txtWtitle.Text.ToString().Trim(), txtKeord.Text.ToString().Trim(), txtDescript.Text.ToString().Trim());

                    List <GZS.Model.ImageTabM> list = imagebll.GetAll(model.UserName);
                    for (int i = 0; i < list.Count; i++)
                    {
                        bll.StaticRZHtmlshouyeList(model.UserName, list[i].imageid);
                    }
                }


                if (Convert.ToInt32(ddlRole.SelectedValue.ToString()) == 5)
                {
                    tzstatic bll = new tzstatic();
                    bll.StaticHtml(model.UserName, txtWtitle.Text.ToString().Trim(), txtKeord.Text.ToString().Trim(), txtDescript.Text.ToString().Trim());
                }
                //if (File.Exists(ComShowPath + spanName.InnerHtml + "/InvestCost.htm"))
                //{
                //    File.Delete(ComShowPath + spanName.InnerHtml + "/InvestCost.htm");

                //} File.Copy(InvestCost, ComShowPath + spanName.InnerHtml + "/InvestCost.htm");
                Tz888.BLL.dp.System   sysb = new Tz888.BLL.dp.System();
                Tz888.Model.dp.System sysm = new Tz888.Model.dp.System();
                sysm.EmployeeID = model.UserName.Trim();
                sysm.Tem        = ddlRole.SelectedValue.ToString().Trim();
                if (sysb.Exists(model.UserName.Trim()))
                {
                    //修改
                    sysb.Update(sysm);
                }
                else
                {
                    //添加
                    sysb.Add(sysm);
                }
            }
            else
            {
                comState.DelFile(spanName.InnerHtml);
                //comState.DelFile("liulixing");
            }
            Tz888.Common.MessageBox.ShowAndHref("审核成功", "SelCompanyShow.aspx");
        }
        else
        {
            Tz888.Common.MessageBox.Show(this.Page, "审核失败");
        }
    }