Esempio n. 1
0
        public ProductoItemBE Obtener(string sCodigo)
        {
            ProductoItemDAL itemDAL = new ProductoItemDAL();
            ProductoItemDM  prDM    = new ProductoItemDM();
            ProductoItemBE  prBE    = new ProductoItemBE();

            try
            {
                prDM = itemDAL.Obtener(sCodigo);
                prBE = prDM.ToBE();
            }
            catch (Exception e)
            {
                throw e;
            }
            return(prBE);
        }
Esempio n. 2
0
 public static ProductoItemBE ToBE(this ProductoItemDM prodDM)
 {
     if (prodDM != null)
     {
         try
         {
             var resp = new ProductoItemBE();
             resp.id       = prodDM.id;
             resp.site_id  = prodDM.site_id;
             resp.title    = prodDM.title;
             resp.price    = prodDM.price;
             resp.pictures = prodDM.pictures.ToPicArrBE();
             return(resp);
         }
         catch (Exception e)
         {
             throw e;
         }
     }
     else
     {
         return(null);
     }
 }