示例#1
0
        /// <summary>
        /// Register Request.
        /// </summary>
        /// <param name="modelRequest">modelRequest Insert Model information Request</param>
        /// <returns>Registered activity information.</returns>
        public SOFTTEK.SCMS.Entity.FA.Request RegisterRequest(SOFTTEK.SCMS.Entity.FA.Request modelRequest)
        {
            SOFTTEK.SCMS.Entity.FA.Request modelInsert = new SOFTTEK.SCMS.Entity.FA.Request();

            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.InsertRequest(modelRequest);
                    modelInsert = result;
                }
                return modelInsert;
            }, "Register an Request in system"));
        }