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