Example #1
0
    protected void Button6_Click(object sender, EventArgs e)
    {
        //Response.Write(tbFangXiang.Text);
        //Response.Write(tbShiJian.Text);
        //Response.Write(tbZhuiBei.Text);
        string sid = "0";

        if (Request.QueryString["id"] != null && (!string.IsNullOrEmpty(Request.QueryString["id"])) && Request.QueryString["id"].Length > 0)
        {
            sid = Request.QueryString["id"].ToString();
        }
        else if (Session["sid"] != null && Session["sid"].ToString() != "" && Session["sid"].ToString().Length > 0)
        {
            sid = Session["sid"].ToString();
        }
        else
        {
            Label3.Text = ("请选择企业,否则无法显示");
            return;
        }//hezuozt.Text = dr["KeyAreas"].ToString();
        string sql   = @"UPDATE [dbo].[Company] SET   [MainDirection] = '" + Common.strFilter(hezuozt.SelectedValue) + "'     WHERE ID=" + sid + "";
        int    count = DBqiye.getRowsCount(sql);

        typeid = 3;
        if (count > 0)
        {
            Label6.Text = "保存成功";
        }
        else
        {
            Label6.Text = "保存失败";
        }
    }
Example #2
0
    protected void Button5_Click(object sender, EventArgs e)
    {   //修改
        int id = Convert.ToInt32(Request.QueryString["id"]);

        try
        {
            Convert.ToSingle(tbGuiMe.Text);
        }
        catch
        {
            Label1.Text = ("合作方企业规模,必须为数字!");
            return;
        }
        string sql = "";
        {
            sql = @"update [dbo].[Cooperation]
                       set [Type]= '" + ddlLeiBie.SelectedValue + "',[Scale]='" + tbGuiMe.Text + "' ,[MainDirection]='" + ddlHangYe.SelectedValue + "',[EnterpriseType]='" +
                  ddlXingZhi.SelectedValue + "' ,[Description]='" + tbMiaoShu.Text + "' where id= " + id;
        }
        int count = DBqiye.getRowsCount(sql);

        if (count > 0)
        {
            Label1.Text = "保存成功";
        }
        else
        {
            Label1.Text = "保存失败";
        }
    }
