Ejemplo n.º 1
0
        /// <summary>
        /// Get all the modelPhysicalInventoryTakingItem.
        /// </summary>
        /// <param name="modelPhysicalInventoryTakingItem">modelPhysicalInventoryTakingItem Identifier</param>
        /// <returns></returns>
        public List <SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTakingItem> SearchPhysicalInventoryTakingItems(SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTakingItem modelPhysicalInventoryTakingItem)
        {
            List <SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTakingItem> listPhysicalInventoryTakingItems = new List <SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTakingItem>();

            return(context.Execute(() =>
            {
                using (dataSource = new FAMDataContext(context.SecurityContext))
                {
                    dataSource.ConnectionString = "SRA";
                    dataSource.DefaultUser = System.Configuration.ConfigurationManager.AppSettings["S_APP_UID"];
                    dataSource.Initialize();

                    var results = dataSource.GetPhysicalInventoryTakingItems(modelPhysicalInventoryTakingItem);
                    listPhysicalInventoryTakingItems = results;
                }

                return listPhysicalInventoryTakingItems;
            }, "Retrieve the registered PhysicalInventoryTakingItems in system."));
        }