Exemple #1
0
        /// <summary>
        /// Register PhysicalInventoryTaking.
        /// </summary>
        /// <param name="modelPhysicalInventoryTaking">modelPhysicalInventoryTaking Insert Model information PhysicalInventoryTaking</param>
        /// <returns>Registered activity information.</returns>
        public SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTaking RegisterPhysicalInventoryTaking(SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTaking modelPhysicalInventoryTaking)
        {
            SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTaking modelInsert = new 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 result = dataSource.InsertPhysicalInventoryTaking(modelPhysicalInventoryTaking);
                    modelInsert = result;
                }
                return modelInsert;
            }, "Register an PhysicalInventoryTaking in system"));
        }