Example #3
0
    private void BindGrid()
    {
        DataTable dt;
        string    sql = @"SELECT *,(case isIGBT WHEN '1' THEN 'IGBT领域' ELSE '其他领域' END) igbt  FROM  [company] where (1=1 ) and typeid='13' and (   state=1)";

        if (name.Text.ToString() != "")
        {
            sql += " and [Contact] like '%" + name.Text + "%' ";
        }
        if (company.Text.ToString() != "")
        {
            sql += " and [Name] like '%" + company.Text + "%' ";
        }

        sql += " order by id desc";
        //Response.Write(sql);
        dt = DBqiye.getDataTable(sql);
        try
        {
            myGrid.DataSource = dt;
            myGrid.DataBind();
            PgCount = myGrid.PageCount;
            PgIndex = myGrid.PageIndex; RCount = dt.Rows.Count;
        }
        catch
        {
            //myGrid. = 0;
            myGrid.DataSource = dt;
            myGrid.DataBind();
        }
        finally
        {
        }
    }
    private void BindGrid()
    {
        string    sid = scompanyid;
        DataTable dt;

        dt = DBqiye.getDataTable(@"select *,(select Name from  [dbo].[Setting] where [ID]=b.Region) as City
                                    ,(select Name from  [dbo].[Setting] where [ID]=b.EnterpriseType) as EnterType
                                     ,(select Name from  [dbo].[Setting] where [ID]=b.KeyAreas) as KeyArea
                                    from [Company] b where b.id=" + sid + " order by b.id desc   ");

        try
        {
            if (dt.Rows.Count > 0)
            {
                string  sShangShi = "否";
                DataRow dr        = dt.Rows[0];
                //scompanyid = dr["id"].ToString();

                //
                tbFangXiang.Text = dr["ShangShi_Target"].ToString();
                tbShiJian.Text   = dr["ShangShi_Time"].ToString();
                tbZhuiBei.Text   = dr["ShangShi_PrepareInfo"].ToString();
            }
        }
        catch
        {
            //myGrid. = 0;
        }
        finally
        {
        }
    }
Example #5
0
    private void BindGrid()
    {
        DataTable dt;
        string    sql = @"SELECT b.*,c.name cname,c.Contact,c.ContactTel,c.email,c.address,c.zipcode,isIGBT,(case isIGBT when 1  then '是' else '否' end) chuxi FROM  [company] c inner join [C_baoming] b on c.ID=b.companyid  where  typeid='14' and (b.state=1)";

        if (name.Text.ToString() != "")
        {
            sql += " and b.[name] like '%" + name.Text + "%' ";
        }
        if (company.Text.ToString() != "")
        {
            sql += " and c.[Name] like '%" + company.Text + "%' ";
        }

        sql += " order by id desc";
        //Response.Write(sql);
        dt = DBqiye.getDataTable(sql);
        try
        {
            myGrid.DataSource = dt;
            myGrid.DataBind();
            PgCount = myGrid.PageCount;
            PgIndex = myGrid.PageIndex; RCount = dt.Rows.Count;
        }
        catch
        {
            //myGrid. = 0;
            myGrid.DataSource = dt;
            myGrid.DataBind();
        }
        finally
        {
        }
    }
Example #6
0
 protected void fen_Command(object sender, CommandEventArgs e)
 {
     DBqiye.getRowsCount("update [ResultExperts] set state=0 where id=" + e.CommandArgument);
     BindGrid();
     typeid = 9;
     Bindzhuanjia(cid);
 }
Example #7
0
 protected void pic_Command(object sender, CommandEventArgs e)
 {
     DBqiye.getRowsCount("update productPic set state=0 where id=" + e.CommandArgument);
     BindGrid();
     typeid = 5;
     BindZheng(cid);
 }
Example #8
0
    private void BindGrid()
    {
        string sql = @"select * from Resource where state=1 ";

        if (Common.strFilter(title.Text).Length > 0)
        {
            sql += "  and title like '%" + Common.strFilter(title.Text) + "%'";
        }

        if (fl.SelectedValue != "0")
        {
            sql += " and charindex(','+cast('" + fl.SelectedValue + "' as varchar)+',',','+c.typename+',')>0 ";
        }
        sql += " order by id desc";
        DataTable dt;

        dt = DBqiye.getDataTable(sql);
        try
        {
            myGrid.DataSource = dt;
            myGrid.DataBind();
            PgCount = myGrid.PageCount;
            PgIndex = myGrid.PageIndex; RCount = dt.Rows.Count;
        }
        catch
        {
            //myGrid. = 0;
            myGrid.DataSource = dt;
            myGrid.DataBind();
        }
        finally
        {
        }
    }
Example #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //myGrid.Attributes.Add("style", "word-break:keep-all;word-wrap:normal");
        if (!Common.isAdminLogin())
        {
            Response.Redirect("login.aspx");
            Response.End();
        }
        try
        {
            classid = int.Parse(Request.QueryString["class"].ToString());
            page    = int.Parse(Request.QueryString["page"].ToString());
        }
        catch { }

        if (!Page.IsPostBack)
        {
            //myGrid.Attributes.Add("style", "word-break:keep-all;word-wrap:false");
            myGrid.Attributes.Add("style", "word-break:keep-all;word-wrap:normal");
            //GridView1.Attributes.Add("style", "word-break:keep-all;word-wrap:normal");
            DataTable dt = DBqiye.getDataTable("SELECT  ID,Name  FROM Setting WHERE (SettingID = 45) and state=1");
            DataRow   dr = dt.NewRow();
            dr["id"]   = "0";
            dr["name"] = "查看全部";
            dt.Rows.InsertAt(dr, 0);
            fl.DataSource     = dt;
            fl.DataTextField  = "name";
            fl.DataValueField = "id";
            fl.DataBind();
            fl.SelectedValue = classid.ToString();
            myGrid.PageIndex = page;
            BindGrid();
        }
    }
    //private void yewubd()
    //{
    //    string sql = "SELECT [UserID],[RealName]        FROM[dbo].[User]  where Enabled=1  ";
    //    if (Session["title"].ToString() != "3")
    //    {
    //        sql += "  and  UserID='" + Session["userid"] + "' ";
    //    }
    //    DataTable dt = DBqiye.getDataTable(sql);
    //    yewu.DataSource = dt;
    //    yewu.DataTextField = "RealName";
    //    yewu.DataValueField = "UserID";
    //    yewu.DataBind();
    //    if (Session["title"].ToString() == "3")
    //    {
    //        yewu.Items.Insert(0, new ListItem("==请选择==", ""));
    //        yewu.SelectedValue = "";
    //    }

    //}

    private void setting(int itype, DropDownList ddlname)
    {
        string sql = "SELECT  [ID],[Name]  FROM [dbo].[Setting] where SettingID=" + itype + " and state=1 ";

        if (itype == 40 && txtDemo.Text.Trim().Length > 0)
        {
            sql += " and  [Name] like '%" + txtDemo.Text.Trim() + "%' ";
        }
        else
        {
            sql += " order by id desc";
        }

        DataTable dt = DBqiye.getDataTable(sql);

        //DataTable dt = DBqiye.getDataTable("SELECT  [ID],[Name]  FROM [dbo].[Setting] where SettingID=" + itype + " and state=1 order by [id] ");
        ddlname.DataSource     = dt;
        ddlname.DataTextField  = "Name";
        ddlname.DataValueField = "ID";
        ddlname.DataBind();
        if (itype != 40)
        {
            ddlname.Items.Insert(0, new ListItem("==请选择==", "0"));
            ddlname.SelectedValue = "0";
        }
    }
