Пример #1
0
        /// <summary>
        /// Register FixedAsset.
        /// </summary>
        /// <param name="modelFixedAsset">modelFixedAsset Insert Model information FixedAsset</param>
        /// <returns>Registered activity information.</returns>
        public SOFTTEK.SCMS.Entity.FA.FixedAsset RegisterFixedAsset(SOFTTEK.SCMS.Entity.FA.FixedAsset modelFixedAsset)
        {
            SOFTTEK.SCMS.Entity.FA.FixedAsset modelInsert = new 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 result = dataSource.InsertFixedAsset(modelFixedAsset);
                    modelInsert = result;
                }
                return modelInsert;
            }, "Register an FixedAsset in system"));
        }