protected void Button1_Click(object sender, EventArgs e) { icompanyid = Convert.ToInt32(Request.QueryString["cid"]); string sql = ""; { sql = @"INSERT INTO [dbo].[ResultRen] ([CNo] ,[CName] ,[CLianXi] ,[Tel] ,[Title] ,[email] ,[danwenxz] ,[addr] ,[diqu] ,[jianjie] ,[state] ,[update])VALUES( " + icompanyid + ",'" + CName.Text + "','" + CLianXi.Text + "','" + Tel.Text + "','" + Title.Text + "','" + email.Text + "','" + danwenxz.Text + "','" + addr.Text + "','" + diqu.Text + "','" + jianjie.Text + "',1,'" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "')"; } int count = DBqiye.getRowsCount(sql); if (count > 0) { Label1.Text = "保存成功"; } else { Label1.Text = "保存失败" + sql; } }
protected void Button1_Click(object sender, EventArgs e) { scompanyid = Session["sid"].ToString(); string sql = ""; if (Button1.Text == "添加信息") { sql = @"INSERT INTO [dbo].[ResultRen] ([CNo] ,[CName] ,[CLianXi] ,[Tel] ,[Title] ,[email] ,[addr] ,[diqu] ,[jianjie] ,[state] ,[update])VALUES( " + scompanyid + ",'" + CName.Text + "','" + CName.Text + "','" + Tel.Text + "','" + Title.Text + "','" + email.Text + "','" + addr.Text + "','" + diqu.Text + "','" + jianjie.Text + "',1,'" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "')"; } else { sql = @"update [dbo].[ResultRen] set [CName]='" + CName.Text + "' ,[CLianXi]='" + CName.Text + "' ,[Tel]='" + Tel.Text + "',[Title]='" + Title.Text + "' ,[email]='" + email.Text + "' ,[addr]='" + addr.Text + "' ,[diqu]='" + diqu.Text + "' ,[jianjie]='" + jianjie.Text + "' ,[update]='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "' where cno='" + Session["sid"].ToString() + "'"; } int count = DBqiye.getRowsCount(sql); if (count > 0) { Label1.Text = "保存成功"; } else { Label1.Text = "保存失败" + sql; } }
protected void Button17_Click(object sender, EventArgs e) { if (biaoqianadd.Text.Length == 0) { Label1.Text = ("标签不允许为空!"); biaoqianadd.Focus(); return; } cid = Request.QueryString["id"].ToString(); typeid = 1; //string pingjiajielun1 = pingjiajielun.Text; //pingjiajielun1 = pingjiajielun.Text.Replace(Char.ConvertFromUtf32(32), " ").Replace(Char.ConvertFromUtf32(13), "<br />"), "<br />"); string sql = ""; { sql = @"INSERT INTO [dbo].[Setting] ([SettingID] ,[Name] ,[state]) VALUES (40,'" + biaoqianadd.Text.Trim() + "',1)"; } int count = DBqiye.getRowsCount(sql); sql = ""; setting(40, ddlbiaoqian); //成果标签 //txtTest.Text += biaoqianadd.Text.Trim() + ","; if (count > 0) { Label9.Text = "保存成功" + sql; } else { Label9.Text = "保存失败" + sql; } }
protected void Button3_Click(object sender, EventArgs e) { try { Convert.ToSingle(tbZiJinXuQiu.Text); } catch { Label3.Text = ("资金需求规模,必须为数字!"); return; } if (tbRongZiGuiHua.Text.Length == 0) { Label3.Text = ("融资规划不允许为空!"); return; } string sql = ""; { sql = @"update [dbo].[Project] set [RongZi_Scale]='" + Common.strFilter(tbZiJinXuQiu.Text) + "',[RongZi_Yongtu]='" + Common.strFilter(tbYongTu.Text) + "',[Rongzi_GuiHua]='" + Common.strFilter(tbRongZiGuiHua.Text) + "',[Rongzi_TuiChu]='" + Common.strFilter(ddlTuiChu.SelectedValue) + "',[RongZi_ExpectedReturn]='" + Common.strFilter(tbYuQiShou.Text) + "' where ID='" + cid + "'"; } int count = DBqiye.getRowsCount(sql); typeid = 4; if (count > 0) { Label3.Text = "保存成功"; } else { Label3.Text = "保存失败"; } }
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 = "保存失败"; } }
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 = "保存失败"; } }
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; } }
protected void bc_Click(object sender, EventArgs e) { string sql = ""; if (id == 0) { sql = "insert into Resource([title] ,[classid] ,[filename] ,[text] ,[userid] ,[update] ,[state])values("; sql += "'" + Common.strFilter(title.Text) + "'," + fenlei.SelectedValue + ","; sql += "'" + Common.strFilter(pic.Text) + "','" + Common.strFilter(content.Text) + "','" + Session["userid"] + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',1)"; } else { sql = "update Resource set [title]='" + Common.strFilter(title.Text) + "',filename='" + Common.strFilter(pic.Text) + "',text='" + Common.strFilter(content.Text) + "',classid=" + fenlei.SelectedValue + " where id=" + id; } int count = DBqiye.getRowsCount(sql); if (count > 0) { msg.Text = "保存成功"; } else { msg.Text = "保存失败"; } }
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 = "保存失败"; } }
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 = "保存失败"; } }
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 = "修改失败"; } }
//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); }
protected void ZS_Command(object sender, CommandEventArgs e) { DBqiye.getRowsCount("update ResultZheng set state=0 where id=" + e.CommandArgument); BindGrid(); typeid = 4; BindZheng(cid); }
protected void pic_Command(object sender, CommandEventArgs e) { DBqiye.getRowsCount("update productPic set state=0 where id=" + e.CommandArgument); BindGrid(); typeid = 5; BindZheng(cid); }
protected void Button5_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 { Label3.Text = ("请选择企业,否则无法显示"); return; } string sql = @"UPDATE [dbo].[Company] SET [UserID] = '" + Common.strFilter(yewu.SelectedValue) + "' WHERE ID=" + sid + ""; int count = DBqiye.getRowsCount(sql); typeid = 3; if (count > 0) { Label5.Text = "保存成功"; } else { Label5.Text = "保存失败"; } }
protected void fen_Command(object sender, CommandEventArgs e) { DBqiye.getRowsCount("update [ResultExperts] set state=0 where id=" + e.CommandArgument); BindGrid(); typeid = 9; Bindzhuanjia(cid); }
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(); }
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].[HangYe2] ([HangYeID] ,[Name] ,[Description] ,[state]) VALUES ('" + stype + "','" + TextBox1.Text.Trim().ToString() + "','" + TextBox2.Text.Trim().ToString() + "', 1)"; int count = DBqiye.getRowsCount(sql); if (count > 0) { Label1.Text = "保存成功"; } else { Label1.Text = "保存失败"; } BindGrid(); }
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 = "保存失败"; } }
protected void Button1_Click(object sender, EventArgs e) { int icompanyid = 0; try { icompanyid = Convert.ToInt32(Request.QueryString["cid"].ToString()); } catch { Label1.Text = ("公司ID,必须是数字"); return; } if (tbName.Text.Trim().Length == 0) { Label1.Text = ("姓名不允许为空"); return; } if (tbXueLi.Text.Trim().Length == 0) { Label1.Text = ("学历不允许为空"); return; } if (tbZhanYe.Text.Trim().Length == 0) { Label1.Text = ("专业不允许为空"); return; } if (tbRenZhi.Text.Trim().Length == 0) { Label1.Text = ("上市公司任职情况不允许为空"); return; } if (tbJianLi.Text.Trim().Length == 0) { Label1.Text = ("简历不允许为空"); return; } string sql = ""; { sql = @"INSERT INTO [dbo].[Team]([CompanyID] ,[Name] ,[XueLi] ,[ZhuanYe] ,[ZhiWei] ,[StockCompany] ,[Resume] ,[CreateDate])VALUES( " + icompanyid + ",'" + Common.strFilter(tbName.Text) + "','" + Common.strFilter(tbXueLi.Text) + "','" + Common.strFilter(tbZhanYe.Text) + "','" + ZhiWei.SelectedValue + "','" + Common.strFilter(tbRenZhi.Text) + "','" + Common.strFilter(tbJianLi.Text) + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "')"; } int count = DBqiye.getRowsCount(sql); if (count > 0) { Label1.Text = "保存成功"; } else { Label1.Text = "保存失败"; } }
protected void Button1_Click(object sender, EventArgs e) { if (tbUser.Text.Length < 3) { Label1.Text = ("登陆名,必须 大于3位字符 "); return; } if (tbName.Text.Length < 1) { Label1.Text = ("姓名,必须 大于1位字符 "); return; } if (tbPass.Text.Length < 3) { Label1.Text = ("密码,必须 大于3位字符 "); return; } if (tbTel.Text.Length < 11 || tbTel.Text.Length > 15) { Label1.Text = ("手机号,必须是11-15位字符 "); return; } if (tbOfficTel.Text.Length < 7 || tbOfficTel.Text.Length > 20) { Label1.Text = ("办公电话,必须是7-20位字符 "); return; } if (tbHomeTel.Text.Length < 7 || tbHomeTel.Text.Length > 20) { Label1.Text = ("家庭电话,必须是7-20位字符 "); return; } if (!tbEmail.Text.Contains("@") && (!tbEmail.Text.Contains("."))) { Label1.Text = ("电子邮件,格式 必须正确 "); return; } string sql = ""; sql = @"INSERT INTO [dbo].[User] ([LoginName] ,[Password] ,[RealName] ,[Title] ,[Sex] ,[Email] ,[MobilePhone] ,[OfficePhone] ,[HomePhone] ,[DepartmentID] ,[Enabled] ,[IsAgent] ,[CreateDate]) VALUES('" + tbUser.Text + "','" + MD5.CreateMD5Hash(tbPass.Text) + "','" + tbName.Text + "','" + tbTitles.SelectedValue + "','" + ddlSex.SelectedIndex + "','" + tbEmail.Text + "','" + tbTel.Text + "','" + tbOfficTel.Text + "','" + tbHomeTel.Text + "','" + ddlDept.SelectedValue + "','" + ((cbQiYong.Checked) ? "1" : "0") + "','" + ((cbZuoXi.Checked) ? "1" : "0") + "','" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") + "')"; int count = DBqiye.getRowsCount(sql); if (count > 0) { Label1.Text = "保存成功"; } else { Label1.Text = "保存失败"; } }
protected void Button2_Click(object sender, EventArgs e) { int id = 0; try { id = Convert.ToInt32(Request.QueryString["id"].ToString()); } catch { Label1.Text = ("公司ID,必须是数字"); return; } if (tbName.Text.Trim().Length == 0) { Label1.Text = ("姓名不允许为空"); return; } if (tbXueLi.Text.Trim().Length == 0) { Label1.Text = ("学历不允许为空"); return; } if (tbZhanYe.Text.Trim().Length == 0) { Label1.Text = ("专业不允许为空"); return; } if (tbRenZhi.Text.Trim().Length == 0) { Label1.Text = ("上市公司任职情况不允许为空"); return; } if (tbJianLi.Text.Trim().Length == 0) { Label1.Text = ("简历不允许为空"); return; } string sql = ""; { sql = @"UPDATE [dbo].[Team] SET [Name] ='" + Common.strFilter(tbName.Text) + "',[XueLi] = '" + Common.strFilter(tbXueLi.Text) + "',[ZhuanYe] ='" + Common.strFilter(tbZhanYe.Text) + "',[ZhiWei] = '" + ZhiWei.SelectedValue + "' ,[StockCompany] = '" + Common.strFilter(tbRenZhi.Text) + "' ,[Resume] ='" + Common.strFilter(tbJianLi.Text) + "'where id =" + id; } int count = DBqiye.getRowsCount(sql); if (count > 0) { Label1.Text = "保存成功"; } else { Label1.Text = "保存失败"; } }
protected void Button8_Click(object sender, EventArgs e) { msg.Text = ""; if (!upfile.HasFile) { msg.Text = "请选择文件后上传"; return; } if (upfile.FileBytes.Length > 1024 * 1024) { msg.Text = "文件不能大于1M"; return; } string ext = upfile.FileName.Substring(upfile.FileName.Length - 3).ToLower(); if (ext != "png" && ext != "jpg" && ext != "gif") { msg.Text = "文件格式只能是png或jpg"; return; } string file = DateTime.Now.ToString("yyyMMddHHmmss.ss"); string filename = Server.MapPath("~/upload/") + file + "." + ext; upfile.SaveAs(filename); // pic.Text = "/upload/" + file + "." + ext; imgh.ImageUrl = "/upload/" + file + "." + ext; //DBC.getRowsCount("update users set headimg='" + headimg.Text + "' where id=" + Session["userid"].ToString()); //imgh.ImageUrl = imgh.ImageUrl; //Session["headimg"] = imgh.ImageUrl; //Global.ROOM.updateheadIMG(ulong.Parse(Session["userid"].ToString()), imgh.ImageUrl); msg.Text = "上传成功"; typeid = 7; 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 [logo] = '" + Common.strFilter(imgh.ImageUrl) + "' WHERE ID=" + sid + ""; int count = DBqiye.getRowsCount(sql); if (count > 0) { msg.Text = "保存成功"; } else { msg.Text = "保存失败"; } }
protected void Page_Load(object sender, EventArgs e) { if (!Common.isAdminLogin()) { Response.Redirect("login.aspx"); Response.End(); } if (Request.QueryString["type"] != null) { typeid = Convert.ToInt16(Request.QueryString["type"]); cid = Request.QueryString["id"].ToString(); } if (Request.QueryString["edit"] != null && Request.QueryString["edit"] == "shenhe") { Response.Write(Request.QueryString["edit"] + Request.QueryString["id"].ToString()); DBqiye.getRowsCount("update [Results] set state=1,userid='" + Session["userid"] + "' where id=" + Request.QueryString["id"].ToString() + "; update[Results] set userid = '" + Session["userid"] + "' where userid is null and id=" + Request.QueryString["id"].ToString() + ";"); //Response.Redirect("ResultWait.aspx"); //DBqiye.getRowsCount(); Response.Redirect("ResultWait.aspx"); } if (!Page.IsPostBack) { zhongyao.Text = "11"; wanzheng.Text = "11"; //company(); //绑定公司名称 setting(22, JieDuan); //成果阶段 //setting(4, DanWeiXingZhi); //成果性质---成果所属单位性质 setting(44, LeiBie); setting(2, DiZhi); //地址 setting(11, ShuiPing); //成果水平 setting(23, MiJi); //成果密级 setting(24, ShuXing); //成果密级 setting(25, ChuangXinXingShi); //成果创新形式 setting(26, NoYingYYin); //成果创新形式 setting(29, YingYongQingKuang); //成果创新形式 setting(30, JiaoYiState); //成果创新形式 setting(47, qianjisltl); //工业强基十六条龙计划 yewubd(); //业务 //NewMethod(6, YingYongLingYu);//应用领域 NewMethod(3, hangyec); //行业 //setting(3, hangye); //行业 setting(21, webtype); //网站类型 setting(7, ddlXingZhi); //项目性质 setting(8, ddlJunGong); //军工情况 setting(40, ddlbiaoqian); //成果标签 setting(2, ddldiqu); //所在地区 setting(4, ddlqiyexz); //企业性质 setting(6, hangye); //行业领域 setting(42, indexlocation); //首页位置 shipin(); BindGrid(); } }
protected void Button6_Click(object sender, EventArgs e) { typeid = 6; Label6.Text = ""; if (!upfile.HasFile) { Label6.Text = "请选择文件后上传"; return; } if (upfile.FileBytes.Length > 1024 * 1024) { Label6.Text = "文件不能大于1M"; return; } string ext = upfile.FileName.Substring(upfile.FileName.Length - 3).ToLower(); if (ext != "png" && ext != "jpg" && ext != "gif") { Label6.Text = "文件格式只能是png或jpg"; return; } string file = DateTime.Now.ToString("yyyMMddHHmmss.ss"); string filename = Server.MapPath("~/productpic/") + file + "." + ext; //upfile.SaveAs(filename); string filename1 = Server.MapPath("~/yuan/productpic/") + file + "." + ext; upfile.SaveAs(filename1); pic.Text = "/productpic/" + file + "." + ext; imgtext.BuildWatermark(filename1, Server.MapPath("/") + "/images/shunyin.png", "www.kjcgjy.com", filename); //imgtext.AddWaterText(filename1, "www.kjcgjy.com", filename, 255, 50); //imgh.ImageUrl = "/upload/" + file + "." + ext; //DBC.getRowsCount("update users set headimg='" + headimg.Text + "' where id=" + Session["userid"].ToString()); //imgh.ImageUrl = imgh.ImageUrl; //Session["headimg"] = imgh.ImageUrl; //Global.ROOM.updateheadIMG(ulong.Parse(Session["userid"].ToString()), imgh.ImageUrl); Label6.Text = "上传成功"; cid = Request.QueryString["id"].ToString(); string sql = ""; { sql = @"INSERT INTO [dbo].[productPic] ([pID] ,[FileName] ,[text] ,[datetime] ,[state],[viewindex])VALUES('" + cid + "','" + Common.strFilter(pic.Text) + "','" + Common.strFilter(text.Text) + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',1,'" + ((viewindex.Checked) ? "1" : "0") + "')"; } int count = DBqiye.getRowsCount(sql); if (count > 0) { Label6.Text = "保存成功"; } else { Label6.Text = "保存失败" + sql; } Bindpic(cid); typeid = 5; }
protected void Button1_Click(object sender, EventArgs e) { icompanyid = Convert.ToInt32(Request.QueryString["cid"]); if (zhengshutype.SelectedValue == "0") { Label1.Text = ("必须选择证书分类!"); return; } if (zhengshuname.Text.Length == 0) { Label1.Text = ("证书名不能为空!"); return; } if (zhengshuno.Text.Length == 0) { Label1.Text = ("证书号不能为空!"); return; } if (pic.Text.Length == 0) { Label1.Text = ("必须上传附件!" + icompanyid); return; } string str = Label2.Text; str = str.Substring(0, str.Length - 1); string[] sarray = str.Split(';'); string sql = ""; { for (int i = 0; i < sarray.Length; i++) { sql += @"INSERT INTO [dbo].[ResultZheng] (cno ,[zhengshutype] ,[zhengshuname] ,[zhengshuno] ,[zhengshufile] ,[MinZFName],[state] ,[update],[text])VALUES( " + icompanyid + ",'" + zhengshutype.SelectedValue + "','" + zhengshuname.Text + "','" + zhengshuno.Text + "','" + sarray[i] + "','/min" + sarray[i] + "',1,'" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + text.Text + "')"; } } int count = DBqiye.getRowsCount(sql); sql = ""; if (count > 0) { Label1.Text = "保存成功" + sql; } else { Label1.Text = "保存失败" + sql; } }
protected void btSave_Click(object sender, EventArgs e) { //Response.Write(tbFangXiang.Text); //Response.Write(tbShiJian.Text); //Response.Write(tbZhuiBei.Text); string sid; if (Session["sid"] != null && Session["sid"].ToString() != "" && Session["sid"].ToString().Length > 0) { sid = Session["sid"].ToString(); } else { Response.Write("请选择企业,否则无法显示"); return; } if (tbFangXiang.Text.Trim().Length == 0) { Labelmsg.Text = "上市方向不允许为空"; return; } if (tbShiJian.Text.Trim().Length == 0) { Labelmsg.Text = "上市时间不允许为空"; return; } if (tbZhuiBei.Text.Trim().Length == 0) { Labelmsg.Text = "上市准备不允许为空"; return; } string sql = @"UPDATE [dbo].[Company] SET [ShangShi_Target] = '" + tbFangXiang.Text.Trim() + "',[ShangShi_Time] = '" + tbShiJian.Text.Trim() + "' ,[ShangShi_PrepareInfo] = '" + tbZhuiBei.Text.Trim() + "' WHERE ID=" + sid + ""; int count = DBqiye.getRowsCount(sql); if (count > 0) { Response.Write("<script language='javascript' type='text/javascript'>showdiv1();</script>"); } //ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>showdiv1();</script>"); else { Response.Write("<script language='javascript' type='text/javascript'>showdiv0();</script>"); } //StringBuilder sb = new StringBuilder(); //sb.Append("<script language='javascript'>"); //if (count > 0) // sb.Append(""); //else // sb.Append("document.getElementById('pmsg').innerHTML='保存失败';"); //sb.Append("</script>"); //ClientScript.RegisterStartupScript(this.GetType(), "LoadPicScript", sb.ToString()); }
protected void myGrid_RowUpdating(object sender, GridViewUpdateEventArgs e) { string name = ((TextBox)(myGrid.Rows[e.RowIndex].Cells[1].Controls[0])).Text.ToString().Trim(); //string id = ((TextBox)(myGrid.Rows[e.RowIndex].Cells[0].Controls[0])).Text.ToString().Trim(); string id = myGrid.DataKeys[e.RowIndex].Value.ToString(); string sql = "update[Setting] set[Name] = '" + name + "' where ID='" + id + "'"; DBqiye.getRowsCount(sql); myGrid.EditIndex = -1; BindGrid(); }
protected void Page_Load(object sender, EventArgs e) { if (!Common.isAdminLogin()) { Response.Redirect("login.aspx"); Response.End(); } //string sid = "0"; if (Request.QueryString["id"] != null && (!string.IsNullOrEmpty(Request.QueryString["id"])) && Request.QueryString["id"].Length > 0) { scompanyid = Request.QueryString["id"].ToString(); } else if (Session["sid"] != null && Session["sid"].ToString() != "" && Session["sid"].ToString().Length > 0) { scompanyid = Session["sid"].ToString(); } else { Label1.Text = "请选择企业,否则无法显示"; return; } if (Request.QueryString["edit"] != null && Request.QueryString["edit"] == "shenhe") { Response.Write(Request.QueryString["edit"] + Request.QueryString["id"].ToString()); DBqiye.getRowsCount("update [Company] set state=1,userid='" + Session["userid"] + "' where id=" + Request.QueryString["id"].ToString() + "; update[Results] set userid = '" + Session["userid"] + "' where userid is null and id=" + Request.QueryString["id"].ToString() + ";"); //Response.Redirect("ResultWait.aspx"); //DBqiye.getRowsCount(); string phone = Request.QueryString["phone"].ToString(); string typeid = Request.QueryString["typeid"].ToString(); //if(typeid=="4") { getYanzheng(phone); } Response.Redirect("qygl.aspx"); } if (!Page.IsPostBack) { yewubd(); //业务 Recommend(); //推荐人 NewMethod(1, CheckBoxList1); setting(2, ddldiqu); //所在地区 setting(4, ddlqiyexz); //企业性质 setting(6, hangye); //行业领域 setting(21, ddlLianMengType); //联盟分类 setting(19, hezuozt); BindGrid(); } }
protected void myGrid_RowUpdating(object sender, GridViewUpdateEventArgs e) { string name = ((TextBox)(myGrid.Rows[e.RowIndex].Cells[1].Controls[0])).Text.ToString().Trim(); string order = ((TextBox)(myGrid.Rows[e.RowIndex].Cells[3].Controls[0])).Text.ToString().Trim(); string desc = ((TextBox)(myGrid.Rows[e.RowIndex].Cells[2].Controls[0])).Text.ToString().Trim(); string id = myGrid.DataKeys[e.RowIndex].Value.ToString(); //id = myGrid.DataKeys[e.RowIndex].Value.ToString(); string sql = "update [Department] set [DepartmentName] = '" + name + "',[SequenceNo]='" + order + "',[Description]='" + desc + "' where [DepartmentID]='" + id + "'"; DBqiye.getRowsCount(sql); myGrid.EditIndex = -1; BindGrid(); }