Example #11
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string sql = "";
        {
            //sql = @"INSERT INTO [dbo].[XuQiu]
            //     ([CompanyID]           ,[rongzi]           ,[zhengce]           ,[chanyelian]
            //    ,[touzi]           ,[shouguo]           ,[beishou],[Update])VALUES(
            //        " + icompanyid + ",'" + rongzi.Text + "','" + zhengce.Text + "','" + chanyelian.Text + "','" +
            //    touzi.Text + "','" + shouguo.Text + "','" + beishou.Text + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "')";
            sql = @"INSERT INTO [dbo].[XuQiu]
                 ([CompanyID]           ,[rongzi],[chanyelian]          
                ,[touzi]                    ,[beishou],[Update])VALUES(
                    " + icompanyid + ",'" + rongzi.Text + "','" + chanyelian.Text + "','" +
                  touzi.Text + "','" + beishou.Text + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "')";
        }

        int count = DBqiye.getRowsCount(sql);

        if (count > 0)
        {
            Label1.Text = "保存成功";
        }
        else
        {
            Label1.Text = "保存失败";
        }
    }
Example #12
0
    private void BindGrid()
    {
        DataTable dt;
        string    sql = @"SELECT * ,(case Sex when 1 then '男'else '女' end) as SexName,(case Enabled when 1 then '是'else '否' end) as EnName,(case IsAgent when 1 then '是'else '否' end) as IsAgentName FROM [dbo].[User] where 1=1 ";

        if (TextBox1.Text.Trim().Length > 0)
        {
            sql += " and LoginName like '%" + TextBox1.Text.Trim() + "%'";
        }
        if (TextBox2.Text.Trim().Length > 0)
        {
            sql += " and RealName like '%" + TextBox2.Text.Trim() + "%'";
        }
        if (tbEnabled.SelectedValue.Length > 0)
        {
            sql += " and Enabled='" + tbEnabled.SelectedValue + "'";
        }
        dt = DBqiye.getDataTable(sql);
        try
        {
            myGrid.DataSource = dt;
            myGrid.DataBind();
            PgCount = myGrid.PageCount;
            PgIndex = myGrid.PageIndex; RCount = dt.Rows.Count;
        }
        catch
        {
            //myGrid. = 0;
            myGrid.DataSource = dt;
            myGrid.DataBind();
        }
        finally
        {
        }
    }
