public BusinessUnitObj ActualizaBusinessUnit(BusinessUnitObj businessUnit)
        {
            BusinessUnitObj buObj = null;

            using (SIACModeloDataContext dbContext = new SIACModeloDataContext())
            {
                var bus = dbContext.spUpdBusinessUnit(businessUnit.BusinessUnit, businessUnit.Name, businessUnit.Currency, businessUnit.BusinessUnitPS);
                foreach (var bu in bus)
                {
                    buObj = new BusinessUnitObj()
                    {
                        BusinessUnit   = int.Parse(bu.Code),
                        Name           = bu.Name,
                        Currency       = bu.Currency_Code,
                        BusinessUnitPS = bu.BusinessUnitPS.GetValueOrDefault(0)
                    };
                }
            }
            return(buObj);
        }
        public List <BusinessEntities.BusinessUnitObj> GetBusinessUnits()
        {
            List <BusinessEntities.BusinessUnitObj> lstBU = new List <BusinessEntities.BusinessUnitObj>();

            BusinessEntities.BusinessUnitObj buObj = null;

            using (SIACModeloDataContext dbContext = new SIACModeloDataContext())
            {
                var bus = dbContext.spSelBusinessUnits();
                foreach (var bu in bus)
                {
                    buObj = new BusinessUnitObj()
                    {
                        BusinessUnit   = bu.BusinessUnit,
                        Name           = bu.Name,
                        Currency       = bu.Currency,
                        BusinessUnitPS = bu.BusinessUnitPS
                    };
                    lstBU.Add(buObj);
                }
            }
            return(lstBU);
        }