Esempio n. 1
0
 // 改
 public bool Update(W_KeyWord keyWord)
 {
     using (SqlHelper helper = WechatDataBaseHelper.Create())
     {
         int rows = helper.ExecuteNonQuery("update [W_KeyWord] set CataID=@CataID,WContent=@WContent,WOption=@WOption,WKey=@WKey,ResponseType=@ResponseType,ResourcesID=@ResourcesID,CreateTime=@CreateTime,IsDelete=@IsDelete where KWID=@KWID", new SqlParameter("@KWID", keyWord.KWID), new SqlParameter("@CataID", keyWord.CataID), new SqlParameter("@WContent", keyWord.WContent), new SqlParameter("@WOption", keyWord.WOption), new SqlParameter("@WKey", keyWord.WKey), new SqlParameter("@ResponseType", keyWord.ResponseType), new SqlParameter("@ResourcesID", keyWord.ResourcesID), new SqlParameter("@CreateTime", keyWord.CreateTime), new SqlParameter("@IsDelete", keyWord.IsDelete));
         return(rows > 0);
     }
 }
Esempio n. 2
0
 // 删
 public bool Delete(W_KeyWord keyWord)
 {
     using (SqlHelper helper = WechatDataBaseHelper.Create())
     {
         int rows = helper.ExecuteNonQuery("delete from [W_KeyWord] where KWID=@KWID", new SqlParameter("@KWID", keyWord.KWID));
         return(rows > 0);
     }
 }
Esempio n. 3
0
 // 增
 public bool Add(W_KeyWord keyWord)
 {
     using (SqlHelper helper = WechatDataBaseHelper.Create())
     {
         int rows = helper.ExecuteNonQuery("insert into [W_KeyWord] values (@KWID,@CataID,@WContent,@WOption,@WKey,@ResponseType,@ResourcesID,@CreateTime,@IsDelete)", new SqlParameter("@KWID", keyWord.KWID), new SqlParameter("@CataID", keyWord.CataID), new SqlParameter("@WContent", keyWord.WContent), new SqlParameter("@WOption", keyWord.WOption), new SqlParameter("@WKey", keyWord.WKey), new SqlParameter("@ResponseType", keyWord.ResponseType), new SqlParameter("@ResourecesID", keyWord.ResourcesID), new SqlParameter("@CreateTime", keyWord.CreateTime), new SqlParameter("@IsDelete", keyWord.IsDelete));
         return(rows > 0);
     }
 }
Esempio n. 4
0
 private void DoKeyWord(W_KeyWord keyWord)
 {
     if (string.Equals(keyWord.ResponseType, "viewPage", StringComparison.OrdinalIgnoreCase) == true)
     {
         W_ViewPageBLL bll      = new W_ViewPageBLL();
         W_ViewPage    viewPage = bll.GetByResourcesID(keyWord.ResourcesID);
         DoViewPage(viewPage);
     }
     else
     {
         W_ResourcesBLL bll       = new W_ResourcesBLL();
         W_Resources    resources = bll.GetByResourcesID(keyWord.ResourcesID);
         DoResources(resources);
     }
 }
Esempio n. 5
0
 // 改
 public bool Update(W_KeyWord resourcesCata)
 {
     return(new W_KeyWordDAL().Update(resourcesCata));
 }
Esempio n. 6
0
 // 删
 public bool Delete(W_KeyWord resourcesCata)
 {
     return(new W_KeyWordDAL().Delete(resourcesCata));
 }
Esempio n. 7
0
 // 增
 public bool Add(W_KeyWord resourcesCata)
 {
     return(new W_KeyWordDAL().Add(resourcesCata));
 }