Пример #1
0
 // 改
 public bool Update(W_ResourcesCata resourcesCata)
 {
     using (SqlHelper helper = WechatDataBaseHelper.Create())
     {
         int rows = helper.ExecuteNonQuery("update [W_ResourcesCata] set WID=@WID,CataName=@CataName,CreateTime=@CreateTime,IsDelete=@IsDelete where CataID=@CataID", new SqlParameter("@CataID", resourcesCata.CataID), new SqlParameter("@CataID", resourcesCata.CataID), new SqlParameter("@WID", resourcesCata.WID), new SqlParameter("@CataName", resourcesCata.CataName), new SqlParameter("@CreateTime", resourcesCata.CreateTime), new SqlParameter("@IsDelete", resourcesCata.IsDelete));
         return(rows > 0);
     }
 }
Пример #2
0
 // 删
 public bool Delete(W_ResourcesCata resourcesCata)
 {
     using (SqlHelper helper = WechatDataBaseHelper.Create())
     {
         int rows = helper.ExecuteNonQuery("delete from [W_ResourcesCata] where CataID=@CataID", new SqlParameter("@CataID", resourcesCata.CataID));
         return(rows > 0);
     }
 }
Пример #3
0
 // 增
 public bool Add(W_ResourcesCata resourcesCata)
 {
     using (SqlHelper helper = WechatDataBaseHelper.Create())
     {
         int rows = helper.ExecuteNonQuery("insert into [W_ResourcesCata] values (@CataID,@WID,@CataName,@CreateTime,@IsDelete)", new SqlParameter("@CataID", resourcesCata.CataID), new SqlParameter("@WID", resourcesCata.WID), new SqlParameter("@CataName", resourcesCata.CataName), new SqlParameter("@CreateTime", resourcesCata.CreateTime), new SqlParameter("@IsDelete", resourcesCata.IsDelete));
         return(rows > 0);
     }
 }
Пример #4
0
 public List <W_KeyWord> GetByResourcesCata(W_ResourcesCata resourcesCata)
 {
     return(GetAll().Where(temp => temp.CataID == resourcesCata.CataID).ToList());
 }
Пример #5
0
 // 改
 public bool Update(W_ResourcesCata resourcesCata)
 {
     return(new W_ResourcesCataDAL().Update(resourcesCata));
 }
Пример #6
0
 // 删
 public bool Delete(W_ResourcesCata resourcesCata)
 {
     return(new W_ResourcesCataDAL().Delete(resourcesCata));
 }
Пример #7
0
 // 增
 public bool Add(W_ResourcesCata resourcesCata)
 {
     return(new W_ResourcesCataDAL().Add(resourcesCata));
 }