/// <summary> /// ����һ������ /// </summary> public void Add(lv_ZPB.Model.AdStat model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into AdStat("); strSql.Append("StatID,AdID,UserName,VoteIP,CreateDate,Source,Detail,Types,Tag,JasonVlaue,StringArrayValue,ExtendID)"); strSql.Append(" values ("); strSql.Append("@StatID,@AdID,@UserName,@VoteIP,@CreateDate,@Source,@Detail,@Types,@Tag,@JasonVlaue,@StringArrayValue,@ExtendID)"); SqlParameter[] parameters = { new SqlParameter("@StatID", SqlDbType.Int,4), new SqlParameter("@AdID", SqlDbType.Int,4), new SqlParameter("@UserName", SqlDbType.NVarChar,128), new SqlParameter("@VoteIP", SqlDbType.NVarChar,50), new SqlParameter("@CreateDate", SqlDbType.DateTime), new SqlParameter("@Source", SqlDbType.NVarChar), new SqlParameter("@Detail", SqlDbType.NVarChar), new SqlParameter("@Types", SqlDbType.NVarChar,256), new SqlParameter("@Tag", SqlDbType.Int,4), new SqlParameter("@JasonVlaue", SqlDbType.NVarChar), new SqlParameter("@StringArrayValue", SqlDbType.NVarChar), new SqlParameter("@ExtendID", SqlDbType.Int,4)}; parameters[0].Value = model.StatID; parameters[1].Value = model.AdID; parameters[2].Value = model.UserName; parameters[3].Value = model.VoteIP; parameters[4].Value = model.CreateDate; parameters[5].Value = model.Source; parameters[6].Value = model.Detail; parameters[7].Value = model.Types; parameters[8].Value = model.Tag; parameters[9].Value = model.JasonVlaue; parameters[10].Value = model.StringArrayValue; parameters[11].Value = model.ExtendID; lv_DBUtility.DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(lv_ZPB.Model.Msg model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into Msg("); strSql.Append("MessageID,ParentID,ApprovedState,MessageType,Detail,Title,CreateDate,CreateBy,PublisherName,PublisherSex,PublisherEmail,PublisherIP,PublisherTel,PublisherQQ,PublisherContact,Images,AlbumID,IsShow,Types,Sort,Tag,JasonVlaue,StringArrayValue,ExtendID)"); strSql.Append(" values ("); strSql.Append("@MessageID,@ParentID,@ApprovedState,@MessageType,@Detail,@Title,@CreateDate,@CreateBy,@PublisherName,@PublisherSex,@PublisherEmail,@PublisherIP,@PublisherTel,@PublisherQQ,@PublisherContact,@Images,@AlbumID,@IsShow,@Types,@Sort,@Tag,@JasonVlaue,@StringArrayValue,@ExtendID)"); SqlParameter[] parameters = { new SqlParameter("@MessageID", SqlDbType.Int,4), new SqlParameter("@ParentID", SqlDbType.Int,4), new SqlParameter("@ApprovedState", SqlDbType.Int,4), new SqlParameter("@MessageType", SqlDbType.Int,4), new SqlParameter("@Detail", SqlDbType.NVarChar), new SqlParameter("@Title", SqlDbType.NVarChar,256), new SqlParameter("@CreateDate", SqlDbType.DateTime), new SqlParameter("@CreateBy", SqlDbType.NVarChar,128), new SqlParameter("@PublisherName", SqlDbType.NVarChar,128), new SqlParameter("@PublisherSex", SqlDbType.NVarChar,128), new SqlParameter("@PublisherEmail", SqlDbType.NVarChar,256), new SqlParameter("@PublisherIP", SqlDbType.NVarChar,128), new SqlParameter("@PublisherTel", SqlDbType.NVarChar,128), new SqlParameter("@PublisherQQ", SqlDbType.NVarChar,128), new SqlParameter("@PublisherContact", SqlDbType.NVarChar,256), new SqlParameter("@Images", SqlDbType.NVarChar,256), new SqlParameter("@AlbumID", SqlDbType.Int,4), new SqlParameter("@IsShow", SqlDbType.Bit,1), new SqlParameter("@Types", SqlDbType.NVarChar,256), new SqlParameter("@Sort", SqlDbType.Int,4), new SqlParameter("@Tag", SqlDbType.Int,4), new SqlParameter("@JasonVlaue", SqlDbType.NVarChar), new SqlParameter("@StringArrayValue", SqlDbType.NVarChar), new SqlParameter("@ExtendID", SqlDbType.Int,4)}; parameters[0].Value = model.MessageID; parameters[1].Value = model.ParentID; parameters[2].Value = model.ApprovedState; parameters[3].Value = model.MessageType; parameters[4].Value = model.Detail; parameters[5].Value = model.Title; parameters[6].Value = model.CreateDate; parameters[7].Value = model.CreateBy; parameters[8].Value = model.PublisherName; parameters[9].Value = model.PublisherSex; parameters[10].Value = model.PublisherEmail; parameters[11].Value = model.PublisherIP; parameters[12].Value = model.PublisherTel; parameters[13].Value = model.PublisherQQ; parameters[14].Value = model.PublisherContact; parameters[15].Value = model.Images; parameters[16].Value = model.AlbumID; parameters[17].Value = model.IsShow; parameters[18].Value = model.Types; parameters[19].Value = model.Sort; parameters[20].Value = model.Tag; parameters[21].Value = model.JasonVlaue; parameters[22].Value = model.StringArrayValue; parameters[23].Value = model.ExtendID; lv_DBUtility.DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(lv_ZPB.Model.WebPage model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into WebPage("); strSql.Append("PageID,UserName,PageTheme,PageType,PageProperty,ApprovedState,Title,Detail,Images,AlbumID,CreateDate,Link,Hits,SiteID,IsDel,IsShow,Types,Sort,Tag,JasonVlaue,StringArrayValue,ExtendID)"); strSql.Append(" values ("); strSql.Append("@PageID,@UserName,@PageTheme,@PageType,@PageProperty,@ApprovedState,@Title,@Detail,@Images,@AlbumID,@CreateDate,@Link,@Hits,@SiteID,@IsDel,@IsShow,@Types,@Sort,@Tag,@JasonVlaue,@StringArrayValue,@ExtendID)"); SqlParameter[] parameters = { new SqlParameter("@PageID", SqlDbType.Int,4), new SqlParameter("@UserName", SqlDbType.NVarChar,128), new SqlParameter("@PageTheme", SqlDbType.Int,4), new SqlParameter("@PageType", SqlDbType.Int,4), new SqlParameter("@PageProperty", SqlDbType.NVarChar,256), new SqlParameter("@ApprovedState", SqlDbType.Int,4), new SqlParameter("@Title", SqlDbType.NVarChar,256), new SqlParameter("@Detail", SqlDbType.NVarChar), new SqlParameter("@Images", SqlDbType.NVarChar,256), new SqlParameter("@AlbumID", SqlDbType.Int,4), new SqlParameter("@CreateDate", SqlDbType.DateTime), new SqlParameter("@Link", SqlDbType.NVarChar), new SqlParameter("@Hits", SqlDbType.Int,4), new SqlParameter("@SiteID", SqlDbType.Int,4), new SqlParameter("@IsDel", SqlDbType.Bit,1), new SqlParameter("@IsShow", SqlDbType.Bit,1), new SqlParameter("@Types", SqlDbType.NVarChar,256), new SqlParameter("@Sort", SqlDbType.Int,4), new SqlParameter("@Tag", SqlDbType.Int,4), new SqlParameter("@JasonVlaue", SqlDbType.NVarChar), new SqlParameter("@StringArrayValue", SqlDbType.NVarChar), new SqlParameter("@ExtendID", SqlDbType.Int,4)}; parameters[0].Value = GetMaxId(); parameters[1].Value = model.UserName; parameters[2].Value = model.PageTheme; parameters[3].Value = model.PageType; parameters[4].Value = model.PageProperty; parameters[5].Value = model.ApprovedState; parameters[6].Value = model.Title; parameters[7].Value = model.Detail; parameters[8].Value = model.Images; parameters[9].Value = model.AlbumID; parameters[10].Value = model.CreateDate; parameters[11].Value = model.Link; parameters[12].Value = model.Hits; parameters[13].Value = model.SiteID; parameters[14].Value = model.IsDel; parameters[15].Value = model.IsShow; parameters[16].Value = model.Types; parameters[17].Value = model.Sort; parameters[18].Value = model.Tag; parameters[19].Value = model.JasonVlaue; parameters[20].Value = model.StringArrayValue; parameters[21].Value = model.ExtendID; lv_DBUtility.DbHelperSQL.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(lv_ZPB.Model.Sites model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into Sites("); strSql.Append("SiteID,ParentID,SiteName,SiteName_en,Details,Images,AlbumID,OpenMode,ReviewType,RightType,Link,IsShow,IsDel,Types,Sort,Tag,JasonVlaue,StringArrayValue,ExtendID)"); strSql.Append(" values ("); strSql.Append("@SiteID,@ParentID,@SiteName,@SiteName_en,@Details,@Images,@AlbumID,@OpenMode,@ReviewType,@RightType,@Link,@IsShow,@IsDel,@Types,@Sort,@Tag,@JasonVlaue,@StringArrayValue,@ExtendID)"); SqlParameter[] parameters = { new SqlParameter("@SiteID", SqlDbType.Int,4), new SqlParameter("@ParentID", SqlDbType.Int,4), new SqlParameter("@SiteName", SqlDbType.NVarChar,50), new SqlParameter("@SiteName_en", SqlDbType.NVarChar,50), new SqlParameter("@Details", SqlDbType.NVarChar), new SqlParameter("@Images", SqlDbType.NVarChar,256), new SqlParameter("@AlbumID", SqlDbType.Int,4), new SqlParameter("@OpenMode", SqlDbType.Int,4), new SqlParameter("@ReviewType", SqlDbType.Int,4), new SqlParameter("@RightType", SqlDbType.Int,4), new SqlParameter("@Link", SqlDbType.NVarChar), new SqlParameter("@IsShow", SqlDbType.Bit,1), new SqlParameter("@IsDel", SqlDbType.Bit,1), new SqlParameter("@Types", SqlDbType.NVarChar,256), new SqlParameter("@Sort", SqlDbType.Int,4), new SqlParameter("@Tag", SqlDbType.Int,4), new SqlParameter("@JasonVlaue", SqlDbType.NVarChar), new SqlParameter("@StringArrayValue", SqlDbType.NVarChar), new SqlParameter("@ExtendID", SqlDbType.Int,4)}; parameters[0].Value = model.SiteID; parameters[1].Value = model.ParentID; parameters[2].Value = model.SiteName; parameters[3].Value = model.SiteName_en; parameters[4].Value = model.Details; parameters[5].Value = model.Images; parameters[6].Value = model.AlbumID; parameters[7].Value = model.OpenMode; parameters[8].Value = model.ReviewType; parameters[9].Value = model.RightType; parameters[10].Value = model.Link; parameters[11].Value = model.IsShow; parameters[12].Value = model.IsDel; parameters[13].Value = model.Types; parameters[14].Value = model.Sort; parameters[15].Value = model.Tag; parameters[16].Value = model.JasonVlaue; parameters[17].Value = model.StringArrayValue; parameters[18].Value = model.ExtendID; lv_DBUtility.DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(lv_ZPB.Model.AdPage model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into AdPage("); strSql.Append("AdPageID,Title,PagePath,PreviewImage,Detail,IsShow,IsDel,Types,Sort,Tag,JasonVlaue,StringArrayValue,ExtendID)"); strSql.Append(" values ("); strSql.Append("@AdPageID,@Title,@PagePath,@PreviewImage,@Detail,@IsShow,@IsDel,@Types,@Sort,@Tag,@JasonVlaue,@StringArrayValue,@ExtendID)"); SqlParameter[] parameters = { new SqlParameter("@AdPageID", SqlDbType.Int,4), new SqlParameter("@Title", SqlDbType.NVarChar,256), new SqlParameter("@PagePath", SqlDbType.NVarChar,256), new SqlParameter("@PreviewImage", SqlDbType.NVarChar,256), new SqlParameter("@Detail", SqlDbType.NVarChar), new SqlParameter("@IsShow", SqlDbType.Bit,1), new SqlParameter("@IsDel", SqlDbType.Bit,1), new SqlParameter("@Types", SqlDbType.NVarChar,256), new SqlParameter("@Sort", SqlDbType.Int,4), new SqlParameter("@Tag", SqlDbType.Int,4), new SqlParameter("@JasonVlaue", SqlDbType.NVarChar), new SqlParameter("@StringArrayValue", SqlDbType.NVarChar), new SqlParameter("@ExtendID", SqlDbType.Int,4)}; parameters[0].Value = model.AdPageID; parameters[1].Value = model.Title; parameters[2].Value = model.PagePath; parameters[3].Value = model.PreviewImage; parameters[4].Value = model.Detail; parameters[5].Value = model.IsShow; parameters[6].Value = model.IsDel; parameters[7].Value = model.Types; parameters[8].Value = model.Sort; parameters[9].Value = model.Tag; parameters[10].Value = model.JasonVlaue; parameters[11].Value = model.StringArrayValue; parameters[12].Value = model.ExtendID; int rows=DbHelperSQL.ExecuteSql(strSql.ToString(),parameters); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// ����һ������ /// </summary> public void Add(lv_ZPB.Model.UserRoles model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into UserRoles("); strSql.Append("UserRoleID,RoleName,UserGroupList,IsAvailable,Detail,Images,AlbumID,Tag,Types,Sort,SiteID,Link,JasonVlaue,StringArrayValue,ExtendID)"); strSql.Append(" values ("); strSql.Append("@UserRoleID,@RoleName,@UserGroupList,@IsAvailable,@Detail,@Images,@AlbumID,@Tag,@Types,@Sort,@SiteID,@Link,@JasonVlaue,@StringArrayValue,@ExtendID)"); SqlParameter[] parameters = { new SqlParameter("@UserRoleID", SqlDbType.UniqueIdentifier,16), new SqlParameter("@RoleName", SqlDbType.NVarChar,128), new SqlParameter("@UserGroupList", SqlDbType.NVarChar), new SqlParameter("@IsAvailable", SqlDbType.Bit,1), new SqlParameter("@Detail", SqlDbType.NVarChar), new SqlParameter("@Images", SqlDbType.NVarChar,256), new SqlParameter("@AlbumID", SqlDbType.Int,4), new SqlParameter("@Tag", SqlDbType.Int,4), new SqlParameter("@Types", SqlDbType.NVarChar,256), new SqlParameter("@Sort", SqlDbType.Int,4), new SqlParameter("@SiteID", SqlDbType.Int,4), new SqlParameter("@Link", SqlDbType.NVarChar), new SqlParameter("@JasonVlaue", SqlDbType.NVarChar), new SqlParameter("@StringArrayValue", SqlDbType.NVarChar), new SqlParameter("@ExtendID", SqlDbType.Int,4)}; parameters[0].Value = model.UserRoleID; parameters[1].Value = model.RoleName; parameters[2].Value = model.UserGroupList; parameters[3].Value = model.IsAvailable; parameters[4].Value = model.Detail; parameters[5].Value = model.Images; parameters[6].Value = model.AlbumID; parameters[7].Value = model.Tag; parameters[8].Value = model.Types; parameters[9].Value = model.Sort; parameters[10].Value = model.SiteID; parameters[11].Value = model.Link; parameters[12].Value = model.JasonVlaue; parameters[13].Value = model.StringArrayValue; parameters[14].Value = model.ExtendID; lv_DBUtility.DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(lv_ZPB.Model.WebConfig model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into WebConfig("); strSql.Append("SettingID,Attribute,Setting,IsAvailable,Detail,Tag,Types,Sort,SiteID,Link,JasonVlaue,StringArrayValue,ExtendID)"); strSql.Append(" values ("); strSql.Append("@SettingID,@Attribute,@Setting,@IsAvailable,@Detail,@Tag,@Types,@Sort,@SiteID,@Link,@JasonVlaue,@StringArrayValue,@ExtendID)"); SqlParameter[] parameters = { new SqlParameter("@SettingID", SqlDbType.Int,4), new SqlParameter("@Attribute", SqlDbType.NVarChar,256), new SqlParameter("@Setting", SqlDbType.NVarChar), new SqlParameter("@IsAvailable", SqlDbType.Bit,1), new SqlParameter("@Detail", SqlDbType.NVarChar), new SqlParameter("@Tag", SqlDbType.Int,4), new SqlParameter("@Types", SqlDbType.NVarChar,256), new SqlParameter("@Sort", SqlDbType.Int,4), new SqlParameter("@SiteID", SqlDbType.Int,4), new SqlParameter("@Link", SqlDbType.NVarChar), new SqlParameter("@JasonVlaue", SqlDbType.NVarChar), new SqlParameter("@StringArrayValue", SqlDbType.NVarChar), new SqlParameter("@ExtendID", SqlDbType.Int,4)}; parameters[0].Value = model.SettingID; parameters[1].Value = model.Attribute; parameters[2].Value = model.Setting; parameters[3].Value = model.IsAvailable; parameters[4].Value = model.Detail; parameters[5].Value = model.Tag; parameters[6].Value = model.Types; parameters[7].Value = model.Sort; parameters[8].Value = model.SiteID; parameters[9].Value = model.Link; parameters[10].Value = model.JasonVlaue; parameters[11].Value = model.StringArrayValue; parameters[12].Value = model.ExtendID; lv_DBUtility.DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(lv_ZPB.Model.Info model) { dal.Add(model); }
/// <summary> /// ����һ������ /// </summary> public bool Update(lv_ZPB.Model.Info model) { return dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(lv_ZPB.Model.Ad model) { return dal.Add(model); }
/// <summary> /// ����һ������ /// </summary> public bool Update(lv_ZPB.Model.WebAlbum model) { return dal.Update(model); }
/// <summary> /// ����һ������ /// </summary> public bool Update(lv_ZPB.Model.UserRight model) { return dal.Update(model); }
/// <summary> /// ����һ������ /// </summary> public bool Update(lv_ZPB.Model.WebImage model) { return dal.Update(model); }
/// <summary> /// ����һ������ /// </summary> public bool Update(lv_ZPB.Model.Sites model) { return dal.Update(model); }
/// <summary> /// ����һ������ /// </summary> public void Add(lv_ZPB.Model.Msg model) { dal.Add(model); }
/// <summary> /// ����һ������ /// </summary> public bool Update(lv_ZPB.Model.WebConfig model) { StringBuilder strSql=new StringBuilder(); strSql.Append("update WebConfig set "); strSql.Append("Attribute=@Attribute,"); strSql.Append("Setting=@Setting,"); strSql.Append("IsAvailable=@IsAvailable,"); strSql.Append("Detail=@Detail,"); strSql.Append("Tag=@Tag,"); strSql.Append("Types=@Types,"); strSql.Append("Sort=@Sort,"); strSql.Append("SiteID=@SiteID,"); strSql.Append("Link=@Link,"); strSql.Append("JasonVlaue=@JasonVlaue,"); strSql.Append("StringArrayValue=@StringArrayValue,"); strSql.Append("ExtendID=@ExtendID"); strSql.Append(" where SettingID=@SettingID "); SqlParameter[] parameters = { new SqlParameter("@Attribute", SqlDbType.NVarChar,256), new SqlParameter("@Setting", SqlDbType.NVarChar), new SqlParameter("@IsAvailable", SqlDbType.Bit,1), new SqlParameter("@Detail", SqlDbType.NVarChar), new SqlParameter("@Tag", SqlDbType.Int,4), new SqlParameter("@Types", SqlDbType.NVarChar,256), new SqlParameter("@Sort", SqlDbType.Int,4), new SqlParameter("@SiteID", SqlDbType.Int,4), new SqlParameter("@Link", SqlDbType.NVarChar), new SqlParameter("@JasonVlaue", SqlDbType.NVarChar), new SqlParameter("@StringArrayValue", SqlDbType.NVarChar), new SqlParameter("@ExtendID", SqlDbType.Int,4), new SqlParameter("@SettingID", SqlDbType.Int,4)}; parameters[0].Value = model.Attribute; parameters[1].Value = model.Setting; parameters[2].Value = model.IsAvailable; parameters[3].Value = model.Detail; parameters[4].Value = model.Tag; parameters[5].Value = model.Types; parameters[6].Value = model.Sort; parameters[7].Value = model.SiteID; parameters[8].Value = model.Link; parameters[9].Value = model.JasonVlaue; parameters[10].Value = model.StringArrayValue; parameters[11].Value = model.ExtendID; parameters[12].Value = model.SettingID; int rows = lv_DBUtility.DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// ����һ������ /// </summary> public bool Update(lv_ZPB.Model.UserRoles model) { StringBuilder strSql=new StringBuilder(); strSql.Append("update UserRoles set "); strSql.Append("RoleName=@RoleName,"); strSql.Append("UserGroupList=@UserGroupList,"); strSql.Append("IsAvailable=@IsAvailable,"); strSql.Append("Detail=@Detail,"); strSql.Append("Images=@Images,"); strSql.Append("AlbumID=@AlbumID,"); strSql.Append("Tag=@Tag,"); strSql.Append("Types=@Types,"); strSql.Append("Sort=@Sort,"); strSql.Append("SiteID=@SiteID,"); strSql.Append("Link=@Link,"); strSql.Append("JasonVlaue=@JasonVlaue,"); strSql.Append("StringArrayValue=@StringArrayValue,"); strSql.Append("ExtendID=@ExtendID"); strSql.Append(" where UserRoleID=@UserRoleID "); SqlParameter[] parameters = { new SqlParameter("@RoleName", SqlDbType.NVarChar,128), new SqlParameter("@UserGroupList", SqlDbType.NVarChar), new SqlParameter("@IsAvailable", SqlDbType.Bit,1), new SqlParameter("@Detail", SqlDbType.NVarChar), new SqlParameter("@Images", SqlDbType.NVarChar,256), new SqlParameter("@AlbumID", SqlDbType.Int,4), new SqlParameter("@Tag", SqlDbType.Int,4), new SqlParameter("@Types", SqlDbType.NVarChar,256), new SqlParameter("@Sort", SqlDbType.Int,4), new SqlParameter("@SiteID", SqlDbType.Int,4), new SqlParameter("@Link", SqlDbType.NVarChar), new SqlParameter("@JasonVlaue", SqlDbType.NVarChar), new SqlParameter("@StringArrayValue", SqlDbType.NVarChar), new SqlParameter("@ExtendID", SqlDbType.Int,4), new SqlParameter("@UserRoleID", SqlDbType.UniqueIdentifier,16)}; parameters[0].Value = model.RoleName; parameters[1].Value = model.UserGroupList; parameters[2].Value = model.IsAvailable; parameters[3].Value = model.Detail; parameters[4].Value = model.Images; parameters[5].Value = model.AlbumID; parameters[6].Value = model.Tag; parameters[7].Value = model.Types; parameters[8].Value = model.Sort; parameters[9].Value = model.SiteID; parameters[10].Value = model.Link; parameters[11].Value = model.JasonVlaue; parameters[12].Value = model.StringArrayValue; parameters[13].Value = model.ExtendID; parameters[14].Value = model.UserRoleID; int rows = lv_DBUtility.DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// ����һ������ /// </summary> public void Add(lv_ZPB.Model.WebImage model) { dal.Add(model); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(lv_ZPB.Model.AdPosition model) { return dal.Update(model); }
/// <summary> /// ����һ������ /// </summary> public bool Update(lv_ZPB.Model.ExtendType model) { return dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(lv_ZPB.Model.AdPosition model) { return dal.Add(model); }
/// <summary> /// ����һ������ /// </summary> public bool Update(lv_ZPB.Model.ChannelItem model) { return dal.Update(model); }
/// <summary> /// ����һ������ /// </summary> public void Add(lv_ZPB.Model.Sites model) { dal.Add(model); }
/// <summary> /// ����һ������ /// </summary> public void Add(lv_ZPB.Model.WebAlbum model) { dal.Add(model); }
/// <summary> /// ����һ������ /// </summary> public void Add(lv_ZPB.Model.ExtendType model) { dal.Add(model); }
/// <summary> /// ����һ������ /// </summary> public bool Update(lv_ZPB.Model.Sites model) { StringBuilder strSql=new StringBuilder(); strSql.Append("update Sites set "); strSql.Append("ParentID=@ParentID,"); strSql.Append("SiteName=@SiteName,"); strSql.Append("SiteName_en=@SiteName_en,"); strSql.Append("Details=@Details,"); strSql.Append("Images=@Images,"); strSql.Append("AlbumID=@AlbumID,"); strSql.Append("OpenMode=@OpenMode,"); strSql.Append("ReviewType=@ReviewType,"); strSql.Append("RightType=@RightType,"); strSql.Append("Link=@Link,"); strSql.Append("IsShow=@IsShow,"); strSql.Append("IsDel=@IsDel,"); strSql.Append("Types=@Types,"); strSql.Append("Sort=@Sort,"); strSql.Append("Tag=@Tag,"); strSql.Append("JasonVlaue=@JasonVlaue,"); strSql.Append("StringArrayValue=@StringArrayValue,"); strSql.Append("ExtendID=@ExtendID"); strSql.Append(" where SiteID=@SiteID "); SqlParameter[] parameters = { new SqlParameter("@ParentID", SqlDbType.Int,4), new SqlParameter("@SiteName", SqlDbType.NVarChar,50), new SqlParameter("@SiteName_en", SqlDbType.NVarChar,50), new SqlParameter("@Details", SqlDbType.NVarChar), new SqlParameter("@Images", SqlDbType.NVarChar,256), new SqlParameter("@AlbumID", SqlDbType.Int,4), new SqlParameter("@OpenMode", SqlDbType.Int,4), new SqlParameter("@ReviewType", SqlDbType.Int,4), new SqlParameter("@RightType", SqlDbType.Int,4), new SqlParameter("@Link", SqlDbType.NVarChar), new SqlParameter("@IsShow", SqlDbType.Bit,1), new SqlParameter("@IsDel", SqlDbType.Bit,1), new SqlParameter("@Types", SqlDbType.NVarChar,256), new SqlParameter("@Sort", SqlDbType.Int,4), new SqlParameter("@Tag", SqlDbType.Int,4), new SqlParameter("@JasonVlaue", SqlDbType.NVarChar), new SqlParameter("@StringArrayValue", SqlDbType.NVarChar), new SqlParameter("@ExtendID", SqlDbType.Int,4), new SqlParameter("@SiteID", SqlDbType.Int,4)}; parameters[0].Value = model.ParentID; parameters[1].Value = model.SiteName; parameters[2].Value = model.SiteName_en; parameters[3].Value = model.Details; parameters[4].Value = model.Images; parameters[5].Value = model.AlbumID; parameters[6].Value = model.OpenMode; parameters[7].Value = model.ReviewType; parameters[8].Value = model.RightType; parameters[9].Value = model.Link; parameters[10].Value = model.IsShow; parameters[11].Value = model.IsDel; parameters[12].Value = model.Types; parameters[13].Value = model.Sort; parameters[14].Value = model.Tag; parameters[15].Value = model.JasonVlaue; parameters[16].Value = model.StringArrayValue; parameters[17].Value = model.ExtendID; parameters[18].Value = model.SiteID; int rows = lv_DBUtility.DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// ����һ������ /// </summary> public void Add(lv_ZPB.Model.ChannelItem model) { dal.Add(model); }
/// <summary> /// ����һ������ /// </summary> public bool Update(lv_ZPB.Model.Msg model) { StringBuilder strSql=new StringBuilder(); strSql.Append("update Msg set "); strSql.Append("ParentID=@ParentID,"); strSql.Append("ApprovedState=@ApprovedState,"); strSql.Append("MessageType=@MessageType,"); strSql.Append("Detail=@Detail,"); strSql.Append("Title=@Title,"); strSql.Append("CreateDate=@CreateDate,"); strSql.Append("CreateBy=@CreateBy,"); strSql.Append("PublisherName=@PublisherName,"); strSql.Append("PublisherSex=@PublisherSex,"); strSql.Append("PublisherEmail=@PublisherEmail,"); strSql.Append("PublisherIP=@PublisherIP,"); strSql.Append("PublisherTel=@PublisherTel,"); strSql.Append("PublisherQQ=@PublisherQQ,"); strSql.Append("PublisherContact=@PublisherContact,"); strSql.Append("Images=@Images,"); strSql.Append("AlbumID=@AlbumID,"); strSql.Append("IsShow=@IsShow,"); strSql.Append("Types=@Types,"); strSql.Append("Sort=@Sort,"); strSql.Append("Tag=@Tag,"); strSql.Append("JasonVlaue=@JasonVlaue,"); strSql.Append("StringArrayValue=@StringArrayValue,"); strSql.Append("ExtendID=@ExtendID"); strSql.Append(" where MessageID=@MessageID "); SqlParameter[] parameters = { new SqlParameter("@ParentID", SqlDbType.Int,4), new SqlParameter("@ApprovedState", SqlDbType.Int,4), new SqlParameter("@MessageType", SqlDbType.Int,4), new SqlParameter("@Detail", SqlDbType.NVarChar), new SqlParameter("@Title", SqlDbType.NVarChar,256), new SqlParameter("@CreateDate", SqlDbType.DateTime), new SqlParameter("@CreateBy", SqlDbType.NVarChar,128), new SqlParameter("@PublisherName", SqlDbType.NVarChar,128), new SqlParameter("@PublisherSex", SqlDbType.NVarChar,128), new SqlParameter("@PublisherEmail", SqlDbType.NVarChar,256), new SqlParameter("@PublisherIP", SqlDbType.NVarChar,128), new SqlParameter("@PublisherTel", SqlDbType.NVarChar,128), new SqlParameter("@PublisherQQ", SqlDbType.NVarChar,128), new SqlParameter("@PublisherContact", SqlDbType.NVarChar,256), new SqlParameter("@Images", SqlDbType.NVarChar,256), new SqlParameter("@AlbumID", SqlDbType.Int,4), new SqlParameter("@IsShow", SqlDbType.Bit,1), new SqlParameter("@Types", SqlDbType.NVarChar,256), new SqlParameter("@Sort", SqlDbType.Int,4), new SqlParameter("@Tag", SqlDbType.Int,4), new SqlParameter("@JasonVlaue", SqlDbType.NVarChar), new SqlParameter("@StringArrayValue", SqlDbType.NVarChar), new SqlParameter("@ExtendID", SqlDbType.Int,4), new SqlParameter("@MessageID", SqlDbType.Int,4)}; parameters[0].Value = model.ParentID; parameters[1].Value = model.ApprovedState; parameters[2].Value = model.MessageType; parameters[3].Value = model.Detail; parameters[4].Value = model.Title; parameters[5].Value = model.CreateDate; parameters[6].Value = model.CreateBy; parameters[7].Value = model.PublisherName; parameters[8].Value = model.PublisherSex; parameters[9].Value = model.PublisherEmail; parameters[10].Value = model.PublisherIP; parameters[11].Value = model.PublisherTel; parameters[12].Value = model.PublisherQQ; parameters[13].Value = model.PublisherContact; parameters[14].Value = model.Images; parameters[15].Value = model.AlbumID; parameters[16].Value = model.IsShow; parameters[17].Value = model.Types; parameters[18].Value = model.Sort; parameters[19].Value = model.Tag; parameters[20].Value = model.JasonVlaue; parameters[21].Value = model.StringArrayValue; parameters[22].Value = model.ExtendID; parameters[23].Value = model.MessageID; int rows = lv_DBUtility.DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// ����һ������ /// </summary> public void Add(lv_ZPB.Model.UserRight model) { dal.Add(model); }
/// <summary> /// ����һ������ /// </summary> public bool Update(lv_ZPB.Model.UserInfo model) { StringBuilder strSql=new StringBuilder(); strSql.Append("update UserInfo set "); strSql.Append("RoleID=@RoleID,"); strSql.Append("UserName=@UserName,"); strSql.Append("Password=@Password,"); strSql.Append("Email=@Email,"); strSql.Append("ApprovedState=@ApprovedState,"); strSql.Append("IsDel=@IsDel,"); strSql.Append("CreateDate=@CreateDate,"); strSql.Append("LastLoginDate=@LastLoginDate,"); strSql.Append("PasswordQuestion=@PasswordQuestion,"); strSql.Append("PasswordAnswer=@PasswordAnswer,"); strSql.Append("Nick=@Nick,"); strSql.Append("RealName=@RealName,"); strSql.Append("CnName=@CnName,"); strSql.Append("EnName=@EnName,"); strSql.Append("Number=@Number,"); strSql.Append("Images=@Images,"); strSql.Append("AlbumID=@AlbumID,"); strSql.Append("Sex=@Sex,"); strSql.Append("Mobile=@Mobile,"); strSql.Append("Tel=@Tel,"); strSql.Append("Detail=@Detail,"); strSql.Append("Country=@Country,"); strSql.Append("City=@City,"); strSql.Append("Town=@Town,"); strSql.Append("Post=@Post,"); strSql.Append("Address=@Address,"); strSql.Append("SiteID=@SiteID,"); strSql.Append("Types=@Types,"); strSql.Append("Sort=@Sort,"); strSql.Append("Tag=@Tag,"); strSql.Append("JasonVlaue=@JasonVlaue,"); strSql.Append("StringArrayValue=@StringArrayValue,"); strSql.Append("ExtendID=@ExtendID"); strSql.Append(" where UserID=@UserID "); SqlParameter[] parameters = { new SqlParameter("@RoleID", SqlDbType.UniqueIdentifier,16), new SqlParameter("@UserName", SqlDbType.NVarChar,128), new SqlParameter("@Password", SqlDbType.NVarChar,128), new SqlParameter("@Email", SqlDbType.NVarChar,256), new SqlParameter("@ApprovedState", SqlDbType.Int,4), new SqlParameter("@IsDel", SqlDbType.Bit,1), new SqlParameter("@CreateDate", SqlDbType.DateTime), new SqlParameter("@LastLoginDate", SqlDbType.DateTime), new SqlParameter("@PasswordQuestion", SqlDbType.NVarChar,256), new SqlParameter("@PasswordAnswer", SqlDbType.NVarChar,256), new SqlParameter("@Nick", SqlDbType.NVarChar,128), new SqlParameter("@RealName", SqlDbType.NVarChar,128), new SqlParameter("@CnName", SqlDbType.NVarChar,256), new SqlParameter("@EnName", SqlDbType.NVarChar,256), new SqlParameter("@Number", SqlDbType.NVarChar,256), new SqlParameter("@Images", SqlDbType.NVarChar,256), new SqlParameter("@AlbumID", SqlDbType.Int,4), new SqlParameter("@Sex", SqlDbType.Int,4), new SqlParameter("@Mobile", SqlDbType.NVarChar,50), new SqlParameter("@Tel", SqlDbType.NVarChar,50), new SqlParameter("@Detail", SqlDbType.NVarChar), new SqlParameter("@Country", SqlDbType.NVarChar,256), new SqlParameter("@City", SqlDbType.NVarChar,256), new SqlParameter("@Town", SqlDbType.NVarChar,256), new SqlParameter("@Post", SqlDbType.NVarChar,50), new SqlParameter("@Address", SqlDbType.NVarChar), new SqlParameter("@SiteID", SqlDbType.Int,4), new SqlParameter("@Types", SqlDbType.NVarChar,256), new SqlParameter("@Sort", SqlDbType.Int,4), new SqlParameter("@Tag", SqlDbType.Int,4), new SqlParameter("@JasonVlaue", SqlDbType.NVarChar), new SqlParameter("@StringArrayValue", SqlDbType.NVarChar), new SqlParameter("@ExtendID", SqlDbType.Int,4), new SqlParameter("@UserID", SqlDbType.UniqueIdentifier,16)}; parameters[0].Value = model.RoleID; parameters[1].Value = model.UserName; parameters[2].Value = model.Password; parameters[3].Value = model.Email; parameters[4].Value = model.ApprovedState; parameters[5].Value = model.IsDel; parameters[6].Value = model.CreateDate; parameters[7].Value = model.LastLoginDate; parameters[8].Value = model.PasswordQuestion; parameters[9].Value = model.PasswordAnswer; parameters[10].Value = model.Nick; parameters[11].Value = model.RealName; parameters[12].Value = model.CnName; parameters[13].Value = model.EnName; parameters[14].Value = model.Number; parameters[15].Value = model.Images; parameters[16].Value = model.AlbumID; parameters[17].Value = model.Sex; parameters[18].Value = model.Mobile; parameters[19].Value = model.Tel; parameters[20].Value = model.Detail; parameters[21].Value = model.Country; parameters[22].Value = model.City; parameters[23].Value = model.Town; parameters[24].Value = model.Post; parameters[25].Value = model.Address; parameters[26].Value = model.SiteID; parameters[27].Value = model.Types; parameters[28].Value = model.Sort; parameters[29].Value = model.Tag; parameters[30].Value = model.JasonVlaue; parameters[31].Value = model.StringArrayValue; parameters[32].Value = model.ExtendID; parameters[33].Value = model.UserID; int rows=lv_DBUtility.DbHelperSQL.ExecuteSql(strSql.ToString(),parameters); if (rows > 0) { return true; } else { return false; } }