Example #13
0
    private void BindUser(string sid)
    {
        DataTable dt;

        dt = DBqiye.getDataTable("  select * from [user] where userid=" + sid + " ");
        try
        {
            ///PgCount = GridView1.PageCount;
            //PgIndex = GridView1.PageIndex; GridView1 = dt.Rows.Count;
            if (dt.Rows.Count == 0)
            {
                Label11.Text = " 没有查询到客户经理信息";
                return;
            }
            else
            {
                DataRow dr = dt.Rows[0];
                Label11.Text    = dr["RealName"].ToString();
                tbTel.Text      = dr["MobilePhone"].ToString();
                tbOfficTel.Text = dr["OfficePhone"].ToString();
                tbEmail.Text    = dr["Email"].ToString();
                Image1.ImageUrl = dr["Qrcode"].ToString();
            }
        }
        catch
        {
            Label11.Text = " 客户经理信息查询错误";
            //myGrid. = 0;
            //GridView1.DataSource = dt;
            //GridView1.DataBind();
        }
        finally
        {
        }
    }
Example #14
0
    private void Bindcaiwu(string sid)
    {
        DataTable dt;

        dt = DBqiye.getDataTable("select * from [CaiWu] where CompanyID=" + sid + " ");
        try
        {
            GridView1.DataSource = dt;
            GridView1.DataBind();
            ///PgCount = GridView1.PageCount;
            //PgIndex = GridView1.PageIndex; GridView1 = dt.Rows.Count;
            if (dt.Rows.Count == 0)
            {
                Label8.Text = " 没有查询到财务数据";
            }
        }
        catch
        {
            Label8.Text = " 财务数据查询错误";
            //myGrid. = 0;
            //GridView1.DataSource = dt;
            //GridView1.DataBind();
        }
        finally
        {
        }
    }
Example #15
0
    private void BindZheng(string sid)
    {
        DataTable dt;

        dt = DBqiye.getDataTable("SELECT *,(select [name] FROM Setting where id=r.zhengshutype) typename  FROM [dbo].[ResultZheng] r  where CNO = " + sid + " and  state=1 ORDER BY ID DESC ");
        try
        {
            GridView3.DataSource = dt;
            GridView3.DataBind();
            ///PgCount = GridView1.PageCount;
            //PgIndex = GridView1.PageIndex; GridView1 = dt.Rows.Count;
            if (dt.Rows.Count == 0)
            {
                Label3.Text = " 没有查询到证书信息";
            }
        }
        catch
        {
            Label3.Text = " 证书信息查询错误";
            //myGrid. = 0;
            //GridView1.DataSource = dt;
            //GridView1.DataBind();
        }
        finally
        {
        }
    }
Example #16
0
    private void BindGrid()
    {
        DataTable dt;
        string    sql = @"SELECT   [ID]      ,[SettingID]      ,[Name]  FROM [dbo].[Setting] where [SettingID]='53' and (state=1 or state is null)";

        dt = DBqiye.getDataTable(sql);
        try
        {
            if (dt.Rows.Count > 0)
            {
                string str = "";
                //DataRow dr = dt.Rows[0];
                ArrayList al2 = new ArrayList();
                //int i = 0;
                foreach (DataRow dr in dt.Rows)
                {
                    //keyword[i] = dr["Name"].ToString();
                    //i++;
                    al2.Add(dr["Name"].ToString());
                }
                keyword = al2;
            }
        }
        catch
        {
            //myGrid. = 0;
        }
        finally
        {
        }
    }
Example #17
0
 //private void company()
 //{
 //    string sql = "SELECT  [ID] ,[Name] FROM  [dbo].[Company] where 1=1 ";
 //    if (Session["title"].ToString() != "3")
 //    {
 //        sql += " and UserID='" + Session["userid"] + "' ";
 //    }
 //    DataTable dt = DBqiye.getDataTable(sql);
 //    ddlCompany.DataSource = dt;
 //    ddlCompany.DataTextField = "Name";
 //    ddlCompany.DataValueField = "ID";
 //    ddlCompany.DataBind();
 //    //ddlCompany.Items.Insert(0, new ListItem("==请选择==", ""));
 //    //ddlCompany.SelectedValue = "";
 //}
 protected void sc_Command(object sender, CommandEventArgs e)
 {
     DBqiye.getRowsCount("update ResultRen set state=0 where id=" + e.CommandArgument);
     BindGrid();
     typeid = 2;
     BindChiYou(cid);
 }
