示例#1
0
        /// <summary>
        /// Get all the modelFixedAsset.
        /// </summary>
        /// <param name="modelFixedAsset">modelFixedAsset Identifier</param>
        /// <returns></returns>
        public List <SOFTTEK.SCMS.Entity.FA.FixedAsset> SearchFixedAssets(SOFTTEK.SCMS.Entity.FA.FixedAsset modelFixedAsset)
        {
            List <SOFTTEK.SCMS.Entity.FA.FixedAsset> listFixedAssets = new List <SOFTTEK.SCMS.Entity.FA.FixedAsset>();

            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.GetFixedAssets(modelFixedAsset);
                    listFixedAssets = results;
                }

                return listFixedAssets;
            }, "Retrieve the registered FixedAssets in system."));
        }
示例#2
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."));
        }