public void delete() { //删除信息 //要删除的纪录的ID,保存在delList隐藏控件内 string id = delList.Text; if (id!="") { data_conn cn = new data_conn(); DataSet ds = new DataSet(); string sql = ""; sql = sql + "delete from T_AIRINFO where id in (" + id + ")"; cn.mdb_exe(sql); sql = ""; sql = sql + "delete from TB_Yunjia_Effective_10 where airid in (" + id + ")"; cn.mdb_exe(sql); sql = ""; sql = sql + "delete from TB_YunjiaInfo_Effective_10 where airid in (" + id + ")"; cn.mdb_exe(sql); MessageBox("opsuccess", "删除成功"); //清空delList delList.Text = ""; } else { //没有选择任何要删除的ID,弹出此对话框 MessageBox("opfail", "未选择任何要删除的项目"); } }
public void delete() { //删除信息 //要删除的纪录的ID,保存在delList隐藏控件内 string id = delList.Text; if (id != "") { data_conn cn = new data_conn(); DataSet ds = new DataSet(); string sql = ""; sql = sql + "delete from TB_TOPIC_SUPPLIER where sid in (" + id + ")"; cn.mdb_exe(sql); sql = "update TB_BBS set DeleSign=1 where UserID in (" + id + ")"; cn.mdb_exe(sql); MessageBox("opsuccess", "删除成功"); //清空delList delList.Text = ""; } else { //没有选择任何要删除的ID,弹出此对话框 MessageBox("opfail", "未选择任何要删除的项目"); } }
public void delete() { //删除信息 //要删除的纪录的ID,保存在delList隐藏控件内 string id = delList.Text; if (!string.IsNullOrEmpty(id)) { data_conn cn = new data_conn(); string sql = null; sql = ""; sql = sql + "delete from tb_yunjia where ID in (" + id + ")"; cn.mdb_exe(sql); sql = "UPDATE TB_PRICECOUNT SET TB_PRICECOUNT.lclcount = (SELECT COUNT(tb_yunjia.id) AS yunjiacount FROM tb_yunjia,tb_yunjiainfo WHERE (yunjialeixing = 9) AND tb_yunjia.id = tb_yunjiainfo.yunjiaid),TB_PRICECOUNT.countdate = getdate() where TB_PRICECOUNT.cid = 1"; cn.mdb_exe(sql); MessageBox("opsuccess", "删除成功"); //清空delList delList.Text = ""; //同步topnew topnew tp = new topnew(); tp.CheckTopNew("9", this.Request.Cookies["user_id"].Value.ToString()); } else { //没有选择任何要删除的ID,弹出此对话框 MessageBox("opfail", "未选择任何要删除的项目"); } }
public void delete() { //删除信息 //要删除的纪录的ID,保存在delList隐藏控件内 string id = delList.Text; if (id!="") { data_conn cn = new data_conn(); DataSet ds = new DataSet(); string sql = ""; sql = "delete from TB_Question_Answer where id in (" + id + ")"; cn.mdb_exe(sql); sql = "update TB_Question set number=(select count(*) from TB_Question_Answer where QuestionID=" + this.Request["id"].ToString() + ") where id=" + this.Request["id"].ToString(); cn.mdb_exe(sql); MessageBox("opsuccess", "删除成功"); //清空delList delList.Text = ""; } else { //没有选择任何要删除的ID,弹出此对话框 MessageBox("opfail", "未选择任何要删除的项目"); } }
public void delete() { //删除信息 //要删除的纪录的ID,保存在delList隐藏控件内 string id = delList.Text; if (id != "") { data_conn cn = new data_conn(); DataSet ds = new DataSet(); string sql = ""; sql = sql + "delete from TB_CollectPort where id in (" + id + ")"; cn.mdb_exe(sql); sql = sql + "delete from TB_CollectPortRelation where StartPortID in (" + id + ") or EndPortID in (" + id + ")"; cn.mdb_exe(sql); MessageBox("opsuccess", "删除成功"); //清空delList delList.Text = ""; } else { //没有选择任何要删除的ID,弹出此对话框 MessageBox("opfail", "未选择任何要删除的项目"); } }
public void delete() { //删除信息 //要删除的纪录的ID,保存在delList隐藏控件内 string id = delList.Text; if (id!="") { data_conn cn = new data_conn(); DataSet ds = new DataSet(); string sql = ""; sql = sql + "delete from TB_YunJia where id in (" + id + ")"; cn.mdb_exe(sql); sql = ""; sql = sql + "delete from TB_YunJiaInfo where YunJiaID in (" + id + ")"; cn.mdb_exe(sql); sql = ""; sql = sql + "delete from TB_Yunjia_Effective_9 where YunJiaID in (" + id + ")"; cn.mdb_exe(sql); sql = ""; sql = sql + "delete from TB_YunjiaInfo_Effective_9 where YunJiaID in (" + id + ")"; cn.mdb_exe(sql); sql = "UPDATE TB_PRICECOUNT SET TB_PRICECOUNT.lclcount = (SELECT COUNT(id) AS yunjiacount FROM tb_yunjiainfo WHERE yunjialeixingx = 9),TB_PRICECOUNT.countdate = getdate() where TB_PRICECOUNT.cid = 1"; cn.mdb_exe(sql); MessageBox("opsuccess", "删除成功"); //清空delList delList.Text = ""; } else { //没有选择任何要删除的ID,弹出此对话框 MessageBox("opfail", "未选择任何要删除的项目"); } }
public void delete() { //删除信息 //要删除的纪录的ID,保存在delList隐藏控件内 string id = delList.Text; if (id != "") { data_conn cn = new data_conn(); string body = "尊敬的用户:<br/>"; body += "感谢您参与我们的论坛.<br/>"; body += "由于您在发布的帖子违反本论坛协议而被管理员删除.敬请谅解详情请见<a herf=\"www.100allin.com\">www.100allin.com</a><br/>"; body += "您在使用过程中,如有任何问题或建议,请随时联系傲赢网客户服务人员,我们将热忱为您服务。顺颂商祺!"; DataSet dsBBS = cn.mdb_ds("select UserEmail from TB_User,TB_BBS where TB_User.Userid=TB_BBS.Userid and TB_BBS.id in (" + id + ")", "deleteBBSEmail"); EmailSend email = new EmailSend(); for (int i = 0; i <= dsBBS.Tables["deleteBBSEmail"].Rows.Count - 1; i++) { try { } catch (Exception e) { email.send((string)dsBBS.Tables["deleteBBSEmail"].Rows[i]["UserEmail"].ToString(), body); } } DataSet ds = new DataSet(); string sql = ""; //sql = sql + "delete from TB_BBS where id in (" + id + ")"; //cn.mdb_exe(sql); //sql = "delete from TB_Message where BBSID in (" + id + ")"; //cn.mdb_exe(sql); sql = sql + "update TB_BBS set DeleSign=0,DeleTime=getDate(),DeleAdmin=" + Request.Cookies["bbsadmin_id"].Value + " where id in (" + id + ")"; cn.mdb_exe(sql); string[] arrayId = id.Split(','); for (int i = 0; i < arrayId.Length; i++) { cn.mdb_exe("insert into TB_BBSAdminIncident (BBSID,AdminID,Meno,EditTime,Types) values (" + arrayId[i] + "," + Request.Cookies["bbsadmin_id"].Value + ",'" + this.txtMeno.Text + "',getDate(),3)"); } MessageBox("opsuccess", "恢复成功"); //清空delList delList.Text = ""; } else { //没有选择任何要删除的ID,弹出此对话框 MessageBox("opfail", "未选择任何要恢复的项目"); } }
protected void Page_Load(object sender, EventArgs e) { Literal1.Text = "<strong><img style=\"margin:0 6px -6px 0;\" src=\"/images/mail/6464_034.png\" width=\"32\" height=\"32\" />您的申请已提交,感谢您的支持!</strong>"; GetRequest GetRequest1 = new GetRequest(); SymmetricMethod ss = new SymmetricMethod(); check ck = new check(); string uid = "0"; try { uid = ck.CheckNumber(ss.Decrypto(GetRequest1.GetRequestQueryString("uid", ""))); data_conn cn = new data_conn(); DataSet ds = new DataSet(); string sql = ""; sql = "SELECT userid FROM TB_TOPIC_REG WHERE userid = " + uid + ""; ds = cn.mdb_ds(sql, "user"); if (ds.Tables["user"].Rows.Count > 0) { Literal1.Text = "<strong><img style=\"margin:0 6px -6px 0;\" src=\"/images/mail/wr.gif\" width=\"32\" height=\"32\" />您已经提交过申请!</strong>"; } else { sql = "INSERT INTO TB_TOPIC_REG (userid) VALUES (" + uid + ")"; cn.mdb_exe(sql); Literal1.Text = "<strong><img style=\"margin:0 6px -6px 0;\" src=\"/images/mail/6464_034.png\" width=\"32\" height=\"32\" />您的申请已提交,感谢您的支持!</strong>"; } } catch { Literal1.Text = "<strong><img style=\"margin:0 6px -6px 0;\" src=\"/images/mail/wr.gif\" width=\"32\" height=\"32\" />抱歉,您需在注册邮件或普通会员注册页面中点击申请链接!</strong>"; } }
public void delete() { //删除信息 //要删除的纪录的ID,保存在delList隐藏控件内 string id = delList.Text; if (id!="") { data_conn cn = new data_conn(); string body = "尊敬的用户:<br/>"; body += "感谢您参与我们的论坛.<br/>"; body += "由于您在发布的帖子违反本论坛协议而被管理员删除.敬请谅解详情请见<a herf=\"www.100allin.com\">www.100allin.com</a><br/>"; body += "您在使用过程中,如有任何问题或建议,请随时联系傲赢网客户服务人员,我们将热忱为您服务。顺颂商祺!"; DataSet dsBBS = cn.mdb_ds("select UserEmail from TB_User,TB_BBS where TB_User.Userid=TB_BBS.Userid and TB_BBS.id in (" + id + ")", "deleteBBSEmail"); EmailSend email = new EmailSend(); for (int i = 0; i <= dsBBS.Tables["deleteBBSEmail"].Rows.Count - 1; i++) { try { } catch (Exception e) { email.send((string)dsBBS.Tables["deleteBBSEmail"].Rows[i]["UserEmail"].ToString(), body); } } DataSet ds = new DataSet(); string sql = ""; sql = sql + "delete from TB_Question where id in (" + id + ")"; cn.mdb_exe(sql); sql = "delete from TB_Question_Answer where QuestionID in (" + id + ")"; cn.mdb_exe(sql); sql = "delete from TB_Question_supplement where QuestionID in (" + id + ")"; cn.mdb_exe(sql); MessageBox("opsuccess", "删除成功"); //清空delList delList.Text = ""; } else { //没有选择任何要删除的ID,弹出此对话框 MessageBox("opfail", "未选择任何要删除的项目"); } }
protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { GetRequest GetRequest1 = new GetRequest(); check check1 = new check(); string pro1 = check1.CheckInput(CheckBox1.Checked == true ? "1" : "0"); //Response.Write(pro1 + ":" + pro2 + ":" + pro3 + ":" +pro4); string userid = check1.CheckInput(GetRequest1.GetRequestQueryString("user_id", "0")); string companyname = check1.CheckInput(TextBox1.Text); string realname = check1.CheckInput(TextBox2.Text); string gender = RadioButtonList1.SelectedValue; string rank = check1.CheckInput(TextBox3.Text); string phone = check1.CheckInput(TextBox4.Text + "-" + TextBox7.Text + "-" + TextBox8.Text); string movephone = check1.CheckInput(TextBox5.Text); string useremail = check1.CheckInput(TextBox6.Text); if (pro1 == "0") { MessageBox("", "您好!请至少选择一件产品"); } else { if (companyname == "" | realname == "" | gender == "" | rank == "" | TextBox7.Text == "" | TextBox8.Text == "" | movephone == "" | useremail == "") { MessageBox("", "您好!请将表格填写完整"); } else { data_conn cn = new data_conn(); string sql = ""; sql += "INSERT INTO TB_PRODUCTS_APPLY "; sql += "("; sql += "pro7,"; sql += "userid,"; sql += "companyname,"; sql += "realname,"; sql += "gender,"; sql += "rank,"; sql += "phone,"; sql += "movephone,"; sql += "useremail "; sql += ") VALUES ("; sql += "" + pro1 + ","; sql += "" + userid + ","; sql += "'" + companyname + "',"; sql += "'" + realname + "',"; sql += "'" + gender + "',"; sql += "'" + rank + "',"; sql += "'" + phone + "',"; sql += "'" + movephone + "',"; sql += "'" + useremail + "' "; sql += ")"; cn.mdb_exe(sql); Response.Redirect("success.aspx"); } } }
protected void Button1_Click(object sender, EventArgs e) { data_conn cn = new data_conn(); string sql = "update TB_NEWRATE set rate = '" + TextBox5.Text + "' ,rdate = getdate(), ratesimple = '" + TextBox1.Text + "|" + TextBox2.Text + "|" + TextBox3.Text + "|" + TextBox4.Text + "'"; //this.Response.Write(sql); cn.mdb_exe(sql); Response.Redirect("Setrate.aspx"); }
protected void Button2_Click(object sender, EventArgs e) { string sql = "update TB_TOPBBS set title='" + txttitle.Value + "',alttxt='" + txttitle.Value + "',linkurl='" + txtimagelink.Value + "' where tid=2"; data_conn cn = new data_conn(); cn.mdb_exe(sql); this.Response.Redirect("../titlelist.aspx"); }
protected void Button1_Click(object sender, EventArgs e) { check ck = new check(); data_conn cn = new data_conn(); string sql = "update TB_En_News set title='" + txtTitle.Text + "',content='" + ck.CheckRecord(Editor1.Text) + "',Postdate='" + TextBox1.Text + "' where id=" + this.Request["id"].ToString(); cn.mdb_exe(sql); this.Response.Redirect("En_NewList.aspx"); }
public void insert() { //if (Session["cargo_a"] == "" | Session["cargo_a"] == null) //{ // Response.Redirect("../search/err.aspx"); //} //else //{ //} if (nums.Value != "" && BasicDatePicker1_TextBox.Value != "" && tbGoodsName.Value != "") { string typem = "", ISDANGER; DropDownList type = new DropDownList(); if (rbldange_0.Checked) { ISDANGER = "0"; } else { ISDANGER = "1"; } check ck = new check(); data_conn cn = new data_conn(); string column = "userId,price,TITLE,POSTDATE,LAUNCHDATE,AMOUNT,PAYMENT,NAME,DESCRIPTION,LINE,STARTPORT,DESTPORT,TYPE,TYPES,TYPEM,ISDANGER,showtel,showmo,showadd,showemail,showcom"; string value = this.Request.Cookies["user_id"].Value + ",'" + ck.CheckInput(price.Value) + "','" + ck.CheckInput(txttitle.Value) + "',getdate(),'" + ck.CheckInput(BasicDatePicker1_TextBox.Value) + "','" + ck.CheckInput(nums.Value) + "','" + ck.CheckInput(ddlPayType.SelectedValue) + "','" + ck.CheckInput(tbGoodsName.Value) + "','" + ck.CheckInput(tbremark.Value) + "','" + ck.CheckInput(DropDownList1.SelectedValue) + "','" + ck.CheckInput(StartPort.Value) + "','" + ck.CheckInput(CityName.Value) + "','" + ck.CheckInput(type1.SelectedValue) + "','" + ck.CheckInput(types.SelectedValue) + "','海运货盘'," + ISDANGER + "," + tureToInt(chkTel.Checked) + "," + tureToInt(chkMobile.Checked) + "," + tureToInt(chkAddress.Checked) + "," + tureToInt(chkEmail.Checked) + "," + tureToInt(chkCompany.Checked) + ""; cn.mdb_exe("insert into TB_AIRGOODS (" + column + ") values (" + value + ")"); Session["cargo_a"] = ""; Response.Redirect("cargolist.aspx"); } else { MessageBox("", "必填项不能为空"); } //if (IsValidate()) //{ // SymmetricMethod ss = new SymmetricMethod(); // if (ss.Encrypto(Session["validate"].ToString()) == this.Request["validate"].ToString()) // { // } // else // { // this.Response.Write("原来就是你这个SB啊"); // } //} //else //{ // this.Response.Write("原来就是你这个SB啊"); //} }
protected void GridView2_RowUpdating(object sender, GridViewUpdateEventArgs e) { data_conn cn = new data_conn(); string sqlstr = "update TB_Attention set title='" + ((TextBox)(GridView2.Rows[e.RowIndex].Cells[3].FindControl("TextBox1"))).Text + "',urllink='" + ((TextBox)(GridView2.Rows[e.RowIndex].Cells[3].FindControl("TextBox2"))).Text + "' where id=" + GridView2.DataKeys[e.RowIndex].Value.ToString(); cn.mdb_exe(sqlstr); GridView2.EditIndex = -1; LoadGridView2(); }
protected void Button8_Click(object sender, EventArgs e) { data_conn cn = new data_conn(); if (FileUpload1.FileName.ToString() != "") { if (FileUpload1.FileName.ToString().Substring(FileUpload1.FileName.ToString().Length - 4, 4) != ".jpg" && FileUpload1.FileName.ToString().Substring(FileUpload1.FileName.ToString().Length - 4, 4) != ".bmp" && FileUpload1.FileName.ToString().Substring(FileUpload1.FileName.ToString().Length - 4, 4) != ".JPG" && FileUpload1.FileName.ToString().Substring(FileUpload1.FileName.ToString().Length - 4, 4) != ".BMP") { MessageBox("公司照片格式错误", "公司照片格式错误"); return; } string filepath; filepath = Server.MapPath("/member/companyhead/") + Request.Cookies["user_id"].Value.ToString() + "(old).jpg"; FileUpload1.SaveAs(filepath); ThumbnailImage thumbnailimage = new ThumbnailImage(); thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("/member/companyhead/") + Request.Cookies["user_id"].Value.ToString() + ".jpg", 256, 256); cn.mdb_exe("update TB_User set Login2_Head=1 where UserId=" + Request.Cookies["user_id"].Value.ToString()); } if (FileUpload2.FileName.ToString() != "") { if (FileUpload2.FileName.ToString().Substring(FileUpload2.FileName.ToString().Length - 4, 4) != ".jpg" && FileUpload2.FileName.ToString().Substring(FileUpload2.FileName.ToString().Length - 4, 4) != ".bmp") { MessageBox("个人头像格式错误", "个人头像格式错误"); return; } string filepath; filepath = Server.MapPath("/member/companyhead/") + Request.Cookies["user_id"].Value.ToString() + "(old).jpg"; FileUpload2.SaveAs(filepath); ThumbnailImage thumbnailimage = new ThumbnailImage(); thumbnailimage.GetThumbnailImage(filepath, Server.MapPath("/member/companyhead/") + Request.Cookies["user_id"].Value.ToString() + ".jpg", 256, 256); cn.mdb_exe("update TB_User set HeadURL=1 where UserId=" + Request.Cookies["user_id"].Value.ToString()); } string sql = "update TB_User set sign='" + TextBox1.Text + "',User_Level=2 where UserID=" + this.Request.Cookies["user_id"].Value.ToString(); cn.mdb_exe(sql); ScriptManager.RegisterStartupScript(this, this.GetType(), "提示", "alert('修改成功');window.location.href='useredit1.aspx'", true); //this.Response.Redirect("useredit1.aspx"); //displayDiv(); }
protected void Button1_Click(object sender, EventArgs e) { check ck = new check(); data_conn cn = new data_conn(); string sql = "update TB_BBS set title='" + txtTitle.Text + "',Data='" + ck.CheckRecord(content1.Value) + "',EditDate=getdate(),Postdate='" + BasicDatePicker1_TextBox.Value + "',types = " + DropDownList1.SelectedValue.ToString() + ",UserID=41 where id=" + this.Request["id"].ToString(); cn.mdb_exe(sql); //this.Response.Write(sql); this.Response.Redirect("NewList.aspx"); }
protected void Button1_Click(object sender, EventArgs e) { check ck = new check(); data_conn cn = new data_conn(); string sql = "update TB_BBS set title='" + txtTitle.Text + "',Data='" + ck.CheckRecord(Editor1.Text) + "',EditDate=getdate(),Postdate='" + TextBox1.Text + "',UserID=381 where id=" + this.Request["id"].ToString(); cn.mdb_exe(sql); //this.Response.Write(sql); this.Response.Redirect("NewList.aspx"); }
void PageRecord() { check ck = new check(); string request; if (Request.ServerVariables["HTTP_REFERER"] == null) { request = ""; } else { request = Request.ServerVariables["HTTP_REFERER"].ToString(); request = ck.CheckRecord(request); } string page = Request.Url.ToString(); page = ck.CheckRecord(page); string pagefile = Request.Url.AbsolutePath.ToString(); pagefile = ck.CheckRecord(pagefile); string pagesql = "select pagearea from TB_PageArea where pageaddress = '" + pagefile + "'"; data_conn cn = new data_conn(); DataSet ds = new DataSet(); ds = cn.mdb_ds(pagesql, "TB_PageArea"); string pagearea = ""; if (ds.Tables["TB_PageArea"].Rows.Count > 0) { pagearea = ds.Tables["TB_PageArea"].Rows[0][0].ToString(); } string address = Page.Request.UserHostAddress; if (this.Request.Cookies["user_id"] == null) { string sql = "insert into TB_BrowseRecord (Userid,UserIP,Pageid,NowTime,Request,page,pagearea) values (0,'" + address + "',1,Getdate(),'" + request + "','" + page + "','" + pagearea + "')"; cn.mdb_exe(sql); } else { if (this.Request.Cookies["user_id"].Value == "") { string sql = "insert into TB_BrowseRecord (Userid,UserIP,Pageid,NowTime,Request,page,pagearea) values (0,'" + address + "',1,Getdate(),'" + request + "','" + page + "','" + pagearea + "')"; cn.mdb_exe(sql); } else { string a = this.Request.Cookies["user_id"].Value; string sql = "insert into TB_BrowseRecord (Userid,UserIP,Pageid,NowTime,Request,page,pagearea) values (" + this.Request.Cookies["user_id"].Value + ",'" + address + "',1,Getdate(),'" + request + "','" + page + "','" + pagearea + "')"; cn.mdb_exe(sql); } } }
protected void Button1_Click(object sender, EventArgs e) { //Label1.Text = Editor1.Text; check ck = new check(); data_conn cn = new data_conn(); string sql = "insert into TB_Exhibition (title,detail,PostDate) values ('" + txtTitle.Text + "','" + ck.CheckRecord(Editor1.Text) + "',getdate())"; //this.Response.Write(sql); cn.mdb_exe(sql); this.Response.Redirect("ExhibitionList.aspx"); }
protected void Button1_Click(object sender, EventArgs e) { //Label1.Text = Editor1.Text; check ck = new check(); data_conn cn = new data_conn(); string sql = "update TB_Exhibition set title='" + txtTitle.Text + "',detail='" + ck.CheckRecord(Editor1.Text) + "',PostDate=getdate() where id=" + this.Request["id"].ToString(); //this.Response.Write(sql); cn.mdb_exe(sql); this.Response.Redirect("ExhibitionList.aspx"); }
protected void Button1_Click(object sender, EventArgs e) { AllinOrder AllinOrder1 = new AllinOrder(); check ck = new check(); data_conn cn = new data_conn(); DataSet ds = new DataSet(); string sql = ""; sql = "SELECT * FROM TB_ORDER WHERE order_code = '" + ck.CheckInput(GetRequestQueryString("orderid", "0")) + "'"; ds = cn.mdb_ds(sql,"TB_ORDER"); string userid = ds.Tables["TB_ORDER"].Rows[0]["order_forward"].ToString(); string ping = ""; if (RadioButtonList1.SelectedValue == "1") { ping = "haoping"; } if (RadioButtonList1.SelectedValue == "0") { ping = "zhongping"; } if (RadioButtonList1.SelectedValue == "-1") { ping = "chaping"; } sql = "UPDATE TB_ORDER_ACCOUNT SET POINT = POINT + " + RadioButtonList1.SelectedValue + "," + ping + " = " + ping + " + 1 WHERE userid = " + userid; cn.mdb_exe(sql); sql = "UPDATE TB_ORDER SET yiping_forward = 1,ping_forward = ping_forward + " + RadioButtonList1.SelectedValue + ",evaluation_forward = '" + TextBox1.Text + "' WHERE order_code = '" + ck.CheckInput(GetRequestQueryString("orderid", "0")) + "'"; cn.mdb_exe(sql); AllinOrder1.SetUserStar(userid); Response.Redirect("order_success.aspx?type=evaluation&orderid=" + GetRequestQueryString("orderid", "0")); }
protected void Button1_Click(object sender, EventArgs e) { //Label1.Text = Editor1.Text; check ck = new check(); data_conn cn = new data_conn(); string sql = "insert into TB_BBS (title,UserID,Data,PostDate,hits,UpdateDate,types) values ('" + txtTitle.Text + "',41,'" + ck.CheckRecord(TextBox3.Text) + "','" + BasicDatePicker1_TextBox.Value + "',0,getdate()," + DropDownList1.SelectedValue.ToString() + ")"; //this.Response.Write(sql); cn.mdb_exe(sql); this.Response.Redirect("NewList.aspx"); }
protected void Flower9Users(string uno) { data_conn cn = new data_conn(); string sql = ""; sql = ""; sql += "UPDATE TB_2009_9USERS SET flower = flower + 1 WHERE uno = " + uno; cn.mdb_exe(sql); ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "提示", "alert('谢谢CCTV,谢谢MTV,谢谢大家!');", true); Load9Users(); }
protected void Brick9Users(string uno) { data_conn cn = new data_conn(); string sql = ""; sql = ""; sql += "UPDATE TB_2009_9USERS SET brick = brick + 1 WHERE uno = " + uno; cn.mdb_exe(sql); ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "提示", "alert('各位大哥大姐,请手下留情啊!');", true); Response.Cookies["2009_9users"].Value = "1"; Load9Users(); }
protected void Button1_Click(object sender, EventArgs e) { userid = ck.CheckNumber(GetRequest1.GetRequestQueryString("id", "0")); string star_allin = ck.CheckInput(rbl_star_allin.SelectedValue); //输入方式 string z_yingyezhizhao = "0"; if (cb_z_yingyezhizhao.Checked == true) { z_yingyezhizhao = "1"; } string z_shenfenzheng = "0"; if (cb_z_shenfenzheng.Checked == true) { z_shenfenzheng = "1"; } string z_nvocc = "0"; if (cb_z_nvocc.Checked == true) { z_nvocc = "1"; } string z_kongyuntongpai = "0"; if (cb_z_kongyuntongpai.Checked == true) { z_kongyuntongpai = "1"; } System.Threading.Thread.Sleep(1000); data_conn cn = new data_conn(); DataSet ds = new DataSet(); string sql = ""; if (userid != "0") { sql = sql + "UPDATE TB_USER SET "; sql = sql + "star_allin = " + star_allin + ", "; sql = sql + "z_yingyezhizhao = '" + z_yingyezhizhao + "', "; sql = sql + "z_shenfenzheng = " + z_shenfenzheng + ", "; sql = sql + "z_nvocc = " + z_nvocc + ", "; sql = sql + "z_kongyuntongpai = " + z_kongyuntongpai + " "; sql = sql + "WHERE userid = " + userid + " "; cn.mdb_exe(sql); //Literal1.Text = sql; ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "提示", "alert('编辑成功!');", true); } }
protected void Button1_Click(object sender, EventArgs e) { data_conn cn = new data_conn(); string sql = ""; sql = sql + "UPDATE "; sql = sql + "TB_File "; sql = sql + "SET "; sql = sql + "Content = '" + myTextArea.Value.ToString() + "' "; sql = sql + "WHERE "; sql = sql + "ID=298 "; cn.mdb_exe(sql); }
protected void btnCredits_Click(object sender, EventArgs e) { System.Threading.Thread.Sleep(100); check ck = new check(); string order_code = ck.CheckInput(txtCode.Text); string credits = ck.CheckInput(txtCredits.Text); if (RadioButtonList2.SelectedValue.ToString() == "0") { credits = (0 - Convert.ToInt32(credits)).ToString(); } data_conn cn = new data_conn(); string sql = ""; sql += "UPDATE TB_ORDER_ACCOUNT SET credit = credit + " + credits + ",overage = overage + " + credits + " WHERE userid = '" + order_code + "'"; cn.mdb_exe(sql); int starallin_add = 0; starallin_add = (Convert.ToInt32(txtTempCreditsOrigin.Value) + Convert.ToInt32(credits)) / 1000; sql = "UPDATE TB_USER SET star_allin = " + starallin_add + " WHERE userid = '" + order_code + "'"; cn.mdb_exe(sql); sql = "SELECT * FROM TB_ORDER_ACCOUNT WHERE userid = '" + order_code + "'"; DataSet ds = new DataSet(); ds = cn.mdb_ds(sql, "account"); string overage_all = ""; overage_all = ds.Tables["account"].Rows[0]["overage"].ToString(); sql = "INSERT INTO TB_ORDER_ACCOUNT_DETAIL (detail_date,order_code,userid,otherid,status,fee,overage,ispay) "; sql += "VALUES (getdate(),''," + order_code + ",0,'预存费用'," + credits + "," + overage_all + ",0)"; cn.mdb_exe(sql); LoadListData(); }
protected void Button1_Click(object sender, EventArgs e) { check check1 = new check(); data_conn cn = new data_conn(); string sql = ""; sql = sql + "update TB_HOT_PORT set "; sql = sql + "startport = '" + check1.CheckInput(txt_startport.Text) + "', "; sql = sql + "destport = '" + check1.CheckInput(txt_destport.Text) + "', "; sql = sql + "htype = " + check1.CheckInput(txt_htype.Text) + ", "; sql = sql + "horder = " + check1.CheckInput(txt_horder.Text) + " "; sql = sql + "where hid = " + Request.QueryString["id"].ToString(); cn.mdb_exe(sql); Response.Redirect("list.aspx"); }
protected void Button1_Click(object sender, EventArgs e) { check check1 = new check(); data_conn cn = new data_conn(); string sql = ""; sql = sql + "update TB_NEWYEARMERRY2011 set "; sql = sql + "companyname = '" + check1.CheckInput(txt_companyname.Text) + "', "; sql = sql + "zhufu = '" + check1.CheckInput(txt_zhufu.Text) + "' "; sql = sql + "where nid = " + Request.QueryString["id"].ToString(); cn.mdb_exe(sql); Response.Redirect("list.aspx"); }