Esempio n. 1
0
        /// <summary>
        /// Register PhysicalInventoryTakingItem.
        /// </summary>
        /// <param name="modelPhysicalInventoryTakingItem">modelPhysicalInventoryTakingItem Insert Model information PhysicalInventoryTakingItem</param>
        /// <returns>Registered activity information.</returns>
        public SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTakingItem RegisterPhysicalInventoryTakingItem(SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTakingItem modelPhysicalInventoryTakingItem)
        {
            SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTakingItem modelInsert = new 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 result = dataSource.InsertPhysicalInventoryTakingItem(modelPhysicalInventoryTakingItem);
                    modelInsert = result;
                }
                return modelInsert;
            }, "Register an PhysicalInventoryTakingItem in system"));
        }