public Entity.t_opencardpack FindOpencardpackByCode(Entity.t_opencardpack opencardpack)
        {
            t_opencardpack newOpencardpack = dao.FindOpencardpackByCode(opencardpack);

            if (newOpencardpack != null)
            {
                return(newOpencardpack);
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 2
0
 public Entity.t_opencardpack FindOpencardpackByCode(Entity.t_opencardpack opencardpack)
 {
     using (ERP2008Entities erp2008 = new ERP2008Entities())
     {
         t_opencardpack card = new t_opencardpack();
         card =
             (from opencard in erp2008.t_opencardpack
              //join b in erp2008.b_Inventory on opencard.FProductNo equals b.cInvCode
              //join sod in erp2008.SO_SODetails on opencard.cSOCode equals sod.cSOCode
              //join som in erp2008.SO_SOMain on opencard.cSOCode equals  som.cSOCode
              where opencard.Fbarcode == opencardpack.Fbarcode
              select opencard).SingleOrDefault();
         return(card);
     }
 }