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