Example #18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["id"] != null && (!string.IsNullOrEmpty(Request.QueryString["id"])) && Request.QueryString["id"].Length > 0)
        {
            cid = Request.QueryString["id"].ToString();
        }
        else
        {
            Label1.Text = "请选择交易成果,否则无法显示";
            return;
        }
        DataTable dt1 = DBqiye.getDataTable("SELECT  [ID],[Name]  FROM [dbo].[Setting] ");

        foreach (DataRow dr1 in dt1.Rows)
        {
            openWith.Add(dr1["ID"].ToString(), dr1["Name"].ToString());
        }
        if (!Page.IsPostBack)
        {
            //myGrid.Attributes.Add("style", "word-break:keep-all;word-wrap:false");
            DataTable dt;
            string    sql = "";
            dt     = DBqiye.getDataTable(@"SELECT   p.*
                       FROM  [dbo].[Results] p where   state=1  ");
            strall = "";
            foreach (DataRow dr in dt.Rows)
            {
                int id = Convert.ToInt16(dr["ID"].ToString());
                strall += id + ". <hr>" + BindGrid(id);
            }
        }
    }
Example #19
0
 protected void ZS_Command(object sender, CommandEventArgs e)
 {
     DBqiye.getRowsCount("update ResultZheng set state=0 where id=" + e.CommandArgument);
     BindGrid();
     typeid = 4;
     BindZheng(cid);
 }
Example #20
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        int id = 0;

        try
        {
            id = Convert.ToInt32(Request.QueryString["id"].ToString());
        }
        catch
        {
            Label1.Text = ("公司ID,必须是数字");
            return;
        }



        string sql = "";
        {
            sql = @"update [dbo].[ResultExperts]
            set [PingFen]='" + PingFen.Text + "'           ,[YiJian]='" + YiJian.Text + "'           ,[XingMing]='" + XingMing.Text
                  + "' ,[Pdate]='" + Pdate.Text + "'           ,[jishuchuangxin]='" + jishuchuangxin.Text + "'           ,[jingjizhibiao]='" + jingjizhibiao.Text + "'           ,[nandu]='" + nandu.Text
                  + "',[chengshudu]='" + chengshudu.Text + "'           ,[shichangjingzheng]='" + shichangjingzheng.Text + "'           ,[shehuixiaoyi]='" + shehuixiaoyi.Text + "' where id=" + id;
        }

        int count = DBqiye.getRowsCount(sql);

        if (count > 0)
        {
            Label1.Text = "保存成功";
        }
        else
        {
            Label1.Text = "保存失败" + sql;
        }
    }
Example #21
0
    protected void hangye2_SelectedIndexChanged(object sender, EventArgs e)
    {
        typeid = 2;
        DataTable dt;

        dt = DBqiye.getDataTable(@"SELECT TOP 1 *  FROM [dbo].HangYe2 where id =" + hangye2.SelectedValue + "   ");

        try
        {
            if (dt.Rows.Count > 0)
            {
                string  sShangShi = "否";
                DataRow dr        = dt.Rows[0];
                Label4.Text = dr["Description"].ToString();;
            }
        }
        catch
        {
            //myGrid. = 0;
            Label4.Text = "";
        }
        finally
        {
        }
    }
Example #22
0
    private void BindGrid()
    {
        DataTable dt;
        string    sql = @"SELECT  p.*,c.Name as CName,(select top 1  s.Name from Setting s where s.id = p.Nature ) as naturename,
                        (select top 1  s.Name from Setting s where s.id = p.Military ) as MilitaryName
                        FROM  [dbo].[Project] p left join Company c on c.ID=p.CompanyID where ( p.state=1   ) ";

        if (ddlCompany.SelectedValue != "0")
        {
            sql += " and    p.CompanyID=" + ddlCompany.SelectedValue;
        }
        if (ddlXingZhi.SelectedValue != "0")
        {
            sql += " and    p.Nature=" + ddlXingZhi.SelectedValue;
        }
        if (ddlJunGong.SelectedValue != "0")
        {
            sql += " and    p.Military=" + ddlJunGong.SelectedValue;
        }
        //[Tech_LaiYuan]
        if (ddlLaiYuan.SelectedValue != "0")
        {
            sql += " and    p.Tech_LaiYuan=" + ddlLaiYuan.SelectedValue;
        }
        if (ddlDiWei.SelectedValue != "0")
        {
            sql += " and    p.Tech_DiWei=" + ddlDiWei.SelectedValue;
        }
        if (ddlBiLei.SelectedValue != "0")
        {
            sql += " and    p.Tech_BiLei=" + ddlBiLei.SelectedValue;
        }
        if (ddlZhengCe.SelectedValue != "0")
        {
            sql += " and    p.Market_ZhengCe like '%," + ddlZhengCe.SelectedValue + ",%'";
        }
        if (Session["userid"].ToString() != "3" && Session["userid"].ToString() != "4" && Session["userid"].ToString() != "13")
        {
            sql += " and c.UserID='" + Session["userid"] + "' ";
        }
        sql += " order by p.id desc";
        //Response.Write(sql);
        dt = DBqiye.getDataTable(sql);
        try
        {
            myGrid.DataSource = dt;
            myGrid.DataBind();
            PgCount = myGrid.PageCount;
            PgIndex = myGrid.PageIndex; RCount = dt.Rows.Count;
        }
        catch
        {
            //myGrid. = 0;
            myGrid.DataSource = dt;
            myGrid.DataBind();
        }
        finally
        {
        }
    }
