Esempio n. 1
0
 public List <ServicosBE> Select(ServicosBE obj, bool subitem = false)
 {
     if (!subitem)
     {
         return(new ServicosDao().Select <ServicosBE>(obj).ToList());
     }
     else
     {
         var servico = CarregaSubItem(new ServicosDao().Select <ServicosBE>(obj).ToList());
         return(servico);
     }
 }
Esempio n. 2
0
        List <ServicosBE> CarregaSubItem(List <ServicosBE> obj)
        {
            if (obj.Count > 0)
            {
                ServicosBE sub = new ServicosBE {
                    conf_id = obj[0].conf_id
                };
                foreach (var item in obj)
                {
                    sub.serv_idsub = item.serv_id;
                    item.SubMenu   = new ServicosBLL().Select(sub);
                }
            }

            return(obj);
        }
Esempio n. 3
0
 public bool Delete(ServicosBE obj)
 {
     return(new ServicosDao().Delete(new { serv_id = obj.serv_id }).Value);
 }
Esempio n. 4
0
 public bool Update(ServicosBE obj)
 {
     return(new ServicosDao().Update(obj).Value);
 }
Esempio n. 5
0
 public ServicosBE Insert(ServicosBE obj)
 {
     obj.serv_id = new ServicosDao().Insert(obj);
     return(obj);
 }
Esempio n. 6
0
 public ServicosBE SelectId(ServicosBE obj)
 {
     return(new ServicosDao().SelectId <ServicosBE>(obj));
 }