Ejemplo n.º 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;
     }
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 4
0
 public List<W_KeyWord> GetByResourcesCata(W_ResourcesCata resourcesCata)
 {
     return GetAll().Where(temp => temp.CataID == resourcesCata.CataID).ToList();
 }
Ejemplo n.º 5
0
 // 改
 public bool Update(W_ResourcesCata resourcesCata)
 {
     return new W_ResourcesCataDAL().Update(resourcesCata);
 }
Ejemplo n.º 6
0
 // 删
 public bool Delete(W_ResourcesCata resourcesCata)
 {
     return new W_ResourcesCataDAL().Delete(resourcesCata);
 }
Ejemplo n.º 7
0
 // 增
 public bool Add(W_ResourcesCata resourcesCata)
 {
     return new W_ResourcesCataDAL().Add(resourcesCata);
 }