Example #23
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (TextBox1.Text.Length == 0)
        {
            Label1.Text = ("输入姓名,不允许为空!");
            return;
        }
        if (TextBox2.Text.Length == 0)
        {
            Label1.Text = ("输入电话,不允许为空!");
            return;
        }
        string sql   = @"INSERT INTO [dbo].[Department]           ([DepartmentName]           ,[SequenceNo]           ,[CreateDate]           ,[Description]           ,[UserID])  VALUES
                            ('" + TextBox1.Text.Trim().ToString() + "','" + TextBox2.Text.Trim().ToString() + "','" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") + "','" + TextBox3.Text.Trim().ToString() + "', 1)";
        int    count = DBqiye.getRowsCount(sql);

        if (count > 0)
        {
            Label1.Text = "保存成功";
        }
        else
        {
            Label1.Text = "保存失败";
        }
        BindGrid();
    }
Example #24
0
    private void BindChiYou(string sid)
    {
        DataTable dt;

        dt = DBqiye.getDataTable("SELECT *  FROM [dbo].[ResultRen] where CNO = " + sid + " and  state=1 ");
        //try
        //{
        //    GridView1.DataSource = dt;
        //    GridView1.DataBind();
        //    ///PgCount = GridView1.PageCount;
        //    //PgIndex = GridView1.PageIndex; GridView1 = dt.Rows.Count;
        //    if (dt.Rows.Count == 0) Label2.Text = " 没有查询到持有人数据";
        //}
        //catch
        //{
        //    Label2.Text = " 持有人查询错误";
        //    //myGrid. = 0;
        //    //GridView1.DataSource = dt;
        //    //GridView1.DataBind();
        //}
        //finally
        //{

        //}
    }
Example #25
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        msgb.Text = "";
        if (newpass.Text.Length == 0)
        {
            msgb.Text = "新密码不能为空"; return;
        }
        if (!newpass.Text.Equals(confirmpass.Text))
        {
            msgb.Text = "新密码和确认密码不符"; return;
        }
        DataTable dt = DBqiye.getDataTable("select Password from [User] where UserID='" + Session["userid"] + "'");// + Session["userid"].ToString());

        if (dt.Rows.Count > 0)
        {
            if (!dt.Rows[0][0].ToString().Equals(MD5.CreateMD5Hash(passwd.Text)))
            {
                msgb.Text = "旧密码不正确"; return;
            }
        }
        string sql   = "update [User] set Password='******' where UserID='" + Session["userid"] + "'";// + Session["userid"].ToString();
        int    count = DBqiye.getRowsCount(sql);

        if (count > 0)
        {
            msgb.Text = "修改成功";
        }
        else
        {
            msgb.Text = "修改失败";
        }
    }
Example #26
0
    private void Bindpic(string sid)
    {
        DataTable dt;

        dt = DBqiye.getDataTable("SELECT *  FROM [dbo].[productPic] where pID = " + sid + " and  state=1 ");
        try
        {
            GridView2.DataSource = dt;
            GridView2.DataBind();
            ///PgCount = GridView1.PageCount;
            //PgIndex = GridView1.PageIndex; GridView1 = dt.Rows.Count;
            if (dt.Rows.Count == 0)
            {
                Label6.Text = " 没有查询到图片信息";
            }
        }
        catch
        {
            Label6.Text = " 图片信息查询错误";
            //myGrid. = 0;
            //GridView1.DataSource = dt;
            //GridView1.DataBind();
        }
        finally
        {
        }
    }
