/// <summary> /// ɾ�� /// </summary> /// <returns></returns> public bool Delete() { bool ret = true; DAO db = new DAO(); try { //��ɾ��ѡ�� String sql_option = "delete from JpVoteOptions where id=@id "; SqlParameter[] sqlparam_option = { db.MakeInParam("@id",SqlDbType.Int,id), }; db.Execute(sql_option, sqlparam_option); String sql = "delete from JpVote where id=@id "; SqlParameter[] sqlparam = { db.MakeInParam("@id",SqlDbType.Int,id), }; db.Execute(sql, sqlparam); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
/// <summary> /// 插入 /// </summary> /// <returns></returns> public bool Insert() { bool ret = true; DAO db = new DAO(); try { String sqlInsert = " insert into hy_verifycode(hy_tel,hy_code,hy_addtime) values (@hy_tel,@hy_code,@hy_addtime)"; SqlParameter[] sqlparam = {db.MakeInParam("@hy_addtime",SqlDbType.DateTime,hy_addtime), db.MakeInParam("@hy_tel",SqlDbType.VarChar,hy_tel), db.MakeInParam("@hy_code",SqlDbType.VarChar,hy_code) }; db.Execute(sqlInsert, sqlparam); } catch (Exception ex) { throw ex; ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
/// <summary> /// ɾ�� /// </summary> /// <returns></returns> public bool Delete() { bool ret = true; DAO db = new DAO(); try { String sql = "delete from JpDepts where deptid=@deptid "; SqlParameter[] sqlparam = { db.MakeInParam("@deptid",SqlDbType.VarChar,deptid), }; db.Execute(sql, sqlparam); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
/// <summary> /// ɾ��ij��Ŀ�����й��� /// </summary> /// <returns></returns> public bool DeleteBycid(string cid) { bool ret = true; DAO db = new DAO(); try { string sql = " delete JpColumnRelations where cid=@cid "; SqlParameter[] sqlparam = { db.MakeInParam("@cid",SqlDbType.VarChar,cid), }; db.Execute(sql, sqlparam); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
/// <summary> /// ɾ�� /// </summary> /// <returns></returns> public bool Delete() { bool ret = true; DAO db = new DAO(); try { String sql = "delete from JpOpinionHF where id=@id "; SqlParameter[] sqlparam = { db.MakeInParam("@id",SqlDbType.Int,id), }; db.Execute(sql, sqlparam); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
/// <summary> /// ɾ����� /// </summary> /// <returns></returns> public bool DeleteAll(string uids) { bool ret = true; DAO db = new DAO(); try { String sql = "delete from JpStudents where @uid like '%,'+uid+',%'"; SqlParameter[] sqlparam = { db.MakeInParam("@uid",SqlDbType.VarChar,uids), }; db.Execute(sql, sqlparam); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
/// <summary> /// 删除 /// </summary> /// <returns></returns> public bool Delete() { bool ret = true; DAO db = new DAO(); try { //先删除选项 String sql_option = "delete from hy_guidepage where id=@id "; SqlParameter[] sqlparam_option = { db.MakeInParam("@id",SqlDbType.Int,id), }; db.Execute(sql_option, sqlparam_option); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
/// <summary> /// ɾ�� /// </summary> /// <returns></returns> public bool Delete() { bool ret = true; DAO db = new DAO(); try { string sql = "delete from JpTemplate where url=@url "; SqlParameter[] sqlparam = { db.MakeInParam("@url",SqlDbType.VarChar,url), }; db.Execute(sql, sqlparam); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
//提交 protected void btnSubmit_Click(object sender, EventArgs e) { if (this.Session["uid"] == null || this.Session["uid"].ToString() == "") { this.Response.Redirect("../login.aspx"); } string ls_tip = "审核成功!"; TPortalClass.JpActivity JpActivity = new TPortalClass.JpActivity(); TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon(); TPortalClass.DAO db = new TPortalClass.DAO(); string sql_cg = "update hy_activity set hy_ifsh=2 where id=" + System.Int32.Parse(this.txtid.Value) + ""; db.Execute(sql_cg); //写系统日志 string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (userip == null || userip == "") { userip = Request.ServerVariables["REMOTE_ADDR"]; } JpCommon.WriteLog(userip, "审核", "审核活动记录[id:" + this.txtid.Value + "]", Session["uid"].ToString(), Session["uname"].ToString()); JpActivity.Update(); Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>"); }
//受理 protected void btnDeal_Click(object sender, EventArgs e) { TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon(); TPortalClass.JpAdver JpAdver = new TPortalClass.JpAdver(); string ls_tip = "受理成功!"; for (int i = 0; i < rptList.Items.Count; i++) { string id = ((HiddenField)rptList.Items[i].FindControl("hidId")).Value; CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId"); if (cb.Checked) { TPortalClass.DAO db = new DAO(); string sql = "update hy_help set hy_ifsh=1 where id=" + int.Parse(id) + ""; db.Execute(sql); } } string pageUrl = JpCommon.CombUrlTxt("list_help_sh.aspx", "page={0}&rnd={1}", "" + this.txtPage.Text + "", "" + System.Guid.NewGuid().ToString() + ""); //写系统日志 string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (userip == null || userip == "") { userip = Request.ServerVariables["REMOTE_ADDR"]; } JpCommon.WriteLog(userip, "审核", "批量受理帮办记录", Session["uid"].ToString(), Session["uname"].ToString()); Response.Write("<script>alert('" + ls_tip + "');window.location='" + pageUrl + "';</script>"); }
//答复 protected void btnSubmit_Click(object sender, EventArgs e) { if (this.Session["uid"] == null || this.Session["uid"].ToString() == "") { this.Response.Redirect("../login.aspx"); } string ls_tip = "答复成功!"; TPortalClass.DAO db = new TPortalClass.DAO(); TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon(); string ls_ = txthy_reply.Text; int ls_hy_ifsh = 2; //写系统日志 string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (userip == null || userip == "") { userip = Request.ServerVariables["REMOTE_ADDR"]; } JpCommon.WriteLog(userip, "答复", "答复求助记录[id:" + this.txtid.Value + "]", Session["uid"].ToString(), Session["uname"].ToString()); string sql_Update = " UPDATE hy_help SET"; sql_Update += " hy_reply ='" + txthy_reply.Text + "'"; sql_Update += " , hy_replytime ='" + DateTime.Now.ToString("yyyy-MM-dd") + "'"; sql_Update += " , hy_ifsh =" + ls_hy_ifsh + " where id=" + Convert.ToInt32(txtid.Value.Trim()) + ""; db.Execute(sql_Update); Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>"); }
public bool Update() { bool ret = true; DAO db = new DAO(); try { String sql = "UPDATE JpPubHtml SET pages=@pages,days=@days,status=@status where id=@id"; SqlParameter[] sqlparam = { db.MakeInParam("@id",SqlDbType.VarChar,id), db.MakeInParam("@pages",SqlDbType.VarChar,pages), db.MakeInParam("@days",SqlDbType.VarChar,days), db.MakeInParam("@status",SqlDbType.VarChar,status), }; db.Execute(sql, sqlparam); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
public bool Insert() { bool ret = true; DAO db = new DAO(); try { string sql = " insert into JpPubHtml(id,pages,days,status) values (@id,@pages,@days,@status)"; SqlParameter[] sqlparam = { db.MakeInParam("@id",SqlDbType.VarChar,id), db.MakeInParam("@pages",SqlDbType.VarChar,pages), db.MakeInParam("@days",SqlDbType.VarChar,days), db.MakeInParam("@status",SqlDbType.VarChar,status), }; db.Execute(sql, sqlparam); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
public bool DeleteImg(string id) { bool ret = true; DAO db = new DAO(); try { string sql = "delete from hy_fileatt where id=@id "; SqlParameter[] sqlparam = new SqlParameter[] { db.MakeInParam("@id", SqlDbType.VarChar, id) }; db.Execute(sql, sqlparam); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
//ɾ�� public void DeleteAll(String ids) { DAO db = new DAO(); String sql = "Delete FROM JpNews where @aids like '%,'+cast(aid as varchar(12))+',%'"; SqlParameter[] prams ={ db.MakeInParam("@aids", SqlDbType.VarChar, ids) }; db.Execute(sql, prams); db.Close(); }
protected void Page_Load(object sender, EventArgs e) { Response.CacheControl = "no-cache"; string ls_update = ""; string ls_filename = ""; string ls_path = ""; string ls_id = Request.Form["id"].ToString(); //string lshy_fatherfield = Request.Form["txtcurloginuserid"].ToString(); //string lshy_fatherid = Request.Form["fatherid"].ToString(); //string hy_userid = Request.Form["userid"].ToString(); //Request.Params["fatherid"].ToString()+"\\"+Request.Params["fatherfield"].ToString(); //string Datedir = DateTime.Now.ToString("yy-MM-dd"); //string updir = s_rpath + "\\" + Datedir; //string updir = s_rpath; if (Request.Files["file"].ContentLength > 0) { try { string updir = Server.MapPath("~/") + "upload\\original\\rytx\\"; DAO db = new DAO(); DataTable dt = new DataTable(); HttpPostedFile uploadFile = Request.Files["file"]; //if (uploadFile.ContentLength > 0) //{ if (!Directory.Exists(updir)) { Directory.CreateDirectory(updir); } //string extname = Path.GetExtension(uploadFile.FileName); //string filename = uploadFile.FileName; //lsfilename = filename; //lsurl = "fileatt\\" + filename; //存放的文件夹 //uploadFile.SaveAs(string.Format("{0}\\{1}", updir, filename)); ls_filename = ls_id + ".jpg"; uploadFile.SaveAs(updir + ls_filename); ls_path = "upload\\original\\rytx\\" + ls_filename; string sql_user = "******" + ls_path + "' "; sql_user += " where hy_id='" + ls_id + "'"; db.Execute(sql_user); //} } catch (Exception ex) { Response.Write("Message"+ ex.ToString()); } } }
public void DeleteAll(String cid) { DAO db = new DAO(); String sql = "Delete FROM JpColumnsStyle where cid=@cid "; SqlParameter[] prams ={ db.MakeInParam("@cid", SqlDbType.VarChar, cid) }; db.Execute(sql, prams); db.Close(); }
public Int32 Insert() { try { String sql = "INSERT INTO JpNews(cid,kcid,title,subhead,content,authorid,author,status,crtime,modtime,pubtime,hits,GUID)"; sql += " VALUES(@cid,@kcid,@title,@subhead,@content,@authorid,@author,@status,getdate(),getdate(),getdate(),0,@GUID)"; GUID = System.Guid.NewGuid().ToString(); DAO db = new DAO(); SqlParameter[] prams ={ db.MakeInParam("@cid",SqlDbType.VarChar,cid), db.MakeInParam("@kcid",SqlDbType.VarChar,kcid), db.MakeInParam("@title",SqlDbType.VarChar,title), db.MakeInParam("@subhead",SqlDbType.VarChar,subhead), db.MakeInParam("@content",SqlDbType.VarChar,content), db.MakeInParam("@authorid",SqlDbType.VarChar,authorid), db.MakeInParam("@author",SqlDbType.VarChar,author), db.MakeInParam("@status",SqlDbType.VarChar,status), db.MakeInParam("@GUID",SqlDbType.VarChar,GUID), }; db.Execute(sql, prams); db.Close(); sql = "Select aid from JpNews where GUID=@GUID"; SqlParameter[] prams1 ={ db.MakeInParam("@GUID",SqlDbType.VarChar,GUID), }; DataTable dt = db.GetDataTable(sql, prams1); if (dt.Rows.Count > 0) { this.aid = System.Int32.Parse(dt.Rows[0]["aid"].ToString()); } return aid; } catch { return -2; } finally { } }
/// <summary> /// ɾ����� /// roleids��ʽ��,1111,2222,33333, /// </summary> /// <returns></returns> public bool DeleteAll(string roleids) { bool ret = true; String sql = "delete from JpRole where @hy_roleid like '%,'+hy_roleid+',%'"; DAO db = new DAO(); SqlParameter[] prams ={ db.MakeInParam("@hy_roleid",SqlDbType.VarChar,roleids), }; try { db.Execute(sql, prams); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
//ɾ����ɫ�е���Ա public bool Delete(string groupid,string uid) { bool ret = true; DAO db = new DAO(); try { String sql = " delete from JpGroupUser "; sql += " where groupid='" + groupid + "'"; sql += " and uid='" + uid + "'"; db.Execute(sql); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
/// <summary> /// ɾ������ /// </summary> /// <returns></returns> public bool Delete() { bool ret = true; String sql = "delete from JpLog where ID=@ID "; DAO db = new DAO(); SqlParameter[] prams ={ db.MakeInParam("@ID",SqlDbType.VarChar,ID), }; try { db.Execute(sql, prams); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
/// <summary> /// ɾ������ /// </summary> /// <returns></returns> public bool DeleteByDate(String hits_date) { bool ret = true; String sql = "delete from JpHits where hits_date=@hits_date "; DAO db = new DAO(); SqlParameter[] prams ={ db.MakeInParam("@hits_date",SqlDbType.VarChar,hits_date), }; try { db.Execute(sql, prams); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
/// <summary> /// ɾ������ /// </summary> /// <returns></returns> public bool DeleteById(String id) { bool ret = true; String sql = "delete from JpHits where id=@id "; DAO db = new DAO(); SqlParameter[] prams ={ db.MakeInParam("@id",SqlDbType.VarChar,id), }; try { db.Execute(sql, prams); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
/// <summary> /// ��� /// </summary> /// <returns></returns> public bool Insert() { bool ret = true; String sql = "insert into JpLog(ID,hy_createtime,hy_oppip,hy_opptype,hy_oppcontent,hy_oppuserid,hy_oppusername) values "; sql += "(@ID,@hy_createtime,@hy_oppip,@hy_opptype,@hy_oppcontent,@hy_oppuserid,@hy_oppusername) "; DAO db = new DAO(); SqlParameter[] prams ={ db.MakeInParam("@ID",SqlDbType.VarChar,ID), db.MakeInParam("@hy_createtime",SqlDbType.VarChar,hy_createtime), db.MakeInParam("@hy_oppip",SqlDbType.VarChar,hy_oppip), db.MakeInParam("@hy_opptype",SqlDbType.VarChar,hy_opptype), db.MakeInParam("@hy_oppcontent",SqlDbType.VarChar,hy_oppcontent), db.MakeInParam("@hy_oppuserid",SqlDbType.VarChar,hy_oppuserid), db.MakeInParam("@hy_oppusername",SqlDbType.VarChar,hy_oppusername), }; try { db.Execute(sql, prams); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
/// <summary> /// ���Ʋɼ� /// </summary> /// <returns></returns> public bool Copydoc() { bool ret = true; DAO db = new DAO(); try { string sql = "insert into JpCollect (ItemName,ClassId,WebEncode,WebName,WebUrl,ItemRemark,Script_Iframe"; sql += ",Script_Object,Script_Script,Script_Div,Script_Table,Script_Span,Script_Img,Script_Font"; sql += ",Script_A,Script_Html,IsSaveImg,IsDesc,CollecNum,ListUrl,ListStart"; sql += ",ListEnd,LinkStart,LinkEnd,TitleStart,TitleEnd,RemoveTitle,KeyWordStart"; sql += ",KeyWordEnd,DateStart,DateEnd,SourceStart,SourceEnd,ContentStart,ContentEnd"; sql += ",RemoveBodyStart,RemoveBodyEnd,NextPageRegex) values ("; sql += "@ItemName,@ClassId,@WebEncode,@WebName,@WebUrl,@ItemRemark,@Script_Iframe"; sql += ",@Script_Object,@Script_Script,@Script_Div,@Script_Table,@Script_Span,@Script_Img,@Script_Font"; sql += ",@Script_A,@Script_Html,@IsSaveImg,@IsDesc,@CollecNum,@ListUrl,@ListStart"; sql += ",@ListEnd,@LinkStart,@LinkEnd,@TitleStart,@TitleEnd,@RemoveTitle,@KeyWordStart"; sql += ",@KeyWordEnd,@DateStart,@DateEnd,@SourceStart,@SourceEnd,@ContentStart,@ContentEnd"; sql += ",@RemoveBodyStart,@RemoveBodyEnd,@NextPageRegex"; sql += ")"; SqlParameter[] sqlparam = { db.MakeInParam("@ItemName",SqlDbType.VarChar,ItemName), db.MakeInParam("@ClassId",SqlDbType.VarChar,ClassId), db.MakeInParam("@WebEncode",SqlDbType.VarChar,WebEncode), db.MakeInParam("@WebName",SqlDbType.VarChar,WebName), db.MakeInParam("@WebUrl",SqlDbType.VarChar,WebUrl), db.MakeInParam("@ItemRemark",SqlDbType.VarChar,ItemRemark), db.MakeInParam("@Script_Iframe",SqlDbType.Int,Script_Iframe), db.MakeInParam("@Script_Object",SqlDbType.Int,Script_Object), db.MakeInParam("@Script_Script",SqlDbType.Int,Script_Script), db.MakeInParam("@Script_Div",SqlDbType.Int,Script_Div), db.MakeInParam("@Script_Table",SqlDbType.Int,Script_Table), db.MakeInParam("@Script_Span",SqlDbType.Int,Script_Span), db.MakeInParam("@Script_Img",SqlDbType.Int,Script_Img), db.MakeInParam("@Script_Font",SqlDbType.Int,Script_Font), db.MakeInParam("@Script_A",SqlDbType.Int,Script_A), db.MakeInParam("@Script_Html",SqlDbType.Int,Script_Html), db.MakeInParam("@IsSaveImg",SqlDbType.Int,IsSaveImg), db.MakeInParam("@IsDesc",SqlDbType.Int,IsDesc), db.MakeInParam("@CollecNum",SqlDbType.Int,CollecNum), db.MakeInParam("@ListUrl",SqlDbType.VarChar,ListUrl), db.MakeInParam("@ListStart",SqlDbType.VarChar,ListStart), db.MakeInParam("@ListEnd",SqlDbType.VarChar,ListEnd), db.MakeInParam("@LinkStart",SqlDbType.VarChar,LinkStart), db.MakeInParam("@LinkEnd",SqlDbType.VarChar,LinkEnd), db.MakeInParam("@TitleStart",SqlDbType.VarChar,TitleStart), db.MakeInParam("@TitleEnd",SqlDbType.VarChar,TitleEnd), db.MakeInParam("@RemoveTitle",SqlDbType.VarChar,RemoveTitle), db.MakeInParam("@KeyWordStart",SqlDbType.VarChar,KeyWordStart), db.MakeInParam("@KeyWordEnd",SqlDbType.VarChar,KeyWordEnd), db.MakeInParam("@DateStart",SqlDbType.VarChar,DateStart), db.MakeInParam("@DateEnd",SqlDbType.VarChar,DateEnd), db.MakeInParam("@SourceStart",SqlDbType.VarChar,SourceStart), db.MakeInParam("@SourceEnd",SqlDbType.VarChar,SourceEnd), db.MakeInParam("@ContentStart",SqlDbType.VarChar,ContentStart), db.MakeInParam("@ContentEnd",SqlDbType.VarChar,ContentEnd), db.MakeInParam("@RemoveBodyStart",SqlDbType.VarChar,RemoveBodyStart), db.MakeInParam("@RemoveBodyEnd",SqlDbType.VarChar,RemoveBodyEnd), db.MakeInParam("@NextPageRegex",SqlDbType.VarChar,NextPageRegex), }; db.Execute(sql, sqlparam); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
/// <summary> /// �IJɼ����ݲ��� /// </summary> /// <returns></returns> public bool UpdateCjnrcs() { bool ret = true; DAO db = new DAO(); try { String sql = "update JpCollect set State='0' where Id=@Id"; SqlParameter[] sqlparam = { db.MakeInParam("@Id",SqlDbType.Int,Id), }; db.Execute(sql, sqlparam); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
/// <summary> /// �IJɼ����� /// </summary> /// <returns></returns> public bool UpdateCjnr() { bool ret = true; DAO db = new DAO(); try { String sql = "update JpCollect set TitleStart=@TitleStart,TitleEnd=@TitleEnd,RemoveTitle=@RemoveTitle"; sql += ",KeyWordStart=@KeyWordStart,KeyWordEnd=@KeyWordEnd,DateStart=@DateStart,DateEnd=@DateEnd"; sql += ",SourceStart=@SourceStart,SourceEnd=@SourceEnd,ContentStart=@ContentStart,ContentEnd=@ContentEnd"; sql += ",RemoveBodyStart=@RemoveBodyStart,RemoveBodyEnd=@RemoveBodyEnd,NextPageRegex=@NextPageRegex"; sql += " where Id=@Id"; SqlParameter[] sqlparam = { db.MakeInParam("@Id",SqlDbType.Int,Id), db.MakeInParam("@TitleStart",SqlDbType.VarChar,TitleStart), db.MakeInParam("@TitleEnd",SqlDbType.VarChar,TitleEnd), db.MakeInParam("@RemoveTitle",SqlDbType.VarChar,RemoveTitle), db.MakeInParam("@KeyWordStart",SqlDbType.VarChar,KeyWordStart), db.MakeInParam("@KeyWordEnd",SqlDbType.VarChar,KeyWordEnd), db.MakeInParam("@DateStart",SqlDbType.VarChar,DateStart), db.MakeInParam("@DateEnd",SqlDbType.VarChar,DateEnd), db.MakeInParam("@SourceStart",SqlDbType.VarChar,SourceStart), db.MakeInParam("@SourceEnd",SqlDbType.VarChar,SourceEnd), db.MakeInParam("@ContentStart",SqlDbType.VarChar,ContentStart), db.MakeInParam("@ContentEnd",SqlDbType.VarChar,ContentEnd), db.MakeInParam("@RemoveBodyStart",SqlDbType.VarChar,RemoveBodyStart), db.MakeInParam("@RemoveBodyEnd",SqlDbType.VarChar,RemoveBodyEnd), db.MakeInParam("@NextPageRegex",SqlDbType.VarChar,NextPageRegex), }; db.Execute(sql, sqlparam); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
/// <summary> /// �IJɼ��б����� /// </summary> /// <returns></returns> public bool UpdateCjlblj() { bool ret = true; DAO db = new DAO(); try { String sql = "update JpCollect set LinkStart=@LinkStart,LinkEnd=@LinkEnd"; sql += " where Id=@Id"; SqlParameter[] sqlparam = { db.MakeInParam("@Id",SqlDbType.Int,Id), db.MakeInParam("@LinkStart",SqlDbType.VarChar,LinkStart), db.MakeInParam("@LinkEnd",SqlDbType.VarChar,LinkEnd), }; db.Execute(sql, sqlparam); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
/// <summary> /// �IJɼ�������Ϣ /// </summary> /// <returns></returns> public bool UpdateCjjbxx() { bool ret = true; DAO db = new DAO(); try { String sql = "update JpCollect set ItemName=@ItemName,ClassId=@ClassId,WebEncode=@WebEncode"; sql += ",WebName=@WebName,WebUrl=@WebUrl,ItemRemark=@ItemRemark"; sql += ",Script_Iframe=@Script_Iframe,Script_Object=@Script_Object,Script_Script=@Script_Script"; sql += ",Script_Div=@Script_Div,Script_Table=@Script_Table,Script_Span=@Script_Span"; sql += ",Script_Img=@Script_Img,Script_Font=@Script_Font,Script_A=@Script_A"; sql += ",Script_Html=@Script_Html,IsSaveImg=@IsSaveImg,IsDesc=@IsDesc"; sql += ",CollecNum=@CollecNum where Id=@Id"; SqlParameter[] sqlparam = { db.MakeInParam("@Id",SqlDbType.Int,Id), db.MakeInParam("@ItemName",SqlDbType.VarChar,ItemName), db.MakeInParam("@ClassId",SqlDbType.VarChar,ClassId), db.MakeInParam("@WebEncode",SqlDbType.VarChar,WebEncode), db.MakeInParam("@WebName",SqlDbType.VarChar,WebName), db.MakeInParam("@WebUrl",SqlDbType.VarChar,WebUrl), db.MakeInParam("@ItemRemark",SqlDbType.VarChar,ItemRemark), db.MakeInParam("@Script_Iframe",SqlDbType.Int,Script_Iframe), db.MakeInParam("@Script_Object",SqlDbType.Int,Script_Object), db.MakeInParam("@Script_Script",SqlDbType.Int,Script_Script), db.MakeInParam("@Script_Div",SqlDbType.Int,Script_Div), db.MakeInParam("@Script_Table",SqlDbType.Int,Script_Table), db.MakeInParam("@Script_Span",SqlDbType.Int,Script_Span), db.MakeInParam("@Script_Img",SqlDbType.Int,Script_Img), db.MakeInParam("@Script_Font",SqlDbType.Int,Script_Font), db.MakeInParam("@Script_A",SqlDbType.Int,Script_A), db.MakeInParam("@Script_Html",SqlDbType.Int,Script_Html), db.MakeInParam("@IsSaveImg",SqlDbType.Int,IsSaveImg), db.MakeInParam("@IsDesc",SqlDbType.Int,IsDesc), db.MakeInParam("@CollecNum",SqlDbType.Int,CollecNum), }; db.Execute(sql, sqlparam); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }
/// <summary> /// �½��ɼ� /// </summary> /// <returns></returns> public bool Insert() { bool ret = true; DAO db = new DAO(); try { string sql = "insert into JpCollect (ItemName,ClassId,WebEncode,WebName,WebUrl,ItemRemark,Script_Iframe"; sql += ",Script_Object,Script_Script,Script_Div,Script_Table,Script_Span,Script_Img,Script_Font"; sql += ",Script_A,Script_Html,IsSaveImg,IsDesc,CollecNum) values ("; sql += "@ItemName,@ClassId,@WebEncode,@WebName,@WebUrl,@ItemRemark,@Script_Iframe"; sql += ",@Script_Object,@Script_Script,@Script_Div,@Script_Table,@Script_Span,@Script_Img,@Script_Font"; sql += ",@Script_A,@Script_Html,@IsSaveImg,@IsDesc,@CollecNum"; sql += ")"; SqlParameter[] sqlparam = { db.MakeInParam("@ItemName",SqlDbType.VarChar,ItemName), db.MakeInParam("@ClassId",SqlDbType.VarChar,ClassId), db.MakeInParam("@WebEncode",SqlDbType.VarChar,WebEncode), db.MakeInParam("@WebName",SqlDbType.VarChar,WebName), db.MakeInParam("@WebUrl",SqlDbType.VarChar,WebUrl), db.MakeInParam("@ItemRemark",SqlDbType.VarChar,ItemRemark), db.MakeInParam("@Script_Iframe",SqlDbType.Int,Script_Iframe), db.MakeInParam("@Script_Object",SqlDbType.Int,Script_Object), db.MakeInParam("@Script_Script",SqlDbType.Int,Script_Script), db.MakeInParam("@Script_Div",SqlDbType.Int,Script_Div), db.MakeInParam("@Script_Table",SqlDbType.Int,Script_Table), db.MakeInParam("@Script_Span",SqlDbType.Int,Script_Span), db.MakeInParam("@Script_Img",SqlDbType.Int,Script_Img), db.MakeInParam("@Script_Font",SqlDbType.Int,Script_Font), db.MakeInParam("@Script_A",SqlDbType.Int,Script_A), db.MakeInParam("@Script_Html",SqlDbType.Int,Script_Html), db.MakeInParam("@IsSaveImg",SqlDbType.Int,IsSaveImg), db.MakeInParam("@IsDesc",SqlDbType.Int,IsDesc), db.MakeInParam("@CollecNum",SqlDbType.Int,CollecNum), }; db.Execute(sql, sqlparam); } catch { ret = false; } finally { db.Close(); db.Dispose(); } return ret; }