예제 #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."));
        }