/// <summary> /// Register AvailabilityForecast. /// </summary> /// <param name="modelAvailabilityForecast">modelAvailabilityForecast Insert Model information AvailabilityForecast</param> /// <returns>Registered activity information.</returns> public SOFTTEK.SCMS.Entity.FA.AvailabilityForecast RegisterAvailabilityForecast(SOFTTEK.SCMS.Entity.FA.AvailabilityForecast modelAvailabilityForecast) { SOFTTEK.SCMS.Entity.FA.AvailabilityForecast modelInsert = new SOFTTEK.SCMS.Entity.FA.AvailabilityForecast(); 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.InsertAvailabilityForecast(modelAvailabilityForecast); modelInsert = result; } return modelInsert; }, "Register an AvailabilityForecast in system")); }