コード例 #1
0
        /// <summary>
        /// Get all the modelPhysicalInventoryTaking.
        /// </summary>
        /// <param name="modelPhysicalInventoryTaking">modelPhysicalInventoryTaking Identifier</param>
        /// <returns></returns>
        public List <SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTaking> SearchPhysicalInventoryTakings(SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTaking modelPhysicalInventoryTaking)
        {
            List <SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTaking> listPhysicalInventoryTakings = new List <SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTaking>();

            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.GetPhysicalInventoryTakings(modelPhysicalInventoryTaking);
                    listPhysicalInventoryTakings = results;
                }

                return listPhysicalInventoryTakings;
            }, "Retrieve the registered PhysicalInventoryTakings in system."));
        }