Esempio n. 1
0
 /// <summary>
 /// 根据关键字段的值获取记录
 /// </summary>
 /// <param name="Id">关键字段的值</param>
 /// <returns>符合查询条件的记录</returns>
 public RsRoutingTools GetRsRoutingToolsById(string Id)
 {
     using (IRsRoutingToolsBLL RsRoutingToolsBLL = BLLContainer.Resolve <IRsRoutingToolsBLL>())
     {
         RsRoutingTools model = RsRoutingToolsBLL.GetFirstOrDefault(Id);
         return(model);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 按照关键字段删除
 /// </summary>
 /// <param name="Id">关键字段</param>
 /// <returns>是否成功</returns>
 public bool DelRsRoutingTools(string Id)
 {
     using (IRsRoutingToolsBLL RsRoutingToolsBLL = BLLContainer.Resolve <IRsRoutingToolsBLL>())
     {
         try
         {
             RsRoutingTools item = RsRoutingToolsBLL.GetFirstOrDefault(Id);
             return(RsRoutingToolsBLL.Delete(item));
         }
         catch { return(false); }
     }
 }
Esempio n. 3
0
 /// <summary>
 /// 按照关键字段删除
 /// </summary>
 /// <param name="Ids">关键字段数组</param>
 /// <returns>是否成功</returns>
 public bool DelRsRoutingToolss(string[] Ids)
 {
     using (IRsRoutingToolsBLL RsRoutingToolsBLL = BLLContainer.Resolve <IRsRoutingToolsBLL>())
     {
         try
         {
             List <RsRoutingTools> entitys = new List <RsRoutingTools>();
             foreach (string id in Ids)
             {
                 RsRoutingTools item = RsRoutingToolsBLL.GetFirstOrDefault(id);
                 entitys.Add(item);
             }
             return(RsRoutingToolsBLL.Delete(entitys));
         }
         catch { return(false); }
     }
 }