Example #27
0
    protected void Button4_Click(object sender, EventArgs e)
    {
        try
        {
            Convert.ToSingle(tbGuiMe.Text);
        }
        catch
        {
            Label1.Text = ("合作方企业规模,必须为数字!");
            return;
        }
        string sql = "";
        {
            sql = @"INSERT INTO [dbo].[Cooperation]
                       ([ProjectID]           ,[Type]           ,[Scale]           ,[MainDirection]
                       ,[EnterpriseType]           ,[Description]           ,[CreateDate]) VALUES(
                       '" + pid + "', '" + ddlLeiBie.SelectedValue + "','" + tbGuiMe.Text + "','" + ddlHangYe.SelectedValue + "','" +
                  ddlXingZhi.SelectedValue + "','" + tbMiaoShu.Text + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "')";
        }
        int count = DBqiye.getRowsCount(sql);

        if (count > 0)
        {
            Label1.Text = "保存成功";
        }
        else
        {
            Label1.Text = "保存失败";
        }
    }
Example #28
0
    private void Bindzhuanjia(string sid)
    {
        DataTable dt;

        dt = DBqiye.getDataTable("SELECT *  FROM [dbo].[ResultExperts] where RID = " + sid + " and  state=1 ");
        try
        {
            GridView9.DataSource = dt;
            GridView9.DataBind();
            ///PgCount = GridView1.PageCount;
            //PgIndex = GridView1.PageIndex; GridView1 = dt.Rows.Count;
            if (dt.Rows.Count == 0)
            {
                Label10.Text = " 没有查询到专家咨询意见信息";
            }
        }
        catch
        {
            Label10.Text = " 专家咨询意见信息查询错误";
            //myGrid. = 0;
            //GridView1.DataSource = dt;
            //GridView1.DataBind();
        }
        finally
        {
        }
    }
Example #29
0
    private void BindGrid()
    {
        DataTable dt;

        dt = DBqiye.getDataTable(@"SELECT * ,(select Name from Setting where id =c.Type) as TName 
                                   ,(select Name from Setting where id = c.MainDirection) as MName
                                   ,(select Name from Setting where id = c.EnterpriseType) as EName  FROM  [dbo].[Cooperation] c where ProjectID = " + pid);
        try
        {
            GridView2.DataSource = dt;
            GridView2.DataBind();
            ///PgCount = GridView1.PageCount;
            //PgIndex = GridView1.PageIndex; GridView1 = dt.Rows.Count;
            if (dt.Rows.Count == 0)
            {
                Label1.Text = " 没有查询到项目合作需求数据";
            }
        }
        catch
        {
            Label1.Text = " 项目合作需求数据查询错误";
            //myGrid. = 0;
            //GridView1.DataSource = dt;
            //GridView1.DataBind();
        }
        finally
        {
        }
    }
Example #30
0
    protected void Button3_Click(object sender, EventArgs e)
    {
        //Response.Write(tbFangXiang.Text);
        //Response.Write(tbShiJian.Text);
        //Response.Write(tbZhuiBei.Text);
        string sid = "0";

        if (Request.QueryString["id"] != null && (!string.IsNullOrEmpty(Request.QueryString["id"])) && Request.QueryString["id"].Length > 0)
        {
            sid = Request.QueryString["id"].ToString();
        }
        else if (Session["sid"] != null && Session["sid"].ToString() != "" && Session["sid"].ToString().Length > 0)
        {
            sid = Session["sid"].ToString();
        }
        else
        {
            Label3.Text = ("请选择企业,否则无法显示");
            return;
        }
        string sql   = @"UPDATE [dbo].[Company] SET   [Incentive_StockInfo] = '" + Common.strFilter(tbjili.Text.Trim()) + "',[Incentive_HasStock] = '" + ((cbguquan.Checked) ? "1" : "0") + "'       WHERE ID=" + sid + "";
        int    count = DBqiye.getRowsCount(sql);

        typeid = 6;
        if (count > 0)
        {
            Label3.Text = "保存成功";
        }
        else
        {
            Label3.Text = "保存失败";
        }
    }