diff --git a/BackAnd.UnitTests/App.config b/BackAnd.UnitTests/App.config index b00c068a..1c39e0e0 100644 --- a/BackAnd.UnitTests/App.config +++ b/BackAnd.UnitTests/App.config @@ -259,7 +259,7 @@ - + diff --git a/BackAnd.UnitTests/BackAnd.UnitTests.csproj b/BackAnd.UnitTests/BackAnd.UnitTests.csproj index ce96451e..4dcb40d8 100644 --- a/BackAnd.UnitTests/BackAnd.UnitTests.csproj +++ b/BackAnd.UnitTests/BackAnd.UnitTests.csproj @@ -43,6 +43,10 @@ False ..\packages\Microsoft.AspNet.WebApi.Core.5.1.2\lib\net45\System.Web.Http.dll + + True + ..\packages\Microsoft.AspNet.Razor.2.0.20710.0\lib\net40\System.Web.Razor.dll + @@ -112,6 +116,7 @@ Designer + diff --git a/BackAnd.Web.Api.Test/BackAnd.Web.Api.Test.csproj b/BackAnd.Web.Api.Test/BackAnd.Web.Api.Test.csproj index 294ffd29..cb36880f 100644 --- a/BackAnd.Web.Api.Test/BackAnd.Web.Api.Test.csproj +++ b/BackAnd.Web.Api.Test/BackAnd.Web.Api.Test.csproj @@ -50,6 +50,10 @@ + + True + ..\packages\Microsoft.AspNet.Razor.2.0.20710.0\lib\net40\System.Web.Razor.dll + ..\packages\WebSocket4Net.0.13.1\lib\net45\WebSocket4Net.dll diff --git a/BackAnd.Web.Api.Test/packages.config b/BackAnd.Web.Api.Test/packages.config index fa253921..4c732c08 100644 --- a/BackAnd.Web.Api.Test/packages.config +++ b/BackAnd.Web.Api.Test/packages.config @@ -1,6 +1,8 @@  + + diff --git a/BackAnd.Web.Api/BackAnd.Web.Api.csproj b/BackAnd.Web.Api/BackAnd.Web.Api.csproj index df5ee711..6d587004 100644 --- a/BackAnd.Web.Api/BackAnd.Web.Api.csproj +++ b/BackAnd.Web.Api/BackAnd.Web.Api.csproj @@ -95,7 +95,7 @@ False ..\packages\Npgsql.2.2.5\lib\net45\Mono.Security.dll - + False ..\Duradus.Web.Mvc.App\deployment\MySql.Data.dll @@ -103,10 +103,6 @@ False ..\Duradus.Web.Mvc.App\deployment\MySql.Web.dll - - False - ..\packages\NewRelic.Agent.Api.6.3.123.0\lib\NewRelic.Api.Agent.dll - False ..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll @@ -177,7 +173,6 @@ - @@ -210,6 +205,7 @@ + @@ -240,6 +236,7 @@ + @@ -288,7 +285,6 @@ - @@ -385,7 +381,7 @@ True 5943 / - http://localhost:4110 + http://localhost:8080 True http://localhost:5943 False diff --git a/BackAnd.Web.Api/Controllers/AccountController.cs b/BackAnd.Web.Api/Controllers/AccountController.cs index 05ab6dbc..1dbfe507 100644 --- a/BackAnd.Web.Api/Controllers/AccountController.cs +++ b/BackAnd.Web.Api/Controllers/AccountController.cs @@ -129,7 +129,7 @@ private string GetUserDetail(string guid, string userField) private string GetUserFieldsForSelect() { string select; - select = string.Format("[{0}],[{1}],[{2}],[{3}],[{4}]", Map.Database.UserGuidFieldName, Map.Database.UsernameFieldName, "FirstName", "LastName", "Email"); + select = string.Format(Durados.Web.Mvc.Maps.MainAppSchema.GetUserFieldsForSelectSql(), Map.Database.UserGuidFieldName, Map.Database.UsernameFieldName, "FirstName", "LastName", "Email"); return select; } @@ -148,13 +148,13 @@ protected string PWResetNotAllowedMessage } private void LoadUserData(string guid) { - Durados.DataAccess.SqlAccess sqlAccess = new Durados.DataAccess.SqlAccess(); + Durados.DataAccess.SqlAccess sqlAccess = Durados.Web.Mvc.Maps.MainAppSqlAccess; Dictionary parameters = new Dictionary(); parameters.Add("@guid", guid); - string sqlDuradosSys = string.Format("SELECT TOP 1 username FROM durados_user WITH(NOLOCK) WHERE guid=@guid"); + string sqlDuradosSys = Durados.Web.Mvc.Maps.MainAppSchema.GetLoadUserDataByGuidSql(); object duradosSysUser = sqlAccess.ExecuteScalar(Durados.Web.Mvc.Maps.Instance.ConnectionString, sqlDuradosSys, parameters); @@ -165,7 +165,7 @@ private void LoadUserData(string guid) parameters.Add("@username", duradosSysUser.ToString()); - string sql = string.Format("SELECT TOP 1 {0} FROM {1} WITH(NOLOCK) WHERE {2}=@username", GetUserFieldsForSelect(), Map.Database.UserViewName, Map.Database.UsernameFieldName); + string sql = Durados.Web.Mvc.Maps.MainAppSchema.GetLoadUserDataByUsernameSql( GetUserFieldsForSelect(), Map.Database.UserViewName, Map.Database.UsernameFieldName); object dataTable = sqlAccess.ExecuteTable(Map.Database.GetUserView().ConnectionString, sql, parameters, System.Data.CommandType.Text); @@ -308,13 +308,14 @@ private string GetUserGuid(string userName) { try { - Durados.DataAccess.SqlAccess sql = new Durados.DataAccess.SqlAccess(); + Durados.DataAccess.SqlAccess sql = Durados.Web.Mvc.Maps.MainAppSqlAccess; Dictionary parameters = new Dictionary(); parameters.Add("@username", userName); string userViewName = Map.Database.UserViewName; - object guid = sql.ExecuteScalar(Durados.Web.Mvc.Maps.Instance.DuradosMap.connectionString, "SELECT TOP 1 [durados_user].[guid] FROM durados_user WITH(NOLOCK) WHERE [durados_user].[username]=@username", parameters); + + object guid = sql.ExecuteScalar(Durados.Web.Mvc.Maps.Instance.DuradosMap.connectionString, Durados.Web.Mvc.Maps.MainAppSchema.GetUserGuidSql(), parameters); if (guid == null || guid == DBNull.Value) throw new Durados.DuradosException(Map.Database.Localizer.Translate("Username has no uniqe guid ,password canot be reset.")); @@ -545,12 +546,12 @@ private void ApproveUser(string appName, string username) Dictionary parameters2 = new Dictionary(); parameters2.Add("@UserId", userId); parameters2.Add("@AppId", mapId); - Durados.DataAccess.SqlAccess sql = new Durados.DataAccess.SqlAccess(); - if (string.IsNullOrEmpty(sql.ExecuteScalar(Durados.Web.Mvc.Maps.Instance.DuradosMap.connectionString, "SELECT TOP 1 [ID] FROM [durados_UserApp] WHERE [UserId]=@UserId AND [AppId]=@AppId", parameters2))) + Durados.DataAccess.SqlAccess sqlAccess = Durados.Web.Mvc.Maps.MainAppSqlAccess; + if (string.IsNullOrEmpty(sqlAccess.ExecuteScalar(Durados.Web.Mvc.Maps.Instance.DuradosMap.connectionString, Durados.Web.Mvc.Maps.MainAppSchema.GetUserAappIdSql(), parameters2))) { parameters2.Add("@newUser", username); parameters2.Add("@appName", appName); - sql.ExecuteNonQuery(Durados.Web.Mvc.Maps.Instance.DuradosMap.Database.ConnectionString, "durados_AssignPendingApps @newUser,@appName", parameters2, AssignPendingAppsCallback); + sqlAccess.ExecuteNonQuery(Durados.Web.Mvc.Maps.Instance.DuradosMap.Database.ConnectionString, "durados_AssignPendingApps @newUser,@appName", parameters2, AssignPendingAppsCallback); } } diff --git a/BackAnd.Web.Api/Controllers/Admin/limitsController.cs b/BackAnd.Web.Api/Controllers/Admin/limitsController.cs index 2d34a00d..240829a9 100644 --- a/BackAnd.Web.Api/Controllers/Admin/limitsController.cs +++ b/BackAnd.Web.Api/Controllers/Admin/limitsController.cs @@ -140,16 +140,9 @@ public IHttpActionResult Put(string appName = null) int limit = System.Convert.ToInt32(values[key]); - SqlAccess sa = new SqlAccess(); - - string sql = "SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; " + - "BEGIN TRANSACTION; " + - "UPDATE dbo.durados_AppLimits SET Limit = " + limit + " WHERE AppId = " + id + " and Name = '" + limits.ToString() + "';" + - " IF @@ROWCOUNT = 0 " + - "BEGIN " + - "INSERT into dbo.durados_AppLimits (Name, Limit, AppId) values ('" + limits.ToString() + "'," + limit + "," + id.Value + "); " + - "END " + - "COMMIT TRANSACTION;"; + SqlAccess sa = Maps.MainAppSqlAccess; + + string sql = Maps.MainAppSchema.GetInsertLimitsSql(limits, limit, id); sa.ExecuteNonQuery(Maps.Instance.DuradosMap.connectionString, sql); } diff --git a/BackAnd.Web.Api/Controllers/Admin/myAppConnectionController.cs b/BackAnd.Web.Api/Controllers/Admin/myAppConnectionController.cs index eb9f27b0..9042057e 100644 --- a/BackAnd.Web.Api/Controllers/Admin/myAppConnectionController.cs +++ b/BackAnd.Web.Api/Controllers/Admin/myAppConnectionController.cs @@ -19,6 +19,8 @@ using Durados.Web.Mvc.Webhook; using Durados.Web.Mvc.UI.Helpers.Cloning; using System.Runtime.Caching; +using System.Data.Common; +using System.Data; /* HTTP Verb |Entire Collection (e.g. /customers) |Specific Item (e.g. /customers/{id}) ----------------------------------------------------------------------------------------------------------------------------------------------- @@ -195,7 +197,10 @@ private string GetPostDataForCreateNewRdsDatabase(string callbackUrl) private string GetNewAppGuid(Durados.CreateEventArgs e) { Guid guid; - string sql = "Select [Guid] from durados_app with(nolock) where id=" + e.PrimaryKey; + string sql = Maps.MainAppSchema.GetAppGuidById(); + var parameter = e.Command.CreateParameter(); + parameter.ParameterName = "Id"; + parameter.Value = e.PrimaryKey; e.Command.CommandText = sql; object scalar = e.Command.ExecuteScalar(); @@ -227,12 +232,12 @@ protected override void BeforeCreate(Durados.CreateEventArgs e) { if (IsTempAppBelongToCreator(e, out tempAppId)) { - string sqlDeleteTempApp = "delete durados_App with (rowlock) where Id = " + tempAppId.Value; + string sqlDeleteTempApp = Maps.MainAppSchema.GetDeleteAppById(tempAppId.Value); e.Command.CommandText = sqlDeleteTempApp; //lock (locker1) // { - Durados.SmartRun.RunWithRetry.Run(() => + Durados.SmartRun.RunWithRetry.Run(() => { e.Command.ExecuteNonQuery(); }, 8, 2000); @@ -358,9 +363,8 @@ protected void BeforeCreate2(Durados.CreateEventArgs e) if (string.IsNullOrEmpty(e.PrimaryKey)) throw new Durados.DuradosException("Failed to save new app."); string callbackUrl = string.Format("{0}/admin/myAppConnection/rdsResponse?appguid={1}&appname={2}", Maps.ApiUrls[0], GetNewAppGuid(e), e.Values["Name"].ToString()); - - - string url = System.Configuration.ConfigurationManager.AppSettings["nodeServicesUrl"] + "/createRDSInstance"; + + // string url = System.Configuration.ConfigurationManager.AppSettings["nodeServicesUrl"] + "/createRDSInstance"; ///{"instanceName":"yrvtest23","dbName":"yrvtest23","instanceClass":"db.t1.micro","storageSize":"5","IPRange":["0.0.0.0/32"],"engine":"MySQL","engineVersion":"5.6.21","username":"yariv","password":"123456789","region":"us-east-1","characterSetName":"ASCII","callbackUrl":"http://backand-dev3.cloudapp.net:4109/admin/myAppConnection/rdsResponse?appguid=86bec9ad-3319-423d-8125-9860ccd535c4&appname=test1&success=true","authToken":"123456789","securityGroup":"bknd-Allcustomers"} string postData = GetPostDataForCreateNewRdsDatabase(callbackUrl); @@ -375,8 +379,8 @@ protected void BeforeCreate2(Durados.CreateEventArgs e) } else { - string response = Durados.Web.Mvc.Infrastructure.Http.PostWebRequest(url, postData); - json = Durados.Web.Mvc.UI.Json.JsonSerializer.Deserialize(response); + //string response = Durados.Web.Mvc.Infrastructure.Http.PostWebRequest(url, postData); + //json = Durados.Web.Mvc.UI.Json.JsonSerializer.Deserialize(response); } } catch (Exception exception) @@ -391,7 +395,9 @@ protected void BeforeCreate2(Durados.CreateEventArgs e) } private string GetServerName(string connectionString) { - return new MySqlSchema().GetServerName(connectionString); + if (MySqlAccess.IsMySqlConnectionString(Maps.Instance.SystemConnectionString)) + return new MySqlSchema().GetServerName(connectionString); + return new SqlSchema().GetServerName(connectionString); } private Durados.SqlProduct GetSystemSqlProduct() @@ -548,13 +554,18 @@ protected override void AfterCreateAfterCommit(Durados.CreateEventArgs e) string dataSourceTypeId = e.Values[dataSourceTypeFieldName].ToString(); string name = e.Values[nameFieldName].ToString(); - System.Data.SqlClient.SqlConnectionStringBuilder builder = new System.Data.SqlClient.SqlConnectionStringBuilder(); - builder.ConnectionString = Map.connectionString; + DbConnectionStringBuilder builder = Maps.GetMapsConnectionStringBuilder(); + + string server = builder.Server(); + string userId = builder.UserId(); + string password = builder.Password(); + bool integratedSecurity = builder.IntegratedSecurity(); + string pk = e.PrimaryKey; string cleanName = GetCleanName(name); - Durados.SqlProduct sqlProduct = Durados.SqlProduct.SqlServer; + Durados.SqlProduct sqlProduct = Map.SqlProduct; if (dataSourceTypeId == "1")// || dataSourceTypeId == "4") // blank or template { @@ -569,7 +580,7 @@ protected override void AfterCreateAfterCommit(Durados.CreateEventArgs e) { sqlAccess.ExecuteNoneQueryStoredProcedure(Maps.Instance.ConnectionString, "durados_CreateNewDatabase", values); } - catch (System.Data.SqlClient.SqlException exception) + catch (DbException exception) { throw new Durados.DuradosException(exception.Message, exception); } @@ -589,9 +600,10 @@ protected override void AfterCreateAfterCommit(Durados.CreateEventArgs e) string duradosUser = Map.Database.GetUserID(); string newPassword = new Durados.Web.Mvc.Controllers.AccountMembershipService().GetRandomPassword(12); string newUsername = appCatalog + "User"; + try { - CreateDatabaseUser(builder.DataSource, appCatalog, builder.UserID, builder.Password, builder.IntegratedSecurity, newUsername, newPassword, false); + CreateDatabaseUser(server, appCatalog, userId, password, integratedSecurity, newUsername, newPassword, false); sqlAccess.CreateDatabaseUserWithoutLogin(Map.connectionString, sysCatalog, newUsername, newPassword, "db_owner"); } catch (Exception exception) @@ -599,23 +611,24 @@ protected override void AfterCreateAfterCommit(Durados.CreateEventArgs e) Map.Logger.Log(GetControllerNameForLog(this.ControllerContext), "CreateApp", exception.Source, exception, 1, "Failed to create database user. username=" + newUsername); throw new Durados.DuradosException("Failed to create database user"); } - int? appConnId = SaveConnection(builder.DataSource, appCatalog, newUsername, newPassword, duradosUser, Durados.SqlProduct.SqlServer); + int? appConnId = SaveConnection(server, appCatalog, newUsername, newPassword, duradosUser, Durados.SqlProduct.SqlServer); - int? sysConnId = SaveConnection(builder.DataSource, sysCatalog, newUsername, newPassword, duradosUser, Durados.SqlProduct.SqlServer); + int? sysConnId = SaveConnection(server, sysCatalog, newUsername, newPassword, duradosUser, Durados.SqlProduct.SqlServer); //values = new Dictionary(); //values.Add("FK_durados_App_durados_SqlConnection_Parent", appConnId); //values.Add("FK_durados_App_durados_SqlConnection_System_Parent", sysConnId); //e.View.Edit(values, e.PrimaryKey, null, null, null, null); + + string sql = Maps.MainAppSchema.GetUpdateAppConnectionsSql(appConnId,sysConnId, e.PrimaryKey); - string sql = "update durados_App set SqlConnectionId = " + appConnId + ", SystemSqlConnectionId = " + sysConnId + " where id = " + e.PrimaryKey; - - using (System.Data.SqlClient.SqlConnection connection = new System.Data.SqlClient.SqlConnection(Maps.Instance.ConnectionString)) + using (IDbConnection connection = GetNewConnection(Maps.Instance.DuradosMap.SqlProduct,Maps.Instance.ConnectionString)) { connection.Open(); - using (System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand(sql, connection)) + using (IDbCommand command = connection.CreateCommand()) { + command.CommandText = sql; command.ExecuteNonQuery(); } } @@ -644,10 +657,10 @@ protected override void AfterCreateAfterCommit(Durados.CreateEventArgs e) { try { - using (System.Data.SqlClient.SqlConnection connection = new System.Data.SqlClient.SqlConnection(Maps.Instance.ConnectionString)) + using (IDbConnection connection = GetNewConnection(Maps.Instance.DuradosMap.SqlProduct,Maps.Instance.ConnectionString)) { connection.Open(); - using (System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand()) + using (IDbCommand command = connection.CreateCommand()) { command.Connection = connection; sqlAccess.ExecuteNonQuery(e.View, command, "create database " + sysCatalog, null); @@ -662,14 +675,14 @@ protected override void AfterCreateAfterCommit(Durados.CreateEventArgs e) try { - CreateDatabaseUser(builder.DataSource, sysCatalog, builder.UserID, builder.Password, builder.IntegratedSecurity, newUsername, newPassword, false); + CreateDatabaseUser(server, sysCatalog, userId, password, integratedSecurity, newUsername, newPassword, false); } catch (Exception exception) { Map.Logger.Log(GetControllerNameForLog(this.ControllerContext), "CreateApp", exception.Source, exception, 1, "Failed to create database user. username=" + newUsername); throw new Durados.DuradosException("Failed to create database user"); } - sysConnId = SaveConnection(builder.DataSource, sysCatalog, newUsername, newPassword, duradosUser, Durados.SqlProduct.SqlServer); + sysConnId = SaveConnection(server, sysCatalog, newUsername, newPassword, duradosUser, Durados.SqlProduct.SqlServer); } else if (systemSqlProduct == Durados.SqlProduct.MySql) @@ -695,13 +708,14 @@ protected override void AfterCreateAfterCommit(Durados.CreateEventArgs e) //values.Add("FK_durados_App_durados_SqlConnection_System_Parent", sysConnId); //e.View.Edit(values, e.PrimaryKey, null, null, null, null); - string sql = "update durados_App set SystemSqlConnectionId = " + sysConnId + " where id = " + e.PrimaryKey; + string sql = Maps.MainAppSchema.GetUpdateAppSystemConnectionSql(sysConnId, e.PrimaryKey); - using (System.Data.SqlClient.SqlConnection connection = new System.Data.SqlClient.SqlConnection(Maps.Instance.ConnectionString)) + using (IDbConnection connection = GetNewConnection(Map.SqlProduct, Maps.Instance.ConnectionString)) { connection.Open(); - using (System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand(sql, connection)) + using (IDbCommand command = connection.CreateCommand()) { + command.CommandText = sql; command.ExecuteNonQuery(); } } @@ -736,19 +750,21 @@ protected override void AfterCreateAfterCommit(Durados.CreateEventArgs e) try { + string sql =Maps.MainAppSchema.GetExecCreateDB(sysCatalog) ; if (!sysExists) { - using (System.Data.SqlClient.SqlConnection connection = new System.Data.SqlClient.SqlConnection(Maps.Instance.ConnectionString)) + using (IDbConnection connection = GetNewConnection(Maps.Instance.DuradosMap.SqlProduct,Maps.Instance.ConnectionString)) { connection.Open(); - using (System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand("exec('create database " + sysCatalog + "')", connection)) + using (IDbCommand command = connection.CreateCommand()) { + command.CommandText = sql; command.ExecuteNonQuery(); } } } } - catch (System.Data.SqlClient.SqlException exception) + catch (DbException exception) { throw new Durados.DuradosException("Could not create system database: " + sysCatalog + "; Additional info: " + exception.Message, exception); } @@ -757,17 +773,19 @@ protected override void AfterCreateAfterCommit(Durados.CreateEventArgs e) { if (!appExists) { - using (System.Data.SqlClient.SqlConnection connection = new System.Data.SqlClient.SqlConnection(Maps.Instance.ConnectionString)) + string sql = Maps.MainAppSchema.GetExecCreateDB(appCatalog); + using (IDbConnection connection = GetNewConnection(Maps.Instance.DuradosMap.SqlProduct,Maps.Instance.ConnectionString)) { connection.Open(); - using (System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand("exec('create database " + appCatalog + "')", connection)) + using (IDbCommand command = connection.CreateCommand()) { + command.CommandText = sql; command.ExecuteNonQuery(); } } } } - catch (System.Data.SqlClient.SqlException exception) + catch (DbException exception) { throw new Durados.DuradosException("Could not create app database: " + appCatalog + "; Additional info: " + exception.Message, exception); } @@ -780,7 +798,7 @@ protected override void AfterCreateAfterCommit(Durados.CreateEventArgs e) { if (!appExists) { - CreateDatabaseUser(builder.DataSource, appCatalog, builder.UserID, builder.Password, builder.IntegratedSecurity, newUsername, newPassword, false); + CreateDatabaseUser(server, appCatalog, userId, password, integratedSecurity, newUsername, newPassword, false); if (!sysExists) { sqlAccess.CreateDatabaseUserWithoutLogin(Map.connectionString, sysCatalog, newUsername, newPassword, "db_owner"); @@ -792,7 +810,7 @@ protected override void AfterCreateAfterCommit(Durados.CreateEventArgs e) { sqlAccess.CreateDatabaseUser(Map.connectionString, sysCatalog, newUsername, newPassword, "db_owner"); } - catch (System.Data.SqlClient.SqlException) + catch (DbException) { sqlAccess.CreateDatabaseUserWithoutLogin(Map.connectionString, sysCatalog, newUsername, newPassword, "db_owner"); } @@ -807,13 +825,13 @@ protected override void AfterCreateAfterCommit(Durados.CreateEventArgs e) int? appConnId = null; if (!appExists) - appConnId = SaveConnection(builder.DataSource, appCatalog, newUsername, newPassword, duradosUser, Durados.SqlProduct.SqlServer); + appConnId = SaveConnection(server, appCatalog, newUsername, newPassword, duradosUser, Durados.SqlProduct.SqlServer); else appConnId = Convert.ToInt32(e.Values[appconnstrFieldName]); int? sysConnId = null; if (!sysExists) - sysConnId = SaveConnection(builder.DataSource, sysCatalog, newUsername, newPassword, duradosUser, Durados.SqlProduct.SqlServer); + sysConnId = SaveConnection(server, sysCatalog, newUsername, newPassword, duradosUser, Durados.SqlProduct.SqlServer); else sysConnId = Convert.ToInt32(e.Values[sysconnstrFieldName]); @@ -823,13 +841,15 @@ protected override void AfterCreateAfterCommit(Durados.CreateEventArgs e) //e.View.Edit(values, e.PrimaryKey, null, null, null, null); - string sql2 = "update durados_App set SqlConnectionId = " + appConnId + ", SystemSqlConnectionId = " + sysConnId + " where id = " + e.PrimaryKey; + string sql2 = Maps.MainAppSchema.GetUpdateAppConnectionsSql(appConnId, sysConnId, e.PrimaryKey); + - using (System.Data.SqlClient.SqlConnection connection = new System.Data.SqlClient.SqlConnection(Maps.Instance.ConnectionString)) + using (IDbConnection connection = GetConnection(Maps.Instance.DuradosMap.SqlProduct,Maps.Instance.ConnectionString)) { connection.Open(); - using (System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand(sql2, connection)) + using (IDbCommand command = connection.CreateCommand()) { + command.CommandText = sql2; command.ExecuteNonQuery(); } } @@ -876,7 +896,7 @@ protected override void AfterCreateAfterCommit(Durados.CreateEventArgs e) //values = new Dictionary(); //values.Add(e.View.GetFieldByColumnNames("SqlConnectionId").Name, newConnectionId); //e.View.Edit(values, e.PrimaryKey, null, null, null, null); - string sql = "update durados_App set SqlConnectionId = " + newConnectionId + ",Image= '" + image + "', DataSourceTypeId=2 where Id = " + e.PrimaryKey; + string sql = Maps.MainAppSchema.GetUpdateAppConnectionAndProductSql(newConnectionId, image,e.PrimaryKey); sqlAccess.ExecuteNonQuery(e.View.ConnectionString, sql); } sqlProduct = sqlConnectionRow.IsNull("SqlProductId") ? Durados.SqlProduct.SqlServer : (Durados.SqlProduct)sqlConnectionRow["SqlProductId"]; @@ -1014,7 +1034,7 @@ private void ValidateConnection(string server, string catalog, string username, ValidateConnection(server, catalog, username, password, Durados.SqlProduct.SqlServer, 0, false, false, null, null, null, null, null, 0, 0); } - SqlAccess sqlAccess = new SqlAccess(); + SqlAccess sqlAccess = Maps.MainAppSqlAccess; private string CreateDatabase(string server, string catalog, string username, string password, string source, string template) { @@ -1128,13 +1148,13 @@ protected virtual void SendError(int logType, Exception exception, string contro protected int? SaveConnection(string server, string catalog, string username, string password, string userId, Durados.SqlProduct sqlProduct, bool usingSsh, bool usingSsl, string sshRemoteHost, string sshUser, string sshPassword, string sshPrivateKey, int sshPort, int productPort) { View view = GetView("durados_SqlConnection"); - + Dictionary values = new Dictionary(); values.Add("ServerName", server); values.Add("Catalog", catalog); values.Add("Username", username); values.Add("IntegratedSecurity", false); - values.Add("Password", password); + values.Add("Password", Maps.Instance.DuradosMap.Encrypt(password)); values.Add(view.GetFieldByColumnNames("SqlProductId").Name, ((int)sqlProduct).ToString()); values.Add(view.GetFieldByColumnNames("DuradosUser").Name, userId); @@ -1194,11 +1214,12 @@ private void HandleTemplate(string name, string id, MapDataSet.durados_AppRow ap //Maps.Instance.Restart(name); } + /* TODO: Main MySQL depricated private string GetThemePath(int? themeId) { return Maps.Instance.GetTheme(themeId).RelativePath; } - + */ //public Dictionary CreateAppGet2(string template, string name, string title, string server, string catalog, string username, string password, bool usingSsh, bool usingSsl, string sshRemoteHost, string sshUser, string sshPassword, string sshPrivateKey, int sshPort, int productPort, string zone, string characterSetName, string engine, string engineVersion, int? themeId) //{ // Durados.SqlProduct? product = Durados.Web.Mvc.UI.Helpers.RDSNewDatabaseFactory.GetSqlProductfromTemplate(template); @@ -1451,7 +1472,9 @@ private Dictionary CreateApp2(string template, string name, stri values.Add("TemplateFile", string.Empty); values.Add("FK_durados_App_durados_SqlConnection_Security_Parent", string.Empty); values.Add("Basic", basic); - values.Add("FK_durados_App_durados_Theme_Parent", (themeId ?? Maps.DefaultThemeId).ToString()); + /* TODO: Main MySQL depricated + * values.Add("FK_durados_App_durados_Theme_Parent", (themeId ?? Maps.DefaultThemeId).ToString()); + */ if (templateId.HasValue) { string templateIdFieldName = view.GetFieldByColumnNames("TemplateId").Name; @@ -1482,9 +1505,9 @@ private Dictionary CreateApp2(string template, string name, stri } } - catch (System.Data.SqlClient.SqlException exception) + catch (DbException exception) { - if (exception.Number == 2601) + if (exception is System.Data.SqlClient.SqlException && (exception as System.Data.SqlClient.SqlException).Number == 2601) { Map.Logger.Log(GetControllerNameForLog(this.ControllerContext), "CreateApp", exception.Source, exception, 6, "App name already exists"); return new Dictionary() { { "Success", false }, { "Message", "Application name already exists, please enter a different name." } }; @@ -1572,7 +1595,10 @@ private Dictionary CreateApp2(string template, string name, stri } var builder = new UriBuilder(System.Web.HttpContext.Current.Request.Url); - string previewUrl = "http://" + name + Durados.Web.Mvc.Maps.UserPreviewUrl + GetThemePath(themeId); + string previewUrl = "http://" + name + Durados.Web.Mvc.Maps.UserPreviewUrl; + /* TODO: Main MySQL depricated + * +GetThemePath(themeId); + */ return new Dictionary() { { "Success", true }, { "Url", Maps.GetAppUrl(name) }, { "previewUrl", previewUrl } }; } @@ -1920,8 +1946,8 @@ private void UpdateProductType(string appName, int productType) return; string sql = - "update durados_App set productType = @productType where Name = @name"; - new SqlAccess().ExecuteNonQuery(Maps.Instance.DuradosMap.connectionString, sql, new Dictionary() { { "productType", productType }, { "name", appName } }, null); + Maps.MainAppSchema.GetUpdateAppProduct(); + Maps.MainAppSqlAccess.ExecuteNonQuery(Maps.Instance.DuradosMap.connectionString, sql, new Dictionary() { { "productType", productType }, { "name", appName } }, null); } @@ -2003,8 +2029,8 @@ public void HandleError(Exception exception) { Maps.Instance.DuradosMap.Logger.Log("myAppConnection", "CreateApp", exception.Source, exception, 1, null); - string sql = "Update durados_App set DatabaseStatus = " + (int)OnBoardingStatus.Error + " where id = " + appId; - Durados.DataAccess.SqlAccess sqlAccess = new Durados.DataAccess.SqlAccess(); + string sql = Maps.MainAppSchema.GetUpdateDBStatusSql((int)OnBoardingStatus.Error, appId); + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; sqlAccess.ExecuteNonQuery(Maps.Instance.DuradosMap.connectionString, sql); @@ -2078,9 +2104,9 @@ private void CopyApp(int sourceAppId, int targetAppId, CopyOptions copyOptions) private int GetAppId(int templateId) { - string sql = - "select AppId from durados_Template with(NOLOCK) where id = " + templateId; - string scalar = new SqlAccess().ExecuteScalar(Maps.Instance.DuradosMap.connectionString, sql); + string sql = Maps.MainAppSchema.GetAppIdSql(templateId); + + string scalar = Maps.MainAppSqlAccess.ExecuteScalar(Maps.Instance.DuradosMap.connectionString, sql); if (!string.IsNullOrEmpty(scalar)) { return Convert.ToInt32(scalar); @@ -2261,8 +2287,8 @@ private Template GetTemplateFromCache(string appName) private void UpdateDatabaseStatus(int appId, OnBoardingStatus onBoardingStatus) { - string sql = "Update durados_App set DatabaseStatus = " + (int)onBoardingStatus + " where id = " + appId; - Durados.DataAccess.SqlAccess sqlAccess = new Durados.DataAccess.SqlAccess(); + string sql = Maps.MainAppSchema.GetUpdateDBStatusSql((int)onBoardingStatus, appId); + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; try { sqlAccess.ExecuteNonQuery(Maps.Instance.DuradosMap.connectionString, sql); @@ -2466,6 +2492,9 @@ public virtual IHttpActionResult Put(string id) if (!values.ContainsKey("ProductPort")) values.Add("ProductPort", productPort); + if (Maps.Instance.DuradosMap.SqlProduct == Durados.SqlProduct.MySql && values.ContainsKey("password") && !string.IsNullOrEmpty((values["password"] ?? string.Empty).ToString())) + values["password"] = map.Encrypt(values["password"].ToString()); + view.Update(values, connectionId.ToString(), false, view_BeforeEdit, view_BeforeEditInDatabase, view_AfterEditBeforeCommit, view_AfterEditAfterCommit); try @@ -2526,7 +2555,7 @@ private void UpdateProductCache(int id, Durados.SqlProduct sqlProduct, System.Da private string[] GetAppsName(int id, System.Data.IDbCommand command) { - command.CommandText = "SELECT dbo.durados_App.Name FROM dbo.durados_App with(nolock) INNER JOIN dbo.durados_SqlConnection with(nolock) ON dbo.durados_App.SqlConnectionId = dbo.durados_SqlConnection.Id WHERE (dbo.durados_SqlConnection.Id = 1)"; + command.CommandText = Maps.MainAppSchema.GetAppsNameSql(); List apps = new List(); @@ -2585,7 +2614,10 @@ private void ValidateConnectionString(Durados.DataActionEventArgs e) //connectionString = GetConnection(serverName, catalog, integratedSecurity, username, password, duradosUserId); //SqlConnection connection = new SqlConnection(connectionString); - + if(Maps.Instance.DuradosMap.SqlProduct == sqlProduct) + { + password = map.Decrypt(password); + } connectionString = GetConnection(serverName, catalog, integratedSecurity, username, password, duradosUserId, sqlProduct, localPort, usesSsh, usesSsl); System.Data.IDbConnection connection = GetNewConnection(sqlProduct, connectionString); @@ -2838,8 +2870,8 @@ public string GetConnection(string serverName, string catalog, bool? integratedS { string connectionString = null; - System.Data.SqlClient.SqlConnectionStringBuilder builder = new System.Data.SqlClient.SqlConnectionStringBuilder(); - builder.ConnectionString = Map.connectionString; + DbConnectionStringBuilder builder = Maps.GetMapsConnectionStringBuilder(); ; + //builder.ConnectionString = Map.connectionString; bool hasServer = !string.IsNullOrEmpty(serverName); bool hasCatalog = !string.IsNullOrEmpty(catalog); @@ -2853,7 +2885,7 @@ public string GetConnection(string serverName, string catalog, bool? integratedS { if (!hasServer) { - serverName = builder.DataSource; + serverName = builder.Server(); } connectionString = "Data Source={0};Initial Catalog={1};Integrated Security=True;"; @@ -2897,7 +2929,7 @@ public string GetConnection(string serverName, string catalog, bool? integratedS if (!hasServer) { if (Maps.AllowLocalConnection) - serverName = builder.DataSource; + serverName = builder.Server(); else throw new Durados.DuradosException("Server Name is missing"); } @@ -2905,7 +2937,7 @@ public string GetConnection(string serverName, string catalog, bool? integratedS if (!hasUsername) { if (Maps.AllowLocalConnection) - username = builder.UserID; + username = builder.UserId(); else throw new Durados.DuradosException("Username Name is missing"); } @@ -2913,7 +2945,7 @@ public string GetConnection(string serverName, string catalog, bool? integratedS if (!hasPassword) { if (Maps.AllowLocalConnection) - password = builder.Password; + password = builder.Password(); else throw new Durados.DuradosException("Password Name is missing"); } @@ -3044,6 +3076,17 @@ protected void NotifyNewDatabase(string server, string catalog, string newUser, Durados.Cms.DataAccess.Email.Send(host, Map.Database.UseSmtpDefaultCredentials, port, username, password, false, to.Split(';'), new string[0], new string[1] { from }, subject, message, from, null, null, false, null, Map.Database.Logger); } + protected internal override void view_AfterSelect(object sender, Durados.SelectEventArgs e) + { + if(sender is MySqlAccess && e.View != null && e.View.Name == ConnectionViewName) + { + foreach (DataRow row in (e.DataTable.AsEnumerable())) + { + if(row["Password"] != null) + row["Password"] = map.Decrypt(row["Password"].ToString()); + } + } + } } public class InvalidSchemaException : Durados.DuradosException diff --git a/BackAnd.Web.Api/Controllers/Admin/myAppsController.cs b/BackAnd.Web.Api/Controllers/Admin/myAppsController.cs index 4119863d..910d1897 100644 --- a/BackAnd.Web.Api/Controllers/Admin/myAppsController.cs +++ b/BackAnd.Web.Api/Controllers/Admin/myAppsController.cs @@ -19,6 +19,8 @@ using Durados.Data; using Durados.Web.Mvc.Webhook; using BackAnd.Web.Api.Controllers.Admin; +using System.Data; +using System.Data.Common; /* HTTP Verb |Entire Collection (e.g. /customers) |Specific Item (e.g. /customers/{id}) ----------------------------------------------------------------------------------------------------------------------------------------------- @@ -368,6 +370,7 @@ public virtual IHttpActionResult Post() const string Name = "Name"; const string Title = "Title"; const string Environment = "Environment"; + if (values.ContainsKey(Name)) @@ -405,6 +408,7 @@ public virtual IHttpActionResult Post() values.Add(Creator, view.Database.GetUserID()); values.Add(DatabaseStatus, (int)OnBoardingStatus.NotStarted); + appName = values[Name].ToString(); string key = view.Create(values, false, view_BeforeCreate, view_BeforeCreateInDatabase, view_AfterCreateBeforeCommit, view_AfterCreateAfterCommit); @@ -413,10 +417,11 @@ public virtual IHttpActionResult Post() return Ok(new { __metadata = new { id = key, appName = appName } }); } - catch (System.Data.SqlClient.SqlException exception) + // TODO : Mysql deprecated + catch (DbException exception) { const int DuplicateUniqueIndex = 2601; - if (exception.Number == DuplicateUniqueIndex) + if ( exception is System.Data.SqlClient.SqlException && ((System.Data.SqlClient.SqlException)exception).Number == DuplicateUniqueIndex) { return ResponseMessage(Request.CreateResponse(HttpStatusCode.Conflict, string.Format(Messages.AppNameAlreadyExists, appName))); } @@ -463,8 +468,8 @@ private int GetNextUserAppNameNumber(string appNamePrefix) private string[] GetAppNamesWithPrefix(string appNamePrefix) { - SqlAccess sqlAccess = new SqlAccess(); - string sql = "select name from durados_app where name like '" + appNamePrefix + "%'"; + SqlAccess sqlAccess = Maps.MainAppSqlAccess; + string sql = Maps.MainAppSchema.GetAppNamesWithPrefixSql(appNamePrefix); System.Data.DataTable table = sqlAccess.ExecuteTable(Maps.Instance.DuradosMap.connectionString, sql, null, System.Data.CommandType.Text); List list = new List(); @@ -656,19 +661,7 @@ private void UpdateAnonymousUserRole(Map map, string role) } - //private void UpdateIsAuthApp(Map map, bool isAuthApp) - //{ - // UpdateIsAuthApp(Convert.ToInt32(map.Id), isAuthApp); - // map.IsAuthApp = isAuthApp; - //} - - //private void UpdateIsAuthApp(int id, bool isAuthApp) - //{ - // string sql = "update durados_App set IsAuthApp = @isAuthApp where id = @id"; - // (new SqlAccess()).ExecuteNonQuery(map.Database.SystemConnectionString, sql, Durados.SqlProduct.SqlServer, new Dictionary() { { "id", id }, { "IsAuthApp", isAuthApp } }, null); - - //} - + private string GetAnonymousRole(Dictionary databaseSettings) { string key = "defaultGuestRole"; @@ -691,26 +684,10 @@ protected override void AfterEditAfterCommit(Durados.EditEventArgs e) string newName = e.Values["Name"].ToString(); if (!oldName.Equals(newName)) { - //Maps.Instance.ChangeName(oldName, newName); - //CreateDns(newName); + Maps.Instance.Restart(oldName); } - //SqlProduct product = Maps.GetSqlProduct(newName); - - //if (product == SqlProduct.MySql) - //{ - // string url = Maps.GetAppUrl(newName); - // string[] split = url.Split(':'); - // url = split[0] + ":" + split[1] + ":" + Maps.ProductsPort[product] + "/Admin/Restart?id=" + Map.Database.GetUserGuid(); - - // Infrastructure.Http.CallWebRequest(url); - - //} - //else - //{ - //Maps.Instance.Restart(oldName); - //} } } @@ -784,8 +761,12 @@ protected override void AfterDeleteBeforeCommit(Durados.DeleteEventArgs e) { int id = Convert.ToInt32(e.PrimaryKey); - System.Data.SqlClient.SqlConnectionStringBuilder scsb = new System.Data.SqlClient.SqlConnectionStringBuilder(Maps.Instance.ConnectionString); - string mapServer = scsb.DataSource; + SqlAccess sqlAccess = Maps.MainAppSqlAccess; + SqlSchema sqlSchema = sqlAccess.GetNewSqlSchema(); + + + string mapServer = sqlSchema.GetServerName(Maps.Instance.ConnectionString); + MapDataSet.durados_SqlConnectionRow systemConnectionRow = ((MapDataSet.durados_AppRow)e.PrevRow).durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection_System; if (systemConnectionRow != null) { @@ -829,9 +810,13 @@ protected override void AfterDeleteBeforeCommit(Durados.DeleteEventArgs e) private bool HasOtherConnectios(string appDatabase) { - using (System.Data.SqlClient.SqlConnection connection = new System.Data.SqlClient.SqlConnection(Maps.Instance.ConnectionString)) + ISqlMainSchema sqlSchema= Maps.MainAppSchema; + string sql = sqlSchema.GetHasOtherConnectiosSql(appDatabase); + + using (IDbConnection connection = sqlSchema.GetNewConnection(Maps.Instance.ConnectionString)) { - using (System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand("select count(*) from dbo.durados_SqlConnection where [Catalog] = N'" + appDatabase + "'", connection)) + + using (IDbCommand command = sqlSchema.GetNewCommand( sql,connection)) { connection.Open(); object scalar = command.ExecuteScalar(); @@ -845,12 +830,17 @@ private bool HasOtherConnectios(string appDatabase) private void DropDatabase(string name) { - System.Data.SqlClient.SqlConnectionStringBuilder scsb = new System.Data.SqlClient.SqlConnectionStringBuilder(Maps.Instance.ConnectionString); + + //System.Data.Common.DbConnectionStringBuilder scsb = Maps.GetMapsConnectionStringBuilder(Maps.Instance.ConnectionString); //scsb.InitialCatalog = null; - using (System.Data.SqlClient.SqlConnection connection = new System.Data.SqlClient.SqlConnection(scsb.ConnectionString)) + + ISqlMainSchema sqlSchema = Maps.MainAppSchema; + string sql = sqlSchema.GetDropDatabaseSql(name); + using (IDbConnection connection = sqlSchema.GetNewConnection(Maps.Instance.ConnectionString)) { - using (System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand("ALTER DATABASE " + name + " SET SINGLE_USER WITH ROLLBACK IMMEDIATE; drop database " + name, connection)) + + using (IDbCommand command = sqlSchema.GetNewCommand(sql, connection)) { connection.Open(); command.ExecuteNonQuery(); @@ -882,11 +872,11 @@ public virtual IHttpActionResult Delete(string id) { return ResponseMessage(Request.CreateResponse(HttpStatusCode.NotFound, string.Format(Messages.ItemWithIdNotFound, id, AppViewName))); } - + /* TODO: Mysql Main string guid = GetMasterGuid(); string qstring = "id=" + guid; - + */ try { @@ -929,8 +919,8 @@ public virtual IHttpActionResult Delete(string id) } catch { } - string sql = "delete durados_App where name = '" + id + "'"; - (new SqlAccess()).ExecuteNonQuery(Maps.Instance.DuradosMap.connectionString, sql); + string sql = Maps.MainAppSchema.GetDeleteAppByName(id); + Maps.MainAppSqlAccess.ExecuteNonQuery(Maps.Instance.DuradosMap.connectionString, sql); Maps.Instance.DuradosMap.Logger.Log("myApps", "delete", "", null, 1, "The app " + id + " was deleted"); diff --git a/BackAnd.Web.Api/Controllers/Admin/pmigController.cs b/BackAnd.Web.Api/Controllers/Admin/pmigController.cs new file mode 100644 index 00000000..e0d8ad55 --- /dev/null +++ b/BackAnd.Web.Api/Controllers/Admin/pmigController.cs @@ -0,0 +1,158 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; +using System.Web.Http; +using System.Net; +using System.Net.Http; +using System.Collections.Specialized; +using System.Web.Script.Serialization; +using Durados.Web.Mvc.UI.Helpers; + +using Durados.Web.Mvc; +using Durados.DataAccess; +using Durados.Web.Mvc.Controllers.Api; +using System.Threading.Tasks; +using System.Diagnostics; +using System.Security; +using Durados.Web.Mvc.Infrastructure; +using MySql.Data.MySqlClient; +using Durados; +using System.Collections; +using System.Data; +using Backand; +using System.Web.Security; +using System.Data.SqlClient; +using System.Configuration; +using System.Text; +using System.Security.Cryptography; +/* + HTTP Verb |Entire Collection (e.g. /customers) |Specific Item (e.g. /customers/{id}) +----------------------------------------------------------------------------------------------------------------------------------------------- +GET |200 (OK), list data items. Use pagination, sorting and filtering to navigate big lists. |200 (OK), single data item. 404 (Not Found), if ID not found or invalid. +PUT |404 (Not Found), unless you want to update/replace every resource in the entire collection. |200 (OK) or 204 (No Content). 404 (Not Found), if ID not found or invalid. +POST |201 (Created), 'Location' header with link to /customers/{id} containing new ID. |404 (Not Found). +DELETE |404 (Not Found), unless you want to delete the whole collection—not often desirable. |200 (OK). 404 (Not Found), if ID not found or invalid. + + */ + +namespace BackAnd.Web.Api.Controllers +{ + [RoutePrefix("1")] + [BackAnd.Web.Api.Controllers.Filters.BackAndAuthorize("Admin,Developer")] + public class pmigController : apiController + { + + [Route("~/1/mig/p")] + [HttpGet] + public IHttpActionResult Get(string username, string password) + { + try + { + //MembershipProviderExtensions.Validate(MembershipProviderExtensions.GetMembershipUser(username), password); + return Ok(); + } + catch (Exception exception) + { + throw new BackAndApiUnexpectedResponseException(exception, this); + + } + } + + + + } + + + public class SqlServerMembershipProviderValidator + { + public bool Validate(string username, string password) + { + return Validate(GetMembershipUser(username), password); + } + + private MembershipUser GetMembershipUser(string username) + { + return System.Web.Security.Membership.Provider.GetUser(username, false); + } + + /// + /// Switches the specified ASP.NET membership user to a clear password format, updating the associated fields. + /// + /// The membership user. + /// + private bool Validate(MembershipUser user, string password) + { + if (user == null) + { + throw new ArgumentNullException("user"); + } + + if (Membership.Providers[user.ProviderName] is SqlMembershipProvider) + { + using (var connection = new SqlConnection(ConfigurationManager.ConnectionStrings["SecurityConnectionString"].ConnectionString)) + { + // Get the user's (possibly encrypted or hashed) security credentials. + var selectQuery = "SELECT Password, PasswordFormat, PasswordKey FROM my_aspnet_membership WHERE UserId = @userId"; + var cmd = new SqlCommand(selectQuery, connection); + cmd.Parameters.Add(new SqlParameter { ParameterName = "userId", Value = user.ProviderUserKey }); + + string hashedPassword = null; + int passwordFormat = 0; + string passwordSalt = null; + + connection.Open(); + var reader = cmd.ExecuteReader(); + while (reader.HasRows && reader.Read()) + { + hashedPassword = (string)reader["Password"]; + passwordFormat = (int)reader["PasswordFormat"]; + passwordSalt = (string)reader["PasswordKey"]; + } + reader.Close(); + connection.Close(); + + return EncodePassword(password, passwordSalt) == hashedPassword; + } + } + + return false; + } + + private static string EncodePassword(string pass, string salt) + { + byte[] bytes = Encoding.Unicode.GetBytes(pass); + byte[] src = System.Convert.FromBase64String(salt); + byte[] dst = new byte[src.Length + bytes.Length]; + byte[] inArray = null; + Buffer.BlockCopy(src, 0, dst, 0, src.Length); + Buffer.BlockCopy(bytes, 0, dst, src.Length, bytes.Length); + HashAlgorithm algorithm = HashAlgorithm.Create("SHA1"); + inArray = algorithm.ComputeHash(dst); + return System.Convert.ToBase64String(inArray); + } + } + + + + /// + /// An ACME corp-specific version of SqlMembershipProvider. + /// + public class AcmeCorpMembershipProvider : System.Web.Security.SqlMembershipProvider + { + /// + /// Decrypts the specified password string. + /// + /// The encryptedPassword. + /// The decrypted password string. + public string DecryptPassword(string encryptedPassword) + { + var encodedPassword = System.Convert.FromBase64String(encryptedPassword); + var bytes = base.DecryptPassword(encodedPassword); + return System.Text.Encoding.Unicode.GetString(bytes, 0x10, bytes.Length - 0x10); + } + } +} + + diff --git a/BackAnd.Web.Api/Controllers/Filters/BackAndAuthorizeAttribute.cs b/BackAnd.Web.Api/Controllers/Filters/BackAndAuthorizeAttribute.cs index 5566e42a..5d23c3fb 100644 --- a/BackAnd.Web.Api/Controllers/Filters/BackAndAuthorizeAttribute.cs +++ b/BackAnd.Web.Api/Controllers/Filters/BackAndAuthorizeAttribute.cs @@ -214,7 +214,7 @@ public override void OnAuthorization(System.Web.Http.Controllers.HttpActionConte if (!System.Web.HttpContext.Current.Items.Contains(Database.RequestId)) System.Web.HttpContext.Current.Items.Add(Database.RequestId, Guid.NewGuid().ToString()); - NewRelic.Api.Agent.NewRelic.AddCustomParameter(Durados.Database.RequestId, System.Web.HttpContext.Current.Items[Database.RequestId].ToString()); + //NewRelic.Api.Agent.NewRelic.AddCustomParameter(Durados.Database.RequestId, System.Web.HttpContext.Current.Items[Database.RequestId].ToString()); //if (actionContext.Request.Headers.Contains("AppName")) //{ try @@ -501,7 +501,7 @@ private bool IsBasicAuthorized(System.Web.Http.Controllers.HttpActionContext act if (!System.Web.HttpContext.Current.Items.Contains(Database.RequestId)) System.Web.HttpContext.Current.Items.Add(Database.RequestId, Guid.NewGuid().ToString()); - NewRelic.Api.Agent.NewRelic.AddCustomParameter(Durados.Database.RequestId, System.Web.HttpContext.Current.Items[Database.RequestId].ToString()); + //NewRelic.Api.Agent.NewRelic.AddCustomParameter(Durados.Database.RequestId, System.Web.HttpContext.Current.Items[Database.RequestId].ToString()); return true; } @@ -682,7 +682,7 @@ private bool IsAnonymous(System.Web.Http.Controllers.HttpActionContext actionCon if (!System.Web.HttpContext.Current.Items.Contains(Database.RequestId)) System.Web.HttpContext.Current.Items.Add(Database.RequestId, Guid.NewGuid().ToString()); - NewRelic.Api.Agent.NewRelic.AddCustomParameter(Durados.Database.RequestId, System.Web.HttpContext.Current.Items[Database.RequestId].ToString()); + //NewRelic.Api.Agent.NewRelic.AddCustomParameter(Durados.Database.RequestId, System.Web.HttpContext.Current.Items[Database.RequestId].ToString()); return true; } @@ -744,13 +744,16 @@ private void SetAppByTokenToCache(string anonymousToken, string appName) private string GetAppByTokenFromDb(string anonymousToken) { - string sql = "SELECT [Name] FROM [durados_app] WITH(NOLOCK) WHERE [AnonymousToken] =@AnonymousToken"; - using (System.Data.SqlClient.SqlConnection cnn = new System.Data.SqlClient.SqlConnection(Maps.Instance.DuradosMap.Database.ConnectionString)) + string sql = Maps.MainAppSchema.GetAppNameByTokenSql(Database.AnonymousToken); + using (IDbConnection cnn = Maps.MainAppSchema.GetNewConnection(Maps.Instance.DuradosMap.Database.ConnectionString)) { - using (System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand(sql, cnn)) + using (IDbCommand command = cnn.CreateCommand()) { - - command.Parameters.AddWithValue(Database.AnonymousToken, anonymousToken); + command.CommandText = sql; + var parameter = command.CreateParameter(); + parameter.ParameterName ="token"; + parameter.Value = anonymousToken; + command.Parameters.Add(parameter); cnn.Open(); object scalar = command.ExecuteScalar(); if (scalar == null || scalar == DBNull.Value) @@ -821,13 +824,16 @@ private bool IsServerAuthorizedForRDScallback(System.Web.Http.Controllers.HttpAc private string GetAppGuid(string appName) { - string sql = "SELECT [Guid] FROM [durados_app] WITH(NOLOCK) WHERE [Name] =@appName"; - using (System.Data.SqlClient.SqlConnection cnn = new System.Data.SqlClient.SqlConnection(Maps.Instance.DuradosMap.Database.ConnectionString)) + string sql = Maps.MainAppSchema.GetAppGuidByName(); + using (IDbConnection cnn = Maps.MainAppSchema.GetNewConnection(Maps.Instance.DuradosMap.Database.ConnectionString)) { - using (System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand(sql, cnn)) + using (IDbCommand command = cnn.CreateCommand()) { - - command.Parameters.AddWithValue("appName", appName); + command.CommandText = sql; + var parameter= command.CreateParameter(); + parameter.ParameterName = "appName"; + parameter.Value = appName; + command.Parameters.Add(parameter); cnn.Open(); object scalar = command.ExecuteScalar(); if (scalar == null || scalar == DBNull.Value) diff --git a/BackAnd.Web.Api/Controllers/Filters/TokenAuthorizeAttribute .cs b/BackAnd.Web.Api/Controllers/Filters/TokenAuthorizeAttribute .cs index 7cc49d87..cad1fe27 100644 --- a/BackAnd.Web.Api/Controllers/Filters/TokenAuthorizeAttribute .cs +++ b/BackAnd.Web.Api/Controllers/Filters/TokenAuthorizeAttribute .cs @@ -7,6 +7,8 @@ using System.Web.Http; using System.Net; using Durados.Web.Mvc; +using System.Data; + namespace BackAnd.Web.Api.Controllers.Filters { @@ -34,7 +36,7 @@ public override void OnAuthorization(System.Web.Http.Controllers.HttpActionConte if (!System.Web.HttpContext.Current.Items.Contains(Database.RequestId)) System.Web.HttpContext.Current.Items.Add(Database.RequestId, Guid.NewGuid().ToString()); - NewRelic.Api.Agent.NewRelic.AddCustomParameter(Database.RequestId, System.Web.HttpContext.Current.Items[Database.RequestId].ToString()); + //NewRelic.Api.Agent.NewRelic.AddCustomParameter(Database.RequestId, System.Web.HttpContext.Current.Items[Database.RequestId].ToString()); return; } } @@ -53,13 +55,16 @@ private bool IsGuid(string token) protected virtual string GetAppName(string token) { - string sql = string.Format("SELECT [Name] FROM [durados_app] WITH(NOLOCK) WHERE [{0}] = @token", HeaderToken.ToString()); - using (System.Data.SqlClient.SqlConnection cnn = new System.Data.SqlClient.SqlConnection(Maps.Instance.DuradosMap.Database.ConnectionString)) + string sql = Maps.MainAppSchema.GetAppNameByTokenSql(HeaderToken.ToString()); + using (IDbConnection cnn = Maps.MainAppSchema.GetNewConnection(Maps.Instance.ConnectionString))//Getc(Maps.Instance.DuradosMap.Database.ConnectionString)) { - using (System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand(sql, cnn)) + using (IDbCommand command = cnn.CreateCommand()) { - - command.Parameters.AddWithValue("token", token); + command.CommandText = sql; + var parameter = command.CreateParameter(); + parameter.ParameterName = "token"; + parameter.Value = token; + command.Parameters.Add(parameter); cnn.Open(); object scalar = command.ExecuteScalar(); if (scalar == null || scalar == DBNull.Value) diff --git a/BackAnd.Web.Api/Controllers/apiController.cs b/BackAnd.Web.Api/Controllers/apiController.cs index 88a49399..187ce100 100644 --- a/BackAnd.Web.Api/Controllers/apiController.cs +++ b/BackAnd.Web.Api/Controllers/apiController.cs @@ -19,11 +19,12 @@ using BackAnd.Web.Api.Controllers.Filters; using System.Threading.Tasks; using System.Collections; -using System.Data.SqlClient; +using System.Data.Common; using Durados.Web.Mvc.Infrastructure; using Durados.Web.Mvc.Farm; using System.Runtime.Caching; + /* HTTP Verb |Entire Collection (e.g. /customers) |Specific Item (e.g. /customers/{id}) ----------------------------------------------------------------------------------------------------------------------------------------------- @@ -584,16 +585,18 @@ protected void UpdateLogModelException(Exception exception) { if (logModelId.HasValue) { - using (System.Data.SqlClient.SqlConnection connection = new System.Data.SqlClient.SqlConnection(Maps.Instance.DuradosMap.connectionString)) + + using (IDbConnection connection = Maps.MainAppSchema.GetNewConnection(Maps.Instance.ConnectionString)) { connection.Open(); - string sql = "update [backand_model] set errorMessage = @errorMessage, errorTrace = @errorTrace where id=@id"; + string sql = Maps.MainAppSchema.GetUpdateLogModelExceptionSql(); - using (System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand(sql, connection)) + using (IDbCommand command = Maps.MainAppSchema.GetNewCommand(sql, connection)) { - command.Parameters.AddWithValue("errorMessage", exception.Message); - command.Parameters.AddWithValue("errorTrace", exception.StackTrace); - command.Parameters.AddWithValue("id", logModelId.Value); + GetDataParameter("errorMessage",exception.Message, command); + GetDataParameter("errorTrace", exception.StackTrace, command); + GetDataParameter("id", logModelId.Value, command); + command.ExecuteNonQuery(); } @@ -609,30 +612,39 @@ protected void UpdateLogModelException(Exception exception) } } + protected static void GetDataParameter(string name,object val, IDbCommand command) + { + var parameter = command.CreateParameter(); + parameter.ParameterName = name; + parameter.Value = val; + command.Parameters.Add(parameter); + } + protected int? logModelId = null; private void LogModel(string appName, string username, DateTime timestamp, string input, string output, string valid, string action) { - using (System.Data.SqlClient.SqlConnection connection = new System.Data.SqlClient.SqlConnection(Maps.Instance.DuradosMap.connectionString)) + ISqlMainSchema sqlMain = Maps.MainAppSchema; + using (IDbConnection connection = sqlMain.GetNewConnection(Maps.Instance.ConnectionString)) { connection.Open(); - string sql = "insert into [backand_model] ([appName], [username], [timestamp], [input], [output], [valid], [action]) values (@appName, @username, @timestamp, @input, @output, @valid, @action); SELECT IDENT_CURRENT(N'backand_model') AS ID"; + string sql = sqlMain.GetLogModelSql(); - using (System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand(sql, connection)) + using (IDbCommand command = sqlMain.GetNewCommand(sql, connection)) { try { - command.Parameters.AddWithValue("appName", appName); - command.Parameters.AddWithValue("username", username); - command.Parameters.AddWithValue("timestamp", timestamp); - command.Parameters.AddWithValue("input", input); - command.Parameters.AddWithValue("output", output); - command.Parameters.AddWithValue("valid", valid); - command.Parameters.AddWithValue("action", action); + GetDataParameter("appName", appName,command); + GetDataParameter("username", username, command); + GetDataParameter("timestamp", timestamp, command); + GetDataParameter("input", input, command); + GetDataParameter("output", output, command); + GetDataParameter("valid", valid, command); + GetDataParameter("action", action, command); object scalar = command.ExecuteScalar(); logModelId = Convert.ToInt32(scalar); } - catch (SqlException e) + catch (DbException e) { Maps.Instance.DuradosMap.Logger.Log("Model", "Validate", "LogModel", e, 1, command.CommandText + "; " + connection.ConnectionString); @@ -721,7 +733,7 @@ protected virtual ArrayList GetBackandToObject(string token) private static bool RefreshOldAdminFailure = false; protected virtual void RefreshOldAdmin(string appName) { - if (RefreshOldAdminFailure) + if (!Maps.ExistsOldAdmin || RefreshOldAdminFailure) return; string id = GetMasterGuid(); @@ -897,8 +909,9 @@ protected virtual string GetMasterGuid() { string currentUser = Maps.SuperDeveloper; System.Data.DataRow userRow = Maps.Instance.DuradosMap.Database.GetUserRow(currentUser); - string guid = userRow["Guid"].ToString(); - return SecurityHelper.GetTmpUserGuidFromGuid(guid); + string guid = (userRow == null) ? Maps.MasterOpsAuth : userRow["Guid"].ToString(); + return guid; + //return SecurityHelper.GetTmpUserGuidFromGuid(guid); } @@ -1096,6 +1109,7 @@ private void HandleSpecialDefaults(Durados.Web.Mvc.View view, Dictionary values) { HandleCurrentUserDefault(view, values, false); @@ -1113,7 +1127,7 @@ private void HandleCurrentUserDefault(Durados.Web.Mvc.View view, Dictionary values, bool import) { var fields = view.Fields.Values.Where(f => f.FieldType == FieldType.Parent && f.DefaultValue != null && f.DefaultValue.ToString().ToLower() == Durados.Web.Mvc.Database.UserPlaceHolder.ToLower()); @@ -1138,6 +1152,7 @@ private void HandleCurrentUserDefault(Durados.Web.Mvc.View view, Dictionary values) { @@ -1962,24 +1977,25 @@ protected virtual void AfterEditAfterCommit(EditEventArgs e) wfe.PerformActions(this, e.View, TriggerDataAction.AfterEdit, e.Values, e.PrimaryKey, e.PrevRow, Map.Database.ConnectionString, Convert.ToInt32(((Durados.Web.Mvc.Database)e.View.Database).GetUserID()), ((Durados.Web.Mvc.Database)e.View.Database).GetUserRole(), e.Command, e.SysCommand); wfe.Notifier.Notify((Durados.Web.Mvc.View)e.View, 1, GetUsername(), e.OldNewValues, e.PrimaryKey, e.PrevRow, this, e.Values, GetSiteWithoutQueryString(), GetMainSiteWithoutQueryString()); - - const string Active = "Active"; - if (e.View.Name == "Durados_Language") - { - bool prevActive = !e.PrevRow.IsNull(Active) && Convert.ToBoolean(e.PrevRow[Active]); - bool currActive = e.Values.ContainsKey(Active) && Convert.ToBoolean(e.Values[Active]); - - if (!prevActive && currActive) - { - string code = e.PrevRow["Code"].ToString(); - string scriptFile = Maps.GetDeploymentPath("Sql/Localization/" + code + "pack.sql"); + /* TODO: Main MySql deprectaed + const string Active = "Active"; + + if (e.View.Name == "Durados_Language") + { + bool prevActive = !e.PrevRow.IsNull(Active) && Convert.ToBoolean(e.PrevRow[Active]); + bool currActive = e.Values.ContainsKey(Active) && Convert.ToBoolean(e.Values[Active]); - SqlAccess sqlAcces = new SqlAccess(); - sqlAcces.RunScriptFile(scriptFile, Map.GetLocalizationDatabase().ConnectionString); - Map.Database.Localizer.SetCurrentUserLanguageCode(code); - } - } + if (!prevActive && currActive) + { + string code = e.PrevRow["Code"].ToString(); + string scriptFile = Maps.GetDeploymentPath("Sql/Localization/" + code + "pack.sql"); + SqlAccess sqlAcces = new SqlAccess(); + sqlAcces.RunScriptFile(scriptFile, Map.GetLocalizationDatabase().ConnectionString); + Map.Database.Localizer.SetCurrentUserLanguageCode(code); + } + } + */ if (e.View.Name == "durados_Cloud") { RefreshConfigCache(); @@ -2081,8 +2097,8 @@ protected virtual void AfterDeleteBeforeCommit(DeleteEventArgs e) { int userId = Maps.Instance.DuradosMap.Database.GetUserID(deletedUsername); string appId = Map.Id; - SqlAccess sqlAccess = new SqlAccess(); - sqlAccess.ExecuteNonQuery(Maps.Instance.DuradosMap.connectionString, string.Format("delete durados_UserApp where UserId = {0} and AppId = {1}", userId, appId)); + SqlAccess sqlAccess = Maps.MainAppSqlAccess; + sqlAccess.ExecuteNonQuery(Maps.Instance.DuradosMap.connectionString, Maps.MainAppSchema.GetDeleteUserSql( userId, appId)); } } catch { } diff --git a/BackAnd.Web.Api/Controllers/themeController.cs b/BackAnd.Web.Api/Controllers/themeController.cs deleted file mode 100644 index c60b90c8..00000000 --- a/BackAnd.Web.Api/Controllers/themeController.cs +++ /dev/null @@ -1,67 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Net.Http.Formatting; -using System.Net.Http.Headers; -using System.Threading.Tasks; -using System.Web.Http; - - -namespace BackAnd.Web.Api.Controllers -{ - - public class themeController : apiController - { - public HttpResponseMessage Get(string id = null) - { - try - { - if (id == null) - { - id = GetAppName(); - } - string path = Durados.Web.Mvc.Maps.Instance.GetAppThemePath(id); - //if (!path.StartsWith("/")) - // path = "/" + path; - string responseBody = string.Format(@" location.replace('{0}') ", path); - - HttpResponseMessage response = Request.CreateResponse(System.Net.HttpStatusCode.OK, responseBody, new TextPlainFormatter()); - response.Content.Headers.ContentType = new MediaTypeHeaderValue("application/javascript"); - response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment"); - response.Content.Headers.ContentDisposition.Name = "theme"; - response.Content.Headers.ContentDisposition.FileName = "theme.js"; - - return response; - } - catch (Exception exception) - { - throw new BackAndApiUnexpectedResponseException(exception, this); - } - } - - private string GetAppName() - { - try - { - return System.Web.HttpContext.Current.Request.UrlReferrer.Authority.Split('.')[0]; - } - catch - { - try - { - return Durados.Web.Mvc.Maps.GetCurrentAppName(); - } - catch - { - return null; - } - } - } - } - - -} diff --git a/BackAnd.Web.Api/Controllers/userController.cs b/BackAnd.Web.Api/Controllers/userController.cs index a7ec0c88..9680bcea 100644 --- a/BackAnd.Web.Api/Controllers/userController.cs +++ b/BackAnd.Web.Api/Controllers/userController.cs @@ -1303,26 +1303,28 @@ private void RegisterUserToMainApp(string email, string appName, string firstNam account.InviteAdminAfterSignUp(email); AccountService.SendRegistrationRequest(firstName, lastName, email, string.Empty, email, string.Empty, Maps.Instance.DuradosMap, DontSend); + /* TODO: Main MySQL depricated try { - AccountService.UpdateWebsiteUsers(email, Convert.ToInt32(Maps.Instance.GetMap(appName).Database.GetUserID())); + //AccountService.UpdateWebsiteUsers(email, Convert.ToInt32(Maps.Instance.GetMap(appName).Database.GetUserID())); } catch (Exception ex) { Maps.Instance.DuradosMap.Logger.Log("user", "SignUp", "SignUp", ex, 1, "failed to update websiteusercookie with userid"); } - + //Insert into website users try { - AccountService.InsertContactUsUsers(email, firstName + " " + lastName, null, string.Empty, 10, 100, null); //10=welcome email + //AccountService.InsertContactUsUsers(email, firstName + " " + lastName, null, string.Empty, 10, 100, null); //10=welcome email } catch (Exception ex) { Maps.Instance.DuradosMap.Logger.Log("user", "SignUp", "SignUp", ex, 1, "failed to update websiteuser in ContactUs"); } + * */ } @@ -1494,7 +1496,7 @@ private void SocialSignupInner2(SocialProfile profile, bool overridePrivate = fa } } - NewRelic.Api.Agent.NewRelic.AddCustomParameter(Durados.Database.RequestId, System.Web.HttpContext.Current.Items[Durados.Database.RequestId].ToString()); + //NewRelic.Api.Agent.NewRelic.AddCustomParameter(Durados.Database.RequestId, System.Web.HttpContext.Current.Items[Durados.Database.RequestId].ToString()); var canLoginWithProfile = GetCanLoginWithProfile(profile); if (profile.email == null) diff --git a/BackAnd.Web.Api/Controllers/wfController.cs b/BackAnd.Web.Api/Controllers/wfController.cs index fe2884a7..f90143ff 100644 --- a/BackAnd.Web.Api/Controllers/wfController.cs +++ b/BackAnd.Web.Api/Controllers/wfController.cs @@ -59,11 +59,11 @@ public string GetUrlAction(Durados.View view, string pk) return string.Empty; } - - public virtual string SaveInMessageBoard(Dictionary parameters, Durados.View view, Dictionary values, System.Data.DataRow prevRow, string pk, string siteWithoutQueryString, string urlAction, string subject, string message, int currentUserId, string currentUserRole, Dictionary recipients) - { - return SaveInMessageBoard(parameters, (View)view, values, prevRow, pk, siteWithoutQueryString, urlAction, subject, message, currentUserId, recipients); - } + //TODO : Main Mysql + //public virtual string SaveInMessageBoard(Dictionary parameters, Durados.View view, Dictionary values, System.Data.DataRow prevRow, string pk, string siteWithoutQueryString, string urlAction, string subject, string message, int currentUserId, string currentUserRole, Dictionary recipients) + //{ + // return SaveInMessageBoard(parameters, (View)view, values, prevRow, pk, siteWithoutQueryString, urlAction, subject, message, currentUserId, recipients); + //} public virtual void SaveMessageAction(View view, string pk, Durados.Web.Mvc.UI.Json.Field jsonField, Durados.Web.Mvc.Controllers.MessageBoardAction messageBoardAction) { diff --git a/BackAnd.Web.Api/Web - Copy.config b/BackAnd.Web.Api/Web - Copy.config new file mode 100644 index 00000000..cb5bf7c0 --- /dev/null +++ b/BackAnd.Web.Api/Web - Copy.config @@ -0,0 +1,417 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + >>>>>> Stashed changes--> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BackAnd.Web.Api/Web.config b/BackAnd.Web.Api/Web.config index 7b5f1f0f..75f62542 100644 --- a/BackAnd.Web.Api/Web.config +++ b/BackAnd.Web.Api/Web.config @@ -9,27 +9,22 @@
- + - + - - - - - + + - - - + + + @@ -42,243 +37,197 @@ - + - - - + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - - + + + + + - - + - - + + - - + + + - - + + - - - - - + + + - - + + - + - + - - - + + + - - + + - + - + + + + + - -=======--> - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - + + - - - - - - - + + + + + + + ->>>>>> Stashed changes--> + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + + + - - + + + + diff --git a/Durados.DataAccess/ConfigAccess.cs b/Durados.DataAccess/ConfigAccess.cs index a6947d3f..8520cec4 100644 --- a/Durados.DataAccess/ConfigAccess.cs +++ b/Durados.DataAccess/ConfigAccess.cs @@ -1014,9 +1014,10 @@ public static bool ContainsCategoryName(string name, string fileName) return null; } - public static int AddCategory(string fileName) + public static int? AddCategory(string fileName) { - return AddCategory(fileName, "General", 0); + // return AddCategory(fileName, "General", 0); + return null; } public static int AddCategory(string fileName, string name, int ordinal) diff --git a/Durados.DataAccess/Durados.DataAccess.csproj b/Durados.DataAccess/Durados.DataAccess.csproj index 688057c2..df2a75c5 100644 --- a/Durados.DataAccess/Durados.DataAccess.csproj +++ b/Durados.DataAccess/Durados.DataAccess.csproj @@ -123,6 +123,7 @@ MapDataSet.xsd + Component True @@ -141,6 +142,7 @@ + diff --git a/Durados.DataAccess/IDataTableAccess.cs b/Durados.DataAccess/IDataTableAccess.cs index e9fa1b0a..eccc65c0 100644 --- a/Durados.DataAccess/IDataTableAccess.cs +++ b/Durados.DataAccess/IDataTableAccess.cs @@ -98,5 +98,7 @@ public interface IDataTableAccess string GetFirstPK(View view); void LoadForeignKeys(string connectionString, SqlProduct sqlProduct, Dictionary> cache); + + SqlProduct GetSqlProduct(); } } diff --git a/Durados.DataAccess/ISqlMainSchema.cs b/Durados.DataAccess/ISqlMainSchema.cs new file mode 100644 index 00000000..1f3301de --- /dev/null +++ b/Durados.DataAccess/ISqlMainSchema.cs @@ -0,0 +1,179 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; + +namespace Durados.DataAccess +{ + public interface ISqlMainSchema + { + IDbConnection GetNewConnection(); + + IDbConnection GetNewConnection(string connectionString); + + IDbCommand GetNewCommand(); + IDbCommand GetNewCommand(string sql, IDbConnection connection); + string GetEmailBySocialIdSql(); + + string GetEmailBySocialIdSql2(); + + string GetSocialIdlByEmail(); + + string GetSocialIdlByEmail2(); + + string InsertNewUserSql(string tableName, string userTable); + + string GetInsertUserAppSql(); + + string GetUserIdFromUsernameSql(); + + string GetUserTempTokenSql(); + + string GetUserNameByGuidSql(); + + + string GetDeleteUserSql(); + + string GetUserBelongToMoreThanOneAppSql(); + + string GetHasAppsSql(); + + string GetInviteAdminBeforeSignUpSql(string username, string appId); + + string GetInviteAdminAfterSignupSql(string username); + + string GetInviteAdminAfterSignupSql(int userId, string appId, string role); + + string GetDeleteInviteUser(string username); + + string GetAppsPermanentFilter(); + + string GetWakeupCallToAppSql(); + + string GetAppsCountsql(); + + string GetSqlProductSql(); + + string GetAppsExistsSql(string appName); + + string GetAppsExistsForUserSql(string appName, int? userId); + string GetPaymentStatusSql(string appName); + string GetCurrentAppIdSql(string server, string catalog, string username, string userId); + string GetPlanForAppSql(int appId); + + string GetHasOtherConnectiosSql(string appDatabase); + string GetDropDatabaseSql(string name); + + string GetAppNamesWithPrefixSql(string appNamePrefix); + + string GetAppNameByGuidFromDb(string guid); + + string GetFindAndUpdateAppInMainSql(int? templateId); + + string GetUpdateLogModelExceptionSql(); + + string GetSaveChangesIndicationFromDb2(string Id); + + string GetSetSaveChangesIndicationFromDbSql(int config, string Id); + + string GetLogModelSql(); + + string GetAppLimitSql(string Id);//"select Name, Limit from durados_AppLimits with(nolock) where AppId = " + Id + + string GetDeleteUserSql(int userId, string appId); //string.Format("delete durados_UserApp where UserId = {0} and AppId = {1}" + + + + string GetUpdateAppSystemConnectionSql(int? sysConnId, string p); + + string GetUpdateDBStatusSql(int p, int appId); + + string GetAppIdSql(int templateId); + + string GetDeleteAppById(int id); + + string GetUpdateAppConnectionsSql(int? appConnId, int? sysConnId, string p); + + string GetExecCreateDB(string sysCatalog); + + string GetUpdateAppProduct(); + + string GetDbStatusSql(string appId); + + string GetAppNameByIdSqlSql(int appId); + + string InsertNewConnectionToExternalServerTable(); + + string GetValidateSelectFunctionExistsSql(); + + + string GetCreatorSql(int appId); + + string GetCreatorUsername(int appId); + + string GetNewDatabaseNameSql(int p, int templateAppId); + + string GetAppSql(); + + string GetUserGuidSql(); + + string GetAppRowByNameSql(string appName); + + string GetAppNameByTokenSql(string p); + + string GetUpdateAppToBeDeleted(); + + string GetValidateUserSql(int appID, int userId); + + string GetLoadUserDataByGuidSql(); + + string GetLoadUserDataByUsernameSql(string userFields, string userViewName, string userFieldName); + + string GetUserFieldsForSelectSql(); + + string GetUsernameByUsernameSql(); + + string GetUsernameByUsernameInUseSql(); + + + string InsertIntoPluginRegisterUsersSql(); + + string InsertIntoUserSql(); + + string GetExternalConnectionIdsSql(); + + string GetDeleteAppByName(string id); + + string GetAppGuidByName(); + + + string GetAppGuidById(); + string GetUserAappIdSql(); + + string GetAppsNameSql(); + + string GetInsertLimitsSql(Limits limits, int limit, int? id); + + string GetUpdateAppConnectionAndProductSql(string newConnectionId, string image, string pk); + + string GetInsertIntoUsersSql(string viewName); + string GetInsertIntoUsersSql2(string viewName); + + string GetUsersApps(int userId); + + string GetConnectionStringAllowVeriables(); + + string GetUpdateAppMasterGuid(string appName, string columnName); + + string GetReportId(); + + string InsertNewStatsSql(); + + string UpdateMeasurmentType(string measureType); + + string GetUserSecuritySql(); + + string GetUpdateFailedPasswordAttemptCountSql(); + } +} diff --git a/Durados.DataAccess/MySqlAccess.cs b/Durados.DataAccess/MySqlAccess.cs index 5340052f..c2be2698 100644 --- a/Durados.DataAccess/MySqlAccess.cs +++ b/Durados.DataAccess/MySqlAccess.cs @@ -82,7 +82,7 @@ protected override System.Data.IDataParameter GetNewParameter(View view, string // { // value = (Convert.ToBoolean(value) ? 1 : 0).ToString(); // } - + // return Convert.ChangeType(value, dataColumn.DataType); //} @@ -92,7 +92,7 @@ protected override string GetPointFieldStatement(Field field) return new MySqlTextBuilder().GetPointFieldStatement(field.View.DataTable.TableName, field.GetColumnsNames()[0]); //return string.Format("AsText(`{0}`.`{1}`) as `{1}`", field.View.DataTable.TableName, field.GetColumnsNames()[0]); } - + protected override System.Data.IDataAdapter GetNewAdapter(System.Data.IDbCommand command) { if (command is MySqlCommand) @@ -235,7 +235,7 @@ public override bool IsLoginFailureException(Exception exception) } } - + public override void DeleteDatabase(string connectionString, string catalog) { @@ -287,11 +287,16 @@ public void CopyDatabase(string adminConnectionString, string sourceDatabaseName { Console.WriteLine(e.ToString()); throw new DuradosException("Failed to copy MySQL database " + sourceDatabaseName + " to " + targetDatabaseName); - } + } } - } + public override SqlProduct GetSqlProduct() + { + return SqlProduct.MySql; + + } + } public class MySqlTextBuilder : SqlTextBuilder { public override string FromDual() @@ -316,7 +321,7 @@ public override string EscapeDbObjectEnd public override string GetRowNumber(string orderByColumn) { - return string.Empty; + return string.Empty; } public override string GetRowNumber(string orderByTable, string orderByColumn, string sortOrder) @@ -402,7 +407,30 @@ public override string InsertWithoutColumns() public override string GetPointFieldStatement(string tableName, string fieldName) { return string.Format("CONCAT(X(`{0}`.`{1}`), \", \", Y(`{0}`.`{1}`)) as `{1}`", tableName, fieldName); - + + } + + public override string GetDecryptColumnForSelectStatement(string encryptedName, string databaseNames) + { + + return string.Format(" `{0}` AS {1}, ", encryptedName, databaseNames); + } + public override string GetDecryptColumnStatement(string encryptedName) + { + return string.Format(" `{0)` ", encryptedName); + } + public override string GetCloseCertificateStatement() + { + return string.Empty; + } + public override string GetOpenCertificateStatement() + { + return string.Empty; + } + + public override string GetDbEncryptedColumnParameterNameSql(string symetricKeyName, string columnName) + { + return DbParameterPrefix + columnName; } } @@ -489,7 +517,7 @@ public override string CountTablesSelectStatement() public override string GetTableNamesSelectStatementWithFilter() { - return "select table_name as Name, table_schema as `Schema`, table_type as EntityType from information_schema.tables where table_schema = DATABASE() and table_type = 'BASE TABLE' AND table_name like N'%[filter]%'" ; + return "select table_name as Name, table_schema as `Schema`, table_type as EntityType from information_schema.tables where table_schema = DATABASE() and table_type = 'BASE TABLE' AND table_name like N'%[filter]%'"; } public override System.Data.IDbCommand GetCommand() { @@ -544,7 +572,7 @@ protected override bool IsValidSchema(string schema, string defaultSchema) public override string IsTableOrViewExistsSelectStatement(string tableName) { return "select table_name as Name, table_schema as `Schema`, table_type as EntityType from information_schema.tables where table_schema = DATABASE() and table_name = '" + tableName + "'"; - + } public override string IsViewExistsSelectStatement(string viewName) @@ -620,7 +648,7 @@ protected override string GetCreateColumnScript(DataColumn column) string type = GetColumnTypeScript(column); string nullable = column.AutoIncrement ? "NOT NULL" : "NULL"; string identity = column.AutoIncrement ? "AUTO_INCREMENT" : string.Empty; - + return string.Format(script, name, type, identity, nullable); } @@ -648,7 +676,7 @@ protected override string GetCreateFkConstraintStatement(string fkTableName, str name = name.Substring(0, 20) + "_" + Guid.NewGuid().ToString(); } return "ALTER TABLE " + sqlTextBuilder.EscapeDbObject(fkTableName) + " ADD CONSTRAINT " + sqlTextBuilder.EscapeDbObject(name) + " FOREIGN KEY (" + sqlTextBuilder.EscapeDbObject(fkColumnName) + ") REFERENCES " + sqlTextBuilder.EscapeDbObject(pkTableName) + " (" + sqlTextBuilder.EscapeDbObject(pkColumnName) + ") ON DELETE NO ACTION ON UPDATE NO ACTION, ADD INDEX " + sqlTextBuilder.EscapeDbObject(name + "_idx") + " (" + sqlTextBuilder.EscapeDbObject(fkColumnName) + " ASC)"; - + } protected void ChangeTableEngine(string table, string engine, IDbCommand command) @@ -687,7 +715,7 @@ protected string GetTableEngine(string table, IDbCommand command) } } - protected HashSet FkEngines = new HashSet() {"innodb" }; + protected HashSet FkEngines = new HashSet() { "innodb" }; public override void CreateFkConstraint(string fkTableName, string fkColumnName, string pkTableName, string pkColumnName, IDbCommand command) { return; @@ -727,8 +755,8 @@ public override void DropFkConstraint(string tableName, string referenceTableNam return; string fkConstraintName = scalar.ToString(); - - sql = "ALTER TABLE " + sqlTextBuilder.EscapeDbObject(tableName) + " DROP FOREIGN KEY " + sqlTextBuilder.EscapeDbObject(fkConstraintName); + + sql = "ALTER TABLE " + sqlTextBuilder.EscapeDbObject(tableName) + " DROP FOREIGN KEY " + sqlTextBuilder.EscapeDbObject(fkConstraintName); command.CommandText = sql; @@ -743,7 +771,7 @@ public override void DropFkConstraint(string tableName, string referenceTableNam public override string GetUpdateNewNotNestedParentStatement(string tableName, string columnName, string newTableName, string fieldName, string relatedViewPkName, string relatedViewDisplayName) { return string.Format("SET SQL_SAFE_UPDATES=0;" + "update " + sqlTextBuilder.EscapeDbObject("{0}") + " join " + sqlTextBuilder.EscapeDbObject("{2}") + " on " + sqlTextBuilder.EscapeDbObject("{0}") + sqlTextBuilder.DbTableColumnSeperator + sqlTextBuilder.EscapeDbObject("{3}") + " = " + sqlTextBuilder.EscapeDbObject("{2}") + sqlTextBuilder.DbTableColumnSeperator + sqlTextBuilder.EscapeDbObject("{5}") + " set " + sqlTextBuilder.EscapeDbObject("{0}") + sqlTextBuilder.DbTableColumnSeperator + sqlTextBuilder.EscapeDbObject("{1}") + " = " + sqlTextBuilder.EscapeDbObject("{2}") + sqlTextBuilder.DbTableColumnSeperator + sqlTextBuilder.EscapeDbObject("{4}"), tableName, columnName, newTableName, fieldName, relatedViewPkName, relatedViewDisplayName); - + } protected override SqlSchema GetNewSqlSchema() @@ -761,7 +789,7 @@ public override void StopIdentityInsert(string tableName, IDbCommand command) } public override void ContinueIdentityInsert(string tableName, IDbCommand command) - { + { } public override string GetFormula(string calculatedField, string tableName) @@ -796,7 +824,7 @@ public override IDataParameter GetNewParameter(string name, object value) { return new MySqlParameter(name, value); } - + } public class MySqlCopyPaste : CopyPaste @@ -875,4 +903,483 @@ protected override string GetHistoryOldValueSelect() "ORDER BY UpdateDate DESC"; } } + + + public class MySqlMainSchema : SqlMainSchema + { + public override IDbConnection GetNewConnection() + { + return new MySqlConnection(); + } + public override IDbConnection GetNewConnection(string connectionString) + { + return new MySqlConnection(connectionString); + } + + public override IDbCommand GetNewCommand() + { + return new MySqlCommand(); + } + public override IDbCommand GetNewCommand(string sql, IDbConnection connection) + { + return new MySqlCommand(sql, (MySqlConnection)connection); + } + public override string GetEmailBySocialIdSql() + { + return "SELECT UserId FROM durados_UserSocial WHERE Provider = @Provider AND SocialId = @SocialId AND AppId = @AppId"; + } + + public override string GetEmailBySocialIdSql2() + { + return "SELECT UserId FROM durados_UserSocial WHERE Provider = @Provider AND SocialId = @SocialId AND AppId is null"; + } + + public override string GetSocialIdlByEmail() + { + return "SELECT SocialId FROM durados_UserSocial WHERE Provider = @Provider AND UserId = @UserId AND AppId = @AppId"; + } + + public override string GetSocialIdlByEmail2() + { + return "SELECT SocialId FROM durados_UserSocial WHERE Provider = @Provider AND UserId = @UserId AND AppId is null"; + } + + public override string InsertNewUserSql(string tableName, string userTable) + { + return "INSERT INTO `" + userTable + "` (`Username`,`FirstName`,`LastName`,`Email`,`Role`,`Guid`) SELECT * FROM (SELECT @Username as UserName,@FirstName AS FirstName,@LastName AS LastName,@Email AS Email,@Role AS Role,@Guid AS Guid) AS tmp WHERE NOT EXISTS (SELECT `Username` FROM `" + tableName + "` WHERE `Username` = @Username) "; + + + } + + public override string GetInsertUserAppSql() + { + return "INSERT INTO `durados_UserApp` (`UserId`,`AppId`,`Role`) VALUES (@UserId,@AppId,@Role)"; + } + + public override string GetUserIdFromUsernameSql() + { + return "SELECT `durados_User`.`Id` FROM durados_User WHERE `durados_User`.`Username`=@username LIMIT 1"; + } + + public override string GetUserTempTokenSql() + { + return "SELECT Id FROM `durados_ValidGuid` WHERE UserGuid=@UserGuid AND Used=0 LIMIT 1"; + } + + public override string GetUserNameByGuidSql() + { + return "SELECT Username FROM durados_User WHERE Guid=@guid LIMIT 1"; + } + + public override string GetDeleteUserSql() + { + return "DELETE FROM durados_User WHERE `Username`=@username"; + } + + public override string GetUserBelongToMoreThanOneAppSql() + { + return "SELECT id FROM durados_UserApp WHERE `userid`=@userid AND appid<>@appid"; + } + + public override string GetHasAppsSql() + { + return string.Format("SELECT id FROM durados_App WHERE Creator=@id LIMIT 1"); + } + + public override string GetInviteAdminBeforeSignUpSql(string username, string appId) + { + return string.Format("INSERT INTO durados_Invite (Username, appId) values ('{0}', {1})", username, appId); + } + + public override string GetInviteAdminAfterSignupSql(string username) + { + return string.Format("SELECT appId FROM durados_Invite WHERE Username = '{0}'", username); + } + + public override string GetInviteAdminAfterSignupSql(int userId, string appId, string role) + { + return string.Format("INSERT INTO durados_UserApp (UserId, AppId, Role) values ({0},{1},'{2}')", userId, appId, role); + } + + public override string GetDeleteInviteUser(string username) + { + return string.Format("DELETE FROM durados_Invite WHERE Username = '{0}'", username); + } + + public override string GetAppsPermanentFilter() + { + return "(durados_App.toDelete =0 AND (durados_App.Creator = [m_User] or durados_App.id in (SELECT durados_UserApp.AppId FROM durados_UserApp WHERE durados_UserApp.UserId = [m_User] and (durados_UserApp.Role = 'Admin' or durados_UserApp.Role = 'Developer'))))"; + } + public override string GetWakeupCallToAppSql() + { + return "SELECT Id,Url FROM durados_App WHERE `Creator` IS NULL"; + } + + public override string GetAppsCountsql() + { + return "SELECT COUNT(*) FROM durados_App a INNER JOIN durados_PlugInInstance p ON a.id = p.Appid WHERE Deleted =0 AND p.selected=1"; + } + + public override string GetSqlProductSql() + { + return "SELECT durados_SqlConnection.SqlProductId FROM durados_App INNER JOIN durados_SqlConnection ON durados_App.SqlConnectionId = durados_SqlConnection.Id WHERE (durados_App.Name = @AppName)"; + } + + + public override string GetAppsExistsSql(string appName) + { + return "SELECT Id FROM durados_App WHERE Name = N'" + appName + "'"; + } + + public override string GetAppsExistsForUserSql(string appName, int? userId) + { + + return "SELECT durados_App.Id,Name FROM durados_App LEFT JOIN durados_UserApp ON durados_UserApp.AppId = durados_App.Id WHERE (durados_App.Name = N'" + appName + "' and (durados_UserApp.UserId=" + userId + " or durados_App.Creator=" + userId + ") ) GROUP BY(durados_App.Id)"; + } + + + + public override string GetPaymentStatusSql(string appName) + { + return "SELECT PaymentStatus FROM durados_App WHERE Name = N'" + appName + "'"; + } + + public override string GetCurrentAppIdSql(string server, string catalog, string username, string userId) + { + return string.Format("SELECT Id FROM durados_SqlConnection WHERE ServerName=N'{0}' AND Catalog=N'{1}' AND Username=N'{2}' AND DuradosUser={3}", server, catalog, username, userId); + } + + + public override string GetPlanForAppSql(int appId) + { + return "SELECT PlanId FROM durados_AppPlan WHERE AppId=" + appId + " ORDER BY PurchaseDate DESC LIMIT 1"; + } + + + public override string GetFindAndUpdateAppInMainSql(int? templateId) + { + return + "START TRANSACTION; " + + + "SELECT @app_id :=`Id` FROM durados_App WHERE TemplateId " + (templateId.HasValue ? " = " + templateId.Value : " is null ").ToString() + " AND Creator = @poolCreator and DatabaseStatus = 1 AND ToDelete = 0 ORDER BY id ASC LIMIT 1 FOR UPDATE; " + + "DELETE FROM durados_App WHERE `Name` = @Name; " + + "UPDATE durados_App " + + "SET Creator = @creator, " + + "`CreatedDate` = @CreatedDate, " + + "`Name` = @Name, " + + "`Title` = @Title " + + "WHERE Id = @app_id ; " + + "SELECT @app_id ; " + + "COMMIT ;"; + } + + public override string GetAppNameByGuidFromDb(string guid) + { + return "SELECT `name` FROM durados_App WHERE `Guid` = '" + guid + "'"; + } + public override string GetAppNamesWithPrefixSql(string appNamePrefix) + { + return "SELECT name FROM durados_App WHERE name LIKE '" + appNamePrefix + "%'"; + } + + public override string GetDropDatabaseSql(string name) + { + return "SET FOREIGN_KEY_CHECKS=0;ALTER DATABASE " + name + " SET SINGLE_USER WITH ROLLBACK IMMEDIATE; DROP DATABASE `" + name + "`; SET FOREIGN_KEY_CHECKS=0;"; + } + + public override string GetUpdateAppToBeDeleted() + { + return "UPDATE durados_App SET `ToDelete`=1,`deleteddate` =NOW() WHERE Id=@Id"; + } + + + public override string GetHasOtherConnectiosSql(string appDatabase) + { + return "SELECT COUNT(*) FROM durados_SqlConnection WHERE `Catalog` = N'" + appDatabase + "'"; + } + + + public override string GetUpdateLogModelExceptionSql() + { + return "UPDATE `backand_model` SET errorMessage = @errorMessage, errorTrace = @errorTrace WHERE id=@id"; + } + + public override string GetSaveChangesIndicationFromDb2(string Id) + { + return "SELECT ConfigChangesIndication FROM durados_App WHERE id = " + Id; + } + + public override string GetSetSaveChangesIndicationFromDbSql(int config, string Id) + { + return "UPDATE durados_App SET ConfigChangesIndication = " + config + " WHERE id = " + Id; + } + + + public override string GetLogModelSql() + { + return "INSERT INTO `backand_model` (`appName`, `username`, `timestamp`, `input`, `output`, `valid`, `action`) values (@appName, @username, @timestamp, @input, @output, @valid, @action); SELECT LAST_INSERT_ID() AS ID;"; + } + + public override string GetAppLimitSql(string Id) + { + return "SELECT `Name`, `Limit` FROM `durados_AppLimits` WHERE AppId =" + Id; + } + + public override string GetDeleteUserSql(int userId, string appId) + { + return string.Format("DELETE FROM durados_UserApp WHERE UserId = {0} AND AppId = {1}", userId, appId); + } + + + //public override string GetUpdateAppSystemConnectionSql(int? sysConnId, string primaryKey) + //{ + // return "UPDATE durados_App SET SystemSqlConnectionId = " + sysConnId + " WHERE id = " + primaryKey + ";"; + + //} + + //public override string GetUpdateDBStatusSql(int onBoardingStatus, int appId) + //{ + // return "UPDATE durados_App SET DatabaseStatus = " + onBoardingStatus + " WHERE id = " + appId + ";"; + //} + + + public override string GetAppIdSql(int templateId) + { + return "SELECT AppId FROM durados_Template WHERE id = " + templateId; + } + + public override string GetDeleteAppById(int id) + { + return "DELETE FROM durados_App WHERE Id = " + id ; + } + + //public override string GetUpdateAppConnectionsSql(int? appConnId, int? sysConnId, string primaryKey) + //{ + // return "UPDATE durados_App SET SqlConnectionId = " + appConnId + ", SystemSqlConnectionId = " + sysConnId + " WHERE id = " + primaryKey; + + //} + + public override string GetExecCreateDB(string sysCatalog) + { + return string.Format("PREPARE stmt1 FROM 'CREATE DATABASE {0}';EXECUTE stmt1;", sysCatalog); + } + + //public override string GetUpdateAppProduct() + //{ + // return "UPDATE durados_App SET productType = @productType WHERE Name = @name"; + //} + + + public override string GetDbStatusSql(string appId) + { + return "SELECT DatabaseStatus FROM durados_App WHERE id = " + appId; ; + } + + + public override string GetAppNameByIdSqlSql(int appId) + { + return "SELECT Name FROM durados_App WHERE id = " + appId; + + } + public override string InsertNewConnectionToExternalServerTable() + { + return "INSERT INTO durados_ExternaInstance(InstanceName ,DbName ,IsActive,Endpoint,SqlConnectionId) VALUES(@serverName,@catalog,@IsActive,@serverName,@SqlConnectionId); SELECT LAST_INSERT_ID() AS Id;"; + + } + public override string GetValidateSelectFunctionExistsSql() + { + return @"DROP function IF EXISTS `f_report_connection_type`; + DELIMITER $$ + USE `backand_dev`$$ + CREATE FUNCTION `f_report_connection_type` (_id int) + RETURNS INTEGER + BEGIN + DECLARE _ResultVar INT; + SELECT CASE + WHEN ServerName IN(SELECT ServerName + FROM `durados_ExternaInstance` INNER JOIN durados_SqlConnection ON durados_SqlConnection.Id = durados_ExternaInstance.SqlConnectionId) + THEN 2 + ELSE 1 END INTO _ResultVar + FROM durados_SqlConnection AS c + WHERE id=_id; + RETURN _ResultVar; + END$$ + + DELIMITER ; + "; + } + + + public override string GetCreatorSql(int appId) + { + return "SELECT `Creator` FROM `durados_App` WHERE `durados_App`.`Id` = " + appId; + } + + public override string GetCreatorUsername(int appId) + { + return "SELECT `durados_User`.`Username` FROM `durados_App` INNER JOIN `durados_User` ON `durados_App`.`Creator` = `durados_User`.`ID` WHERE `durados_App`.`Id` = " + appId; + } + + public override string GetNewDatabaseNameSql(int plugInType, int templateAppId) + { + return "SELECT DatabaseName, DbCount FROM durados_SampleApp WHERE PlugInId = " + plugInType + " AND AppId = " + templateAppId; + } + + public override string GetAppSql() + { + return @"SELECT a.Id, a.Name, f_report_connection_type(a.SqlConnectionId) AS AppType, + a.Creator,cnn.ServerName, cnn.catalog ,syscnn.ServerName sysServerName,syscnn.catalog sysCatalog + FROM durados_App AS a INNER JOIN durados_SqlConnection AS cnn ON a.SqlConnectionId = cnn.Id INNER JOIN durados_SqlConnection AS syscnn ON a.SystemSqlConnectionId = syscnn.Id + WHERE ToDelete<>1"; ; + } + + public override string GetUserGuidSql() + { + return "SELECT `Guid` FROM `durados_User` WHERE `durados_User`.`Username`=@username"; + } + + + public override string GetAppRowByNameSql(string appName) + { + return string.Format("SELECT * FROM `durados_App` WHERE `Name` = '{0}'", appName); + } + + public override string GetAppNameByTokenSql(string HeaderToken) + { + return string.Format("SELECT `Name` FROM `durados_App` WHERE `{0}` = @token", HeaderToken); + } + + + + public override string GetValidateUserSql(int appID, int userId) + { + return string.Format("SELECT CASE WHEN EXISTS(SELECT 1 FROM durados_App WHERE durados_App.`ToDelete`=0 AND Id = {0} AND Creator = {1}) OR EXISTS(SELECT 1 FROM durados_UserApp WHERE AppId = {0} AND UserId = {1}) THEN 'TRUE' ELSE 'FALSE' END;", appID, userId); + } + + public override string GetLoadUserDataByGuidSql() + { + return string.Format("SELECT Username FROM durados_User WHERE Guid=@guid LIMIT 1;"); + } + + public override string GetLoadUserDataByUsernameSql(string userFields, string userViewName, string userFieldName) + { + return string.Format("SELECT {0} FROM {1} WHERE {2}=@username LIMIT 1;", userFields, userViewName, userFieldName); + } + + public override string GetUserFieldsForSelectSql() + { + return "`{0}`,`{1}`,`{2}`,`{3}`,`{4}`"; + + } + + public override string GetUsernameByUsernameSql() + { + return "SELECT 1 `Username` FROM `durados_User` WHERE `Username`=@Username"; + } + + public override string GetUsernameByUsernameInUseSql() + { + return "SELECT 1 `Username` FROM `User` WHERE `Username`=@Username"; + } + + public override string InsertIntoPluginRegisterUsersSql() + { + return "INSERT INTO durados_PlugInRegisteredUser (PlugInUserId ,PlugInId, RegisteredUserId, SelectionDate) VALUES (@PlugInUserId ,@PlugInId, @RegisteredUserId, @SelectionDate)"; + } + + public override string InsertIntoUserSql() + { + return "INSERT INTO `User` (`Username`,`FirstName`,`LastName`,`Email`,`Password`,`Role`,`NewUser`,`Comments`) VALUES (@Username,@FirstName,@LastName,@Email,@Password,@Role,@NewUser,@Comments)"; + } + + public override string GetExternalConnectionIdsSql() + { + return "SELECT SqlConnectionId FROM durados_ExternaInstance INNER JOIN durados_SqlConnection ON durados_SqlConnection.Id = durados_ExternaInstance.SqlConnectionId"; + } + + public override string GetDeleteAppByName(string id) + { + return "DELETE FROM `durados_App` WHERE `Name` = '" + id + "'"; + } + + public override string GetAppGuidByName() + { + return "SELECT `Guid` FROM `durados_App` WHERE `Name` =@appName"; + } + public override string GetAppGuidById() + { + return "SELECT `Guid` FROM `durados_App` WHERE `Id` =@Id"; + } + public override string GetUserAappIdSql() + { + return "SELECT `Id` FROM `durados_UserApp` WHERE `UserId`=@UserId AND `AppId`=@AppId LIMIT 1"; + } + + public override string GetAppsNameSql() + { + return "SELECT durados_App.Name FROM durados_App INNER JOIN durados_SqlConnection ON durados_App.SqlConnectionId = durados_SqlConnection.Id WHERE (durados_SqlConnection.Id = 1)"; + } + + public override string GetInsertLimitsSql(Limits limits, int limit, int? id) + { + return string.Format(@" + SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; + START TRANSACTION; + INSERT INTO durados_AppLimits (`Name`, `Limit`, `AppId`) values ('{0}',{1},{2}) + ON DUPLICATE KEY UPDATE `Limit` = {1}; + COMMIT ;",limits.ToString(),limit,id.Value); + + } + + public override string GetInsertIntoUsersSql(string viewName) + { + return "INSERT INTO `" + viewName + "` (`Username`,`FirstName`,`LastName`,`Email`,`Role`,`Guid`) VALUES (@Username,@FirstName,@LastName,@Email,@Role,@Guid)"; + + } + public override string GetInsertIntoUsersSql2(string viewName) + { + return "INSERT INTO `" + viewName + "` (`Username`,`FirstName`,`LastName`,`Email`,`Role`,`Guid`,`IsApproved`) VALUES (@Username,@FirstName,@LastName,@Email,@Role,@Guid,@IsApproved)"; + + } + + + public override string GetUsersApps(int userId) + { + return "SELECT * FROM durados_App WHERE durados_App.ToDelete=0 AND durados_App.Creator = " + userId + " OR durados_App.Id IN (SELECT durados_UserApp.AppId FROM durados_UserApp WHERE durados_UserApp.UserId = " + userId + ") "; + } + public override string GetConnectionStringAllowVeriables() + { + return "Allow User Variables=True"; + } + + public override string GetUpdateAppMasterGuid(string appName, string columnName) + { + return string.Format("UPDATE durados_App SET `{1}` = @newGuid WHERE `Name` = '{0}'", appName, columnName); ; + } + + public override string GetReportId() + { + return "SELECT Id FROM modubiz_LogStats2 WHERE SqlConId = @SqlConId and LogDate = @LogDate"; + } + public override string InsertNewStatsSql() + { + return "INSERT INTO modubiz_LogStats2 (SqlConId, LogDate) VALUES (@SqlConId, @LogDate);SELECT LAST_INSERT_ID() AS ID;"; + } + + + public override string GetUserSecuritySql() + { + return "SELECT Password, PasswordFormat, PasswordKey FROM `my_aspnet_membership` WHERE UserId = @userId"; + } + public override string GetUpdateFailedPasswordAttemptCountSql() + { + return @"UPDATE my_aspnet_membership + SET FailedPasswordAttemptCount = @count WHERE userId=@userId"; + + } + + + } + + } diff --git a/Durados.DataAccess/SqlAccess.cs b/Durados.DataAccess/SqlAccess.cs index c9e571f7..4f770e39 100644 --- a/Durados.DataAccess/SqlAccess.cs +++ b/Durados.DataAccess/SqlAccess.cs @@ -7,6 +7,7 @@ using System.Text; using Durados; +using Durados.DataAccess; namespace Durados.DataAccess { @@ -47,6 +48,8 @@ public static IDbConnection GetNewConnection(SqlProduct sqlProduct, string conne return new SqlConnection(connectionString); } + + static bool connection_ValidateRemoteCertificateCallback(System.Security.Cryptography.X509Certificates.X509Certificate cert, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors errors) { return true; @@ -1071,7 +1074,7 @@ public virtual DataTable FillDataTable(View view, int page, int pageSize, Filter } if (afterSelectCallback != null) - afterSelectCallback(this, new SelectEventArgs(view, filter)); + afterSelectCallback(this, new SelectEventArgs(view, filter, table)); // Performance Diagnostics if (view.Database.DiagnosticsReportInProgress) @@ -2919,7 +2922,7 @@ private string GetSelectStatement(Durados.View view, int page, int pageSize, Fil ColumnField columnField = (ColumnField)view.Fields[sortColumn.TrimStart(sqlTextBuilder.EscapeDbObjectStart.ToCharArray()).TrimEnd(sqlTextBuilder.EscapeDbObjectEnd.ToCharArray())]; if (columnField.Encrypted) { - sortColumn = " CONVERT(NVARCHAR(250), DECRYPTBYKEY(" + columnField.EncryptedName + ")) "; + sortColumn = sqlTextBuilder.GetDecryptColumnStatement(columnField.EncryptedName);// " CONVERT(NVARCHAR(250), DECRYPTBYKEY(" + columnField.EncryptedName + ")) "; } } return string.Format(selectStatement, new object[2] { view.DataTable.TableName, string.IsNullOrEmpty(sortColumn) ? GetPrimaryKeyColumnsDelimited(view) : sortColumn + " " + direction.ToString() }); @@ -2961,7 +2964,7 @@ private string GetSortParentSelectStatement(Durados.View view, int page, int pag ColumnField columnField = (ColumnField)view.Fields[sortColumn.TrimStart(sqlTextBuilder.EscapeDbObjectStart.ToCharArray()).TrimEnd(sqlTextBuilder.EscapeDbObjectEnd.ToCharArray())]; if (columnField.Encrypted) { - sortColumn = " CONVERT(NVARCHAR(250), DECRYPTBYKEY(" + columnField.EncryptedName + ")) "; + sortColumn = sqlTextBuilder.GetDecryptColumnStatement(columnField.EncryptedName);// " CONVERT(NVARCHAR(250), DECRYPTBYKEY(" + columnField.EncryptedName + ")) "; } } return string.Format(selectStatement, new object[7] { view.DataTable.TableName, sortColumn, page, pageSize, parentTable, join, direction.ToString() }); @@ -2973,8 +2976,9 @@ private string GetOpenCertificatesStatement(Durados.View view) string s = string.Empty; if (!view.Database.EnableDecryption) return s; - - string sql = "OPEN SYMMETRIC KEY {0} DECRYPTION BY CERTIFICATE {1} "; + ISqlTextBuilder sqlBuilder = GetSqlTextBuilder(view); + string sql = sqlBuilder.GetOpenCertificateStatement(); ; + HashSet keys = new HashSet(); foreach (ColumnField columnField in view.GetEncryptedColumns()) @@ -2992,7 +2996,8 @@ private string GetOpenCertificatesStatement(Durados.View view) private string GetCloseCertificatesStatement(Durados.View view) { string s = string.Empty; - string sql = " close SYMMETRIC KEY {0} "; + ISqlTextBuilder sqlBuilder = GetSqlTextBuilder(view); + string sql = sqlBuilder.GetCloseCertificateStatement(); HashSet keys = new HashSet(); foreach (ColumnField columnField in view.GetEncryptedColumns()) { @@ -3009,10 +3014,10 @@ private string GetCloseCertificatesStatement(Durados.View view) private string GetEncryptedColumnsStatement(Durados.View view) { string s = string.Empty; - + ISqlTextBuilder sqlBuilder = GetSqlTextBuilder(view); foreach (ColumnField columnField in view.GetEncryptedColumns()) { - s += string.Format(" CONVERT(NVARCHAR(250), DECRYPTBYKEY({0})) AS {1}, ", columnField.EncryptedName, columnField.DatabaseNames); + s += sqlBuilder.GetDecryptColumnForSelectStatement( columnField.EncryptedName, columnField.DatabaseNames); } @@ -3326,7 +3331,7 @@ public virtual SqlSchema GetNewSqlSchema() { return new SqlSchema(); } - + private string GetDistinctSelect(DataTable table) { StringBuilder s = new StringBuilder(); @@ -3654,7 +3659,7 @@ public void ExecuteNoneQueryStoredProcedure(string connectionString, string sp, public void ExecuteNonQuery(string connectionString, string sql) { - ExecuteNonQuery(connectionString, sql, SqlProduct.SqlServer, null, null); + ExecuteNonQuery(connectionString, sql, GetSqlProduct(), null, null); } public void ExecuteNonQuery(string connectionString, string sql, SqlProduct sqlProduct) @@ -3664,7 +3669,7 @@ public void ExecuteNonQuery(string connectionString, string sql, SqlProduct sqlP public void ExecuteNonQuery(string connectionString, string sql, Dictionary parameters, ExecuteNonQueryRollbackCallback executeNonQueryRollbackCallback) { - ExecuteNonQuery(connectionString, sql, SqlProduct.SqlServer, parameters, executeNonQueryRollbackCallback); + ExecuteNonQuery(connectionString, sql, GetSqlProduct(), parameters, executeNonQueryRollbackCallback); } @@ -3823,7 +3828,7 @@ public SqlParameter[] ExecuteProcedure(string connectionString, string procedure } } - public SqlParameter[] ExecuteProcedure(string connectionString, string procedureName, Dictionary parameters, List outParameters,ExecuteProcedureRollbackCallback executeProcedureRollbackCallback) + public System.Data.IDataParameter[] ExecuteProcedure(string connectionString, string procedureName, Dictionary parameters, List outParameters,ExecuteProcedureRollbackCallback executeProcedureRollbackCallback) { using (IDbConnection connection = GetNewConnection(connectionString)) { @@ -3840,7 +3845,7 @@ public SqlParameter[] ExecuteProcedure(string connectionString, string procedure { foreach (string key in parameters.Keys) { - + System.Data.IDataParameter dataParameter = GetNewParameter(command, key, parameters[key]); dataParameter.Direction= outParameters.Contains(key) ? ParameterDirection.Output : ParameterDirection.Input; command.Parameters.Add(dataParameter); @@ -3859,8 +3864,8 @@ public SqlParameter[] ExecuteProcedure(string connectionString, string procedure transaction.Commit(); } - List sqlParameters = new List(); - foreach (SqlParameter sqlParameter in command.Parameters) + List sqlParameters = new List(); + foreach (IDataParameter sqlParameter in command.Parameters) { sqlParameters.Add(sqlParameter); } @@ -5440,7 +5445,7 @@ public virtual DataRow GetDataRow2(View view, string pk, IDbCommand command) //string sql = "select * from " + sqlTextBuilder.EscapeDbObject("{0}") + " where {1}"; //sql = string.Format(sql, tableName, GetWhereStatement(view, tableName)); - string sql = GetSelectStatement(view, 1, 1, GetFilter(view, pk.Split(','), false), null, SortDirection.Asc).Replace("@id ","@pk_id "); + string sql = GetSelectStatement(view, 1, 1, GetFilter(view, pk.Split(','), false), null, SortDirection.Asc).Replace("@id ", "@pk_id ", false); command.CommandText = sql; @@ -5803,7 +5808,7 @@ protected Filter GetFilter(View view, Dictionary values, bool us if (columnField.Encrypted) { //filter.WhereStatement += "CONVERT(NVARCHAR(250), DECRYPTBYKEY(" + columnField.EncryptedName + "))" + " like N'" + likePrefix + value + "%' " + logicCondition.ToString() + " "; - filter.WhereStatement += "CONVERT(NVARCHAR(250), DECRYPTBYKEY(" + columnField.EncryptedName + "))" + " like " + parameterName + " " + logicCondition.ToString() + " "; + filter.WhereStatement += sqlTextBuilder.GetDecryptColumnStatement(columnField.EncryptedName) + " like " + parameterName + " " + logicCondition.ToString() + " "; } else if (columnField.IsCalculated) { @@ -6654,7 +6659,7 @@ private object GetDelimitedColumnsParameters(List columnNamesList, View foreach (string columnName in columnNamesList) { if (view.Fields.ContainsKey(columnName) && view.Fields[columnName].FieldType == FieldType.Column && ((ColumnField)view.Fields[columnName]).Encrypted) - delimitedColumns += "ENCRYPTBYKEY(KEY_GUID('" + ((ColumnField)view.Fields[columnName]).GetSymmetricKeyName() + "'),"+sqlTextBuilder.DbParameterPrefix + GetVarFromName(columnName) + ")" + comma; + delimitedColumns += sqlTextBuilder.GetDbEncryptedColumnParameterNameSql(((ColumnField)view.Fields[columnName]).GetSymmetricKeyName(), GetVarFromName(columnName)) + comma; else if (view.Fields.ContainsKey(columnName) && view.Fields[columnName].IsPoint) { delimitedColumns += GetPointForInsert(view.Fields[columnName], columnName, sqlTextBuilder); @@ -7268,7 +7273,7 @@ private string GetUpdateSetColumns(List columnNames, View view) foreach (string columnName in columnNames) { if (view.Fields.ContainsKey(columnName) && view.Fields[columnName].FieldType == FieldType.Column && ((ColumnField)view.Fields[columnName]).Encrypted) - updateSetColumns += sqlTextBuilder.EscapeDbObject(((ColumnField)view.Fields[columnName]).EncryptedName) + sqlTextBuilder.DbEquals + "ENCRYPTBYKEY(KEY_GUID('" + ((ColumnField)view.Fields[columnName]).GetSymmetricKeyName() + "')," + sqlTextBuilder.DbParameterPrefix + columnName + ")" + comma; + updateSetColumns += sqlTextBuilder.EscapeDbObject(((ColumnField)view.Fields[columnName]).EncryptedName) + sqlTextBuilder.DbEquals + sqlTextBuilder.GetDbEncryptedColumnParameterNameSql(((ColumnField)view.Fields[columnName]).GetSymmetricKeyName() , columnName ) + comma; else if (view.Fields.ContainsKey(columnName) && view.Fields[columnName].IsPoint) { updateSetColumns += GetPointUpdateSetColumn(view.Fields[columnName], columnName, sqlTextBuilder); @@ -8068,6 +8073,12 @@ public void LoadForeignKeys(string connectionString, SqlProduct sqlProduct, Dict } } } + public virtual SqlProduct GetSqlProduct() { + + return SqlProduct.SqlServer; + } + + } /// @@ -12258,4 +12269,554 @@ public virtual string GetPointFieldStatement(string tableName, string columnName { return string.Empty; } -} \ No newline at end of file + + + + public virtual string GetDecryptColumnForSelectStatement(string encryptedName, string databaseNames) + { + return string.Format(" CONVERT(NVARCHAR(250), DECRYPTBYKEY({0})) AS {1}, ", encryptedName, databaseNames); + } + + public virtual string GetDecryptColumnStatement(string encryptedName) + { + return string.Format(" CONVERT(NVARCHAR(250), DECRYPTBYKEY({0})) ", encryptedName); + } + + + public virtual string GetCloseCertificateStatement() + { + return " close SYMMETRIC KEY {0} "; + } + + public virtual string GetOpenCertificateStatement() + { + return "OPEN SYMMETRIC KEY {0} DECRYPTION BY CERTIFICATE {1} "; + } + + + + public virtual string GetDbEncryptedColumnParameterNameSql(string symetricKeyName, string columnName) + { + return "ENCRYPTBYKEY(KEY_GUID('" +symetricKeyName + "')," + DbParameterPrefix + columnName + ")" ; + } + + +} + +public class SqlMainSchema :ISqlMainSchema +{ + public virtual IDbConnection GetNewConnection() + { + return new SqlConnection(); + } + public virtual IDbConnection GetNewConnection(string connectionString) + { + return new SqlConnection(connectionString); + } + public virtual IDbCommand GetNewCommand() + { + return new SqlCommand(); + } + public virtual IDbCommand GetNewCommand(string sql, IDbConnection connection) + { + return new SqlCommand(sql,(SqlConnection)connection); + } + public virtual string GetEmailBySocialIdSql() + { + return "select UserId from durados_UserSocial where Provider = @Provider and SocialId = @SocialId and AppId = @AppId"; + } + + public virtual string GetEmailBySocialIdSql2() + { + return "select UserId from durados_UserSocial where Provider = @Provider and SocialId = @SocialId and AppId is null"; + } + + public virtual string GetSocialIdlByEmail() + { + return "select SocialId from durados_UserSocial WITH(NOLOCK) where Provider = @Provider and UserId = @UserId and AppId = @AppId"; + } + + public virtual string GetSocialIdlByEmail2() + { + return "select SocialId from durados_UserSocial WITH(NOLOCK) where Provider = @Provider and UserId = @UserId and AppId is null"; + } + + public virtual string InsertNewUserSql(string tableName,string userTable) + { + return "if NOT EXISTS (Select [Username] From [" + tableName + "] WHERE [Username] = @Username) begin INSERT INTO ["+userTable+"] ([Username],[FirstName],[LastName],[Email],[Role],[Guid]) VALUES (@Username,@FirstName,@LastName,@Email,@Role,@Guid) end"; + + } + + public virtual string GetInsertUserAppSql() + { + return "INSERT INTO [durados_UserApp] ([UserId],[AppId],[Role]) VALUES (@UserId,@AppId,@Role)"; + } + + public virtual string GetUserIdFromUsernameSql() + { + return "SELECT TOP 1 [durados_user].[id] FROM durados_user WITH(NOLOCK) WHERE [durados_user].[username]=@username"; + } + + public virtual string GetUserTempTokenSql() + { + return "SELECT TOP 1 Id FROM [durados_ValidGuid] WITH(NOLOCK) WHERE UserGuid=@UserGuid and Used=0"; + } + + public virtual string GetUserNameByGuidSql() + { + return "SELECT TOP 1 username FROM durados_user WITH(NOLOCK) WHERE guid=@guid"; + } + + public virtual string GetDeleteUserSql() + { + return "delete FROM durados_user WHERE [username]=@username"; + } + + public virtual string GetUserBelongToMoreThanOneAppSql() + { + return "select id FROM durados_userapp WHERE [userid]=@userid and appid<>@appid"; + } + + public virtual string GetHasAppsSql() + { + return string.Format("SELECT TOP 1 id FROM durados_app WITH(NOLOCK) WHERE creator=@id"); + } + + public virtual string GetInviteAdminBeforeSignUpSql(string username, string appId) + { + return string.Format("insert into durados_Invite (username, appId) values ('{0}', {1})", username,appId); + } + + public virtual string GetInviteAdminAfterSignupSql(string username) + { + return string.Format("select appId from durados_Invite where username = '{0}'", username); + } + + public virtual string GetInviteAdminAfterSignupSql(int userId, string appId, string role) + { + return string.Format("insert into durados_UserApp (UserId, AppId, Role) values ({0},{1},'{2}')", userId, appId, role); + } + + public virtual string GetDeleteInviteUser(string username) + { + return string.Format("delete durados_Invite where Username = '{0}'", username); + } + + public virtual string GetAppsPermanentFilter() + { + return "(durados_App.toDelete =0 AND (durados_App.Creator = [m_User] or durados_App.id in (SELECT durados_UserApp.AppId FROM durados_UserApp WITH(NOLOCK) WHERE durados_UserApp.UserId = [m_User] and (durados_UserApp.Role = 'Admin' or durados_UserApp.Role = 'Developer'))))"; + } + + + public virtual string GetWakeupCallToAppSql() + { + return "select [Id],[Url] from dbo.durados_App with (NOLOCK) where [Creator] is null"; + } + + + public virtual string GetAppsCountsql() + { + return "SELECT COUNT(*) FROM dbo.durados_App a with(nolock) INNER JOIN dbo.durados_PlugInInstance p WITH(NOLOCK) ON a.id = p.Appid WHERE Deleted =0 AND p.selected=1"; + } + + public virtual string GetSqlProductSql() + { + return "SELECT dbo.durados_SqlConnection.SqlProductId FROM dbo.durados_App WITH(NOLOCK) INNER JOIN dbo.durados_SqlConnection WITH(NOLOCK) ON dbo.durados_App.SqlConnectionId = dbo.durados_SqlConnection.Id WHERE (dbo.durados_App.Name = @AppName)"; + } + + + public virtual string GetAppsExistsSql(string appName) + { + return "SELECT Id FROM durados_App WITH(NOLOCK) WHERE Name = N'" + appName + "'"; + } + + public virtual string GetAppsExistsForUserSql(string appName, int? userId) + { + return "SELECT dbo.durados_App.Id FROM dbo.durados_App WITH(NOLOCK), dbo.durados_UserApp WITH(NOLOCK) WHERE (dbo.durados_App.Name = N'" + appName + "' AND ((dbo.durados_UserApp.UserId=" + userId + " AND dbo.durados_UserApp.AppId = dbo.durados_App.Id) or dbo.durados_App.Creator=" + userId + ") ) group by(dbo.durados_App.Id)"; + } + + public virtual string GetPaymentStatusSql(string appName) + { + return "SELECT PaymentStatus FROM durados_App with(nolock) WHERE Name = N'" + appName + "'"; + } + + public virtual string GetCurrentAppIdSql(string server, string catalog, string username, string userId) + { + return string.Format("SELECT Id FROM durados_SqlConnection WHERE ServerName=N'{0}' AND Catalog=N'{1}' AND Username=N'{2}' AND DuradosUser={3}", server, catalog, username, userId); + } + + + public virtual string GetPlanForAppSql(int appId) + { + return "SELECT top(1) PlanId FROM durados_AppPlan WHERE AppId=" + appId + " order by PurchaseDate desc"; + } + + public virtual string GetFindAndUpdateAppInMainSql(int? templateId) + { + return + "begin tran getFromPool " + + "declare @appId int " + + "select top(1) @appId = id from durados_App with(UPDLOCK) where TemplateId " + (templateId.HasValue ? " = " + templateId.Value : " is null ").ToString() + " and creator = @poolCreator and DatabaseStatus = 1 AND ToDelete = 0 order by id asc; " + + "delete from durados_App where [Name] = @Name; " + + "update durados_App " + + "set creator = @creator, " + + "[CreatedDate] = @CreatedDate, " + + "[Name] = @Name, " + + "[Title] = @Title " + + "where id = @appId; " + + "select @appId " + + "commit tran getFromPool"; + } + + public virtual string GetAppNameByGuidFromDb(string guid) + { + return "select [name] from durados_App with(nolock) where [Guid] = '" + guid + "'"; + } + public virtual string GetAppNamesWithPrefixSql(string appNamePrefix) + { + return "select name from durados_app where name like '" + appNamePrefix + "%'"; + } + + public virtual string GetDropDatabaseSql(string name) + { + return "ALTER DATABASE " + name + " SET SINGLE_USER WITH ROLLBACK IMMEDIATE; drop database " + name; + } + + + public virtual string GetHasOtherConnectiosSql(string appDatabase) + { + return "select count(*) from dbo.durados_SqlConnection where [Catalog] = N'" + appDatabase + "'"; + } + + + public virtual string GetUpdateLogModelExceptionSql() + { + return "update [backand_model] set errorMessage = @errorMessage, errorTrace = @errorTrace where id=@id"; + } + + public virtual string GetSaveChangesIndicationFromDb2(string Id) + { + return "select ConfigChangesIndication from durados_App with(nolock) where id = " + Id; + } + + public virtual string GetSetSaveChangesIndicationFromDbSql(int config, string Id) + { + return "UPDATE durados_App SET ConfigChangesIndication = " + config + " WHERE id = " + Id; + } + + public virtual string GetLogModelSql() + { + return "INSERT INTO [backand_model] ([appName], [username], [timestamp], [input], [output], [valid], [action]) values (@appName, @username, @timestamp, @input, @output, @valid, @action); SELECT IDENT_CURRENT(N'backand_model') AS ID"; + } + + public virtual string GetAppLimitSql(string Id) + { + return "SELECT Name, Limit FROM durados_AppLimits WITH(NOLOCK) WHERE AppId = " + Id; + } + + public virtual string GetDeleteUserSql(int userId, string appId) + { + return string.Format("DELETE durados_UserApp WHERE UserId = {0} AND AppId = {1}",userId,appId); + } + + + public virtual string GetUpdateAppSystemConnectionSql(int? sysConnId, string primaryKey) + { + return "UPDATE durados_App SET SystemSqlConnectionId = " + sysConnId + " WHERE id = " + primaryKey + ";"; + + } + + public virtual string GetUpdateDBStatusSql(int onBoardingStatus, int appId) + { + return "UPDATE durados_App SET DatabaseStatus = " + onBoardingStatus + " WHERE id = " + appId + ";"; + } + + + public virtual string GetAppIdSql(int templateId) + { + return "SELECT AppId FROM durados_Template with(NOLOCK) WHERE id = " + templateId; + } + + public virtual string GetDeleteAppById(int id) + { + return "DELETE durados_App with (rowlock) WHERE Id = " + id; + } + + public virtual string GetUpdateAppConnectionsSql(int? appConnId, int? sysConnId, string primaryKey) + { + return "UPDATE durados_App SET SqlConnectionId = " + appConnId + ", SystemSqlConnectionId = " + sysConnId + " WHERE id = " + primaryKey; + + } + + public virtual string GetExecCreateDB(string sysCatalog) + { + return string.Format("EXEC('CREATE DATABASE {0}')", sysCatalog); + } + + public virtual string GetUpdateAppProduct() + { + return "UPDATE durados_App SET productType = @productType WHERE Name = @name"; + } + + + public virtual string GetDbStatusSql(string appId) + { + return "SELECT DatabaseStatus FROM dbo.durados_App WITH (NOLOCK) WHERE id = " + appId; ; + } + + + public virtual string GetAppNameByIdSqlSql(int appId) + { + return "SELECT Name FROM dbo.durados_App WITH (NOLOCK) WHERE id = " + appId; + + } + + + public virtual string InsertNewConnectionToExternalServerTable() + { + return "INSERT INTO durados_ExternaInstance(InstanceName ,DbName ,IsActive,Endpoint,SqlConnectionId) VALUES(@serverName,@catalog,@IsActive,@serverName,@SqlConnectionId);SELECT IDENT_CURRENT(N'durados_ExternaInstance') AS Id"; + + } + + + public virtual string GetValidateSelectFunctionExistsSql() + { + return @"IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[f_report_connection_type]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT')) + BEGIN + execute dbo.sp_executesql @statement = N' + -- ============================================= + -- Author: + -- Create date: + -- Description: + -- ============================================= + Create FUNCTION [dbo].[f_report_connection_type] + ( + -- Add the parameters for the function here + @id int + ) + RETURNS int + AS + BEGIN + -- Declare the return variable here + DECLARE @ResultVar int + --1 console --2 free + -- Add the T-SQL statements to compute the return value here + select @ResultVar = CASE + WHEN ServerName IN(SELECT ServerName + FROM durados_ExternaInstance WITH(NOLOCK) + INNER JOIN durados_SqlConnection WITH(NOLOCK) ON durados_SqlConnection.Id = durados_ExternaInstance.SqlConnectionId) + THEN 2 + ELSE 1 END + FROM dbo.durados_SqlConnection c with (NOLOCK) + where id=@id + + -- Return the result of the function + RETURN @ResultVar + END + + ' + END + "; + } + + public virtual string GetCreatorSql(int appId) + { + return "SELECT Creator FROM dbo.durados_App WITH (NOLOCK) WHERE dbo.durados_App.Id = " + appId; + } + + public virtual string GetCreatorUsername(int appId) + { + return "SELECT dbo.durados_User.[Username] FROM dbo.durados_App WITH (NOLOCK) INNER JOIN dbo.durados_User WITH (NOLOCK) ON dbo.durados_App.Creator = dbo.durados_User.ID WHERE dbo.durados_App.Id = " + appId; + } + + public virtual string GetNewDatabaseNameSql(int plugInType, int templateAppId) + { + return "SELECT DatabaseName, DbCount FROM durados_SampleApp WITH (NOLOCK) WHERE PlugInId = " + plugInType + " AND AppId = " + templateAppId; + } + + + public virtual string GetAppSql() + { + return @"SELECT a.Id, a.Name, dbo.f_report_connection_type(a.SqlConnectionId) AS AppType, + a.Creator,cnn.ServerName, cnn.catalog ,syscnn.ServerName sysServerName,syscnn.catalog sysCatalog + FROM dbo.durados_App AS a WITH (NOLOCK) INNER JOIN dbo.durados_SqlConnection AS cnn WITH (NOLOCK) ON a.SqlConnectionId = cnn.Id INNER JOIN dbo.durados_SqlConnection AS syscnn WITH (NOLOCK) ON a.SystemSqlConnectionId = syscnn.Id + WHERE [ToDelete]<>1"; ; + } + + + public virtual string GetUserGuidSql() + { + return "SELECT TOP 1 [durados_User].[guid] FROM durados_user WITH(NOLOCK) WHERE [durados_User].[Username]=@username"; + } + + + + + public virtual string GetAppRowByNameSql(string appName) + { + return string.Format("SELECT * FROM [durados_app] WITH(NOLOCK) WHERE [Name] = '{0}'", appName); + } + + + + public virtual string GetAppNameByTokenSql(string HeaderToken) + { + return string.Format("SELECT [Name] FROM [durados_app] WITH(NOLOCK) WHERE [{0}] = @token", HeaderToken); + } + + + public virtual string GetUpdateAppToBeDeleted() + { + return "UPDATE durados_App SET [ToDelete]=1,[deleteddate] =getdate() WHERE Id=@Id"; + } + + + public virtual string GetValidateUserSql(int appID, int userId) + { + return string.Format("SELECT Cast( case when exists(SELECT 1 FROM durados_App WITH(NOLOCK) WHERE durados_app.[ToDelete]=0 AND Id = {0} AND Creator = {1}) or exists(SELECT 1 FROM dbo.durados_UserApp WITH(NOLOCK) WHERE AppId = {0} AND UserId = {1}) then 1 else 0 end as bit)", appID, userId); + } + + public virtual string GetLoadUserDataByGuidSql() + { + return string.Format("SELECT TOP 1 username FROM durados_user WITH(NOLOCK) WHERE guid=@guid"); + } + + public virtual string GetLoadUserDataByUsernameSql(string userFields, string userViewName, string userFieldName) + { + return string.Format("SELECT TOP 1 {0} FROM {1} WITH(NOLOCK) WHERE {2}=@username", userFields, userViewName, userFieldName); + } + + + + public virtual string GetUsernameByUsernameSql() + { + return "SELECT TOP 1 [Username] FROM [durados_User] WHERE [Username]=@Username"; + } + + public virtual string GetUsernameByUsernameInUseSql() + { + return "SELECT TOP 1 [Username] FROM [User] WHERE [Username]=@Username"; + } + + public virtual string InsertIntoPluginRegisterUsersSql() + { + return "INSERT INTO durados_PlugInRegisteredUser (PlugInUserId ,PlugInId, RegisteredUserId, SelectionDate) VALUES (@PlugInUserId ,@PlugInId, @RegisteredUserId, @SelectionDate)"; + } + + public virtual string InsertIntoUserSql() + { + return "INSERT INTO [User] ([Username],[FirstName],[LastName],[Email],[Password],[Role],[NewUser],[Comments]) VALUES (@Username,@FirstName,@LastName,@Email,@Password,@Role,@NewUser,@Comments)"; + } + + + public virtual string GetExternalConnectionIdsSql() + { + return "SELECT SqlConnectionId FROM durados_ExternaInstance WITH(NOLOCK) INNER JOIN durados_SqlConnection WITH(NOLOCK) on durados_SqlConnection.Id = durados_ExternaInstance.SqlConnectionId"; + } + + + public virtual string GetDeleteAppByName(string id) + { + return "DELETE durados_App WHERE Name = '" + id + "'"; + } + + + public virtual string GetAppGuidByName() + { + return "SELECT [Guid] FROM [durados_app] WITH(NOLOCK) WHERE [Name] =@appName"; + } + public virtual string GetAppGuidById() + { + return "SELECT [Guid] FROM [durados_app] WITH(NOLOCK) WHERE [Id] =@Id"; + } + + public virtual string GetUserFieldsForSelectSql() + { + return "[{0}],[{1}],[{2}],[{3}],[{4}]"; + //return "SELECT TOP 1 [durados_user].[guid] FROM durados_user WITH(NOLOCK) WHERE [durados_user].[username]=@username"; + + } + + + public virtual string GetUserAappIdSql() + { + return "SELECT TOP 1 [ID] FROM [durados_UserApp] WHERE [UserId]=@UserId AND [AppId]=@AppId"; + } + + + public virtual string GetAppsNameSql() + { + return "SELECT dbo.durados_App.Name FROM dbo.durados_App WITH(NOLOCK) INNER JOIN dbo.durados_SqlConnection WITH(NOLOCK) ON dbo.durados_App.SqlConnectionId = dbo.durados_SqlConnection.Id WHERE (dbo.durados_SqlConnection.Id = 1)"; + } + + + public virtual string GetInsertLimitsSql(Limits limits, int limit, int? id) + { + return "SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; " + + "BEGIN TRANSACTION; " + + "UPDATE dbo.durados_AppLimits SET Limit = " + limit + " WHERE AppId = " + id + " and Name = '" + limits.ToString() + "';" + + " IF @@ROWCOUNT = 0 " + + "BEGIN " + + "INSERT into dbo.durados_AppLimits (Name, Limit, AppId) values ('" + limits.ToString() + "'," + limit + "," + id.Value + "); " + + "END " + + "COMMIT TRANSACTION;"; + } + + + public virtual string GetUpdateAppConnectionAndProductSql(string newConnectionId, string image, string pk) + { + return "UPDATE durados_App SET SqlConnectionId = " + newConnectionId + ",Image= '" + image + "', DataSourceTypeId=2 WHERE Id = " + pk; + } + + + public virtual string GetInsertIntoUsersSql(string viewName) + { + return "INSERT INTO [" + viewName + "] ([Username],[FirstName],[LastName],[Email],[Role],[Guid]) VALUES (@Username,@FirstName,@LastName,@Email,@Role,@Guid)"; + } + public virtual string GetInsertIntoUsersSql2(string viewName) + { + return "INSERT INTO [" + viewName + "] ([Username],[FirstName],[LastName],[Email],[Role],[Guid],[IsApproved]) VALUES (@Username,@FirstName,@LastName,@Email,@Role,@Guid,@IsApproved)"; + } + + + public virtual string GetUsersApps(int userId) + { + return "SELECT * FROM durados_App WITH(NOLOCK) WHERE durados_app.[ToDelete]=0 AND Creator = " + userId + " OR id IN (SELECT durados_UserApp.AppId FROM durados_UserApp WITH(NOLOCK) WHERE durados_UserApp.UserId = " + userId + ") "; + } + public virtual string GetConnectionStringAllowVeriables() + { + return string.Empty; + } + + + public virtual string GetUpdateAppMasterGuid(string appName, string columnName) + { + return string.Format("UPDATE durados_App SET [{1}] = @newGuid WHERE [Name] = '{0}'", appName, columnName); ; + } + + + public virtual string GetReportId() + { + return "SELECT Id FROM modubiz_LogStats2 WITH(NOLOCK) WHERE SqlConId = @SqlConId and LogDate = @LogDate"; + } + + public virtual string InsertNewStatsSql() + { + return "INSERT INTO modubiz_LogStats2 (SqlConId, LogDate) VALUES (@SqlConId, @LogDate); SELECT IDENT_CURRENT(N'[modubiz_LogStats2]') AS ID; "; + } + public virtual string UpdateMeasurmentType(string measureType ){ + return "UPDATE modubiz_LogStats2 SET " + measureType + " = @value WHERE Id = @Id"; + } + + public virtual string GetUserSecuritySql() + { + return "SELECT Password, PasswordFormat, PasswordSalt FROM [aspnet_Membership] WHERE UserId = @userId"; + } + public virtual string GetUpdateFailedPasswordAttemptCountSql() + { + return @"UPDATE aspnet_membership + SET FailedPasswordAttemptCount = @count WHERE userId=@userId"; + + } + +} diff --git a/Durados.Web.Mvc.Logging/Durados.Web.Mvc.Logging.csproj b/Durados.Web.Mvc.Logging/Durados.Web.Mvc.Logging.csproj index c121cb67..135b5d6e 100644 --- a/Durados.Web.Mvc.Logging/Durados.Web.Mvc.Logging.csproj +++ b/Durados.Web.Mvc.Logging/Durados.Web.Mvc.Logging.csproj @@ -90,10 +90,6 @@ ..\Duradus.Web.Mvc.App\deployment\MySql.Web.dll - - ..\packages\NewRelic.Agent.Api.6.3.123.0\lib\NewRelic.Api.Agent.dll - True - ..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll diff --git a/Durados.Web.Mvc.Logging/packages.config b/Durados.Web.Mvc.Logging/packages.config index 5ee370de..14cf7e8f 100644 --- a/Durados.Web.Mvc.Logging/packages.config +++ b/Durados.Web.Mvc.Logging/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file diff --git a/Durados.Web.Mvc/Controllers/AccountController.cs b/Durados.Web.Mvc/Controllers/AccountController.cs index 9a5b893f..ca354cf9 100644 --- a/Durados.Web.Mvc/Controllers/AccountController.cs +++ b/Durados.Web.Mvc/Controllers/AccountController.cs @@ -37,7 +37,7 @@ public override JsonResult RegistrationRequest(FormCollection collection) string id = this.Request.QueryString["id"]; - Durados.DataAccess.SqlAccess sql = new Durados.DataAccess.SqlAccess(); + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; Dictionary parameters = new Dictionary(); @@ -72,7 +72,7 @@ public override JsonResult RegistrationRequest(FormCollection collection) - if (sql.ExecuteScalar(Map.Database.GetUserView().ConnectionString, "SELECT TOP 1 [Username] FROM [durados_User] WHERE [Username]=@Username", parameters) != string.Empty) + if (sqlAccess.ExecuteScalar(Map.Database.GetUserView().ConnectionString, Maps.MainAppSchema.GetUsernameByUsernameSql(), parameters) != string.Empty) { throw new DuradosException(Map.Database.Localizer.Translate(username + " already exists")); } @@ -127,26 +127,28 @@ public override JsonResult RegistrationRequest(FormCollection collection) parameters.Add("@IsApproved", isApproved); collection.Add("Guid", guid.ToString()); - string userId = sql.ExecuteScalar(Maps.Instance.DuradosMap.Database.GetUserView().ConnectionString, "SELECT TOP 1 [ID] FROM [durados_User] WHERE [Username]=@Username", parameters); + string userId = sqlAccess.ExecuteScalar(Maps.Instance.DuradosMap.Database.GetUserView().ConnectionString, Maps.MainAppSchema.GetUserIdFromUsernameSql() , parameters); ExecuteNonQueryRollbackCallback executeNonQueryRollbackCallback = CreateMembershipCallback; if (!string.IsNullOrEmpty(userId)) executeNonQueryRollbackCallback = null; - sql.ExecuteNonQuery(Map.Database.GetUserView().ConnectionString, "INSERT INTO [" + Map.Database.GetUserView().GetTableName() + "] ([Username],[FirstName],[LastName],[Email],[Role],[Guid],[IsApproved]) VALUES (@Username,@FirstName,@LastName,@Email,@Role,@Guid,@IsApproved)", parameters, executeNonQueryRollbackCallback); + sqlAccess.ExecuteNonQuery(Map.Database.GetUserView().ConnectionString, Maps.MainAppSchema.GetInsertIntoUsersSql2(Map.Database.GetUserView().GetTableName()) , parameters, executeNonQueryRollbackCallback); if (string.IsNullOrEmpty(appName) && !Map.IsMainMap) { //appName = Map.AppName; if (string.IsNullOrEmpty(userId)) { - sql.ExecuteNonQuery(Maps.Instance.DuradosMap.Database.GetUserView().ConnectionString, "INSERT INTO [" + Maps.Instance.DuradosMap.Database.GetUserView().GetTableName() + "] ([Username],[FirstName],[LastName],[Email],[Role],[Guid]) VALUES (@Username,@FirstName,@LastName,@Email,@Role,@Guid)", parameters, null); + string viewName =Maps.Instance.DuradosMap.Database.GetUserView().GetTableName() ; + sqlAccess.ExecuteNonQuery(Maps.Instance.DuradosMap.Database.GetUserView().ConnectionString, Maps.MainAppSchema.GetInsertIntoUsersSql(viewName), parameters, null); } - Dictionary parameters2 = new Dictionary(); - parameters2.Add("@Username", username); - parameters2.Add("@AppId", Map.Id); - parameters2.Add("@Role", role); - sql.ExecuteNonQuery(Maps.Instance.DuradosMap.Database.ConnectionString, "INSERT INTO [durados_UserApp_Pending] ([Username],[AppId],[Role]) VALUES (@Username,@AppId,@Role)", parameters2, null); - + /* TODO : Main Mysql + //Dictionary parameters2 = new Dictionary(); + //parameters2.Add("@Username", username); + //parameters2.Add("@AppId", Map.Id); + //parameters2.Add("@Role", role); + //sqlAccess.ExecuteNonQuery(Maps.Instance.DuradosMap.Database.ConnectionString, "INSERT INTO [durados_UserApp_Pending] ([Username],[AppId],[Role]) VALUES (@Username,@AppId,@Role)", parameters2, null); + */ } if (!string.IsNullOrEmpty(appName)) @@ -161,11 +163,11 @@ public override JsonResult RegistrationRequest(FormCollection collection) Dictionary parameters2 = new Dictionary(); parameters2.Add("@UserId", userId); parameters2.Add("@AppId", mapId); - if (string.IsNullOrEmpty(sql.ExecuteScalar(Maps.Instance.DuradosMap.connectionString, "SELECT TOP 1 [ID] FROM [durados_UserApp] WHERE [UserId]=@UserId AND [AppId]=@AppId", parameters2))) + if (string.IsNullOrEmpty(sqlAccess.ExecuteScalar(Maps.Instance.DuradosMap.connectionString, "SELECT TOP 1 [ID] FROM [durados_UserApp] WHERE [UserId]=@UserId AND [AppId]=@AppId", parameters2))) { parameters2.Add("@newUser", username); parameters2.Add("@appName", appName); - sql.ExecuteNonQuery(Maps.Instance.DuradosMap.Database.ConnectionString, "durados_AssignPendingApps @newUser,@appName", parameters2, AssignPendingAppsCallback); + sqlAccess.ExecuteNonQuery(Maps.Instance.DuradosMap.Database.ConnectionString, "durados_AssignPendingApps @newUser,@appName", parameters2, AssignPendingAppsCallback); } } @@ -179,7 +181,7 @@ public override JsonResult RegistrationRequest(FormCollection collection) if (!user.IsApproved && Maps.MultiTenancy) { user.IsApproved = true; - RenewUserGuid(username, Maps.Instance.GetMap(appName), sql); + RenewUserGuid(username, Maps.Instance.GetMap(appName), sqlAccess); System.Web.Security.Membership.UpdateUser(user); } @@ -248,7 +250,7 @@ protected virtual void HandlePlugInInfo(string username) int userId = Maps.Instance.DuradosMap.Database.GetUserID(username); - Durados.DataAccess.SqlAccess sql = new Durados.DataAccess.SqlAccess(); + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; Dictionary parameters = new Dictionary(); parameters.Add("@PlugInUserId", plugInUserId); parameters.Add("@PlugInId", (int)PlugInType.Wix); @@ -256,7 +258,7 @@ protected virtual void HandlePlugInInfo(string username) parameters.Add("@SelectionDate", DateTime.Now); - sql.ExecuteNonQuery(Maps.Instance.DuradosMap.Database.ConnectionString, "insert into durados_PlugInRegisteredUser (PlugInUserId ,PlugInId, RegisteredUserId, SelectionDate) values (@PlugInUserId ,@PlugInId, @RegisteredUserId, @SelectionDate)", parameters, null); + sqlAccess.ExecuteNonQuery(Maps.Instance.DuradosMap.Database.ConnectionString, Maps.MainAppSchema.InsertIntoPluginRegisterUsersSql(), parameters, null); } catch (Exception exception) { @@ -1157,7 +1159,7 @@ public virtual JsonResult RegistrationRequest(FormCollection collection) { try { - Durados.DataAccess.SqlAccess sql = new Durados.DataAccess.SqlAccess(); + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; Dictionary parameters = new Dictionary(); @@ -1176,7 +1178,7 @@ public virtual JsonResult RegistrationRequest(FormCollection collection) parameters.Add("@Username", username); - if (sql.ExecuteScalar(Map.Database.ConnectionString, "SELECT TOP 1 [Username] FROM [User] WHERE [Username]=@Username", parameters) != string.Empty) + if (sqlAccess.ExecuteScalar(Map.Database.ConnectionString, Maps.MainAppSchema.GetUsernameByUsernameInUseSql(), parameters) != string.Empty) { throw new DuradosException("'Username' already exist [" + collection["Username"] + "]"); } @@ -1220,7 +1222,7 @@ public virtual JsonResult RegistrationRequest(FormCollection collection) - sql.ExecuteNonQuery(Map.Database.ConnectionString, "INSERT INTO [User] ([Username],[FirstName],[LastName],[Email],[Password],[Role],[NewUser],[Comments]) VALUES (@Username,@FirstName,@LastName,@Email,@Password,@Role,@NewUser,@Comments)", parameters, CreateMembershipCallback); + sqlAccess.ExecuteNonQuery(Map.Database.ConnectionString, Maps.MainAppSchema.InsertIntoUserSql(),parameters, CreateMembershipCallback); SendRegistrationRequest(collection); @@ -1547,13 +1549,14 @@ private string GetUserDetail(string guid, string userField) private void LoadUserData(string guid) { - Durados.DataAccess.SqlAccess sqlAccess = new Durados.DataAccess.SqlAccess(); + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; Dictionary parameters = new Dictionary(); parameters.Add("@guid", guid); + - string sqlDuradosSys = string.Format("SELECT TOP 1 username FROM durados_user WITH(NOLOCK) WHERE guid=@guid"); + string sqlDuradosSys = Maps.MainAppSchema.GetLoadUserDataByGuidSql(); object duradosSysUser = sqlAccess.ExecuteScalar(Maps.Instance.ConnectionString, sqlDuradosSys, parameters); @@ -1564,7 +1567,7 @@ private void LoadUserData(string guid) parameters.Add("@username", duradosSysUser.ToString()); - string sql = string.Format("SELECT TOP 1 {0} FROM {1} WITH(NOLOCK) WHERE {2}=@username", GetUserFieldsForSelect(), Map.Database.UserViewName, Map.Database.UsernameFieldName); + string sql = Maps.MainAppSchema.GetLoadUserDataByUsernameSql(GetUserFieldsForSelect(), Map.Database.UserViewName, Map.Database.UsernameFieldName); object dataTable = sqlAccess.ExecuteTable(Map.Database.GetUserView().ConnectionString, sql, parameters, CommandType.Text); @@ -1584,7 +1587,7 @@ private void LoadUserData(string guid) private string GetUserFieldsForSelect() { string select; - select = string.Format("[{0}],[{1}],[{2}],[{3}],[{4}]", Map.Database.UserGuidFieldName, Map.Database.UsernameFieldName,"FirstName","LastName","Email"); + select = string.Format(Maps.MainAppSchema.GetUserFieldsForSelectSql() , Map.Database.UserGuidFieldName, Map.Database.UsernameFieldName, "FirstName", "LastName", "Email"); return select; } @@ -1920,13 +1923,14 @@ private string GetUserGuid(string userName) { try { - Durados.DataAccess.SqlAccess sql = new Durados.DataAccess.SqlAccess(); + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; Dictionary parameters = new Dictionary(); parameters.Add("@username", userName); string userViewName=Map.Database.UserViewName; - object guid = sql.ExecuteScalar(Maps.Instance.DuradosMap.connectionString, "SELECT TOP 1 [durados_user].[guid] FROM durados_user WITH(NOLOCK) WHERE [durados_user].[username]=@username", parameters); + string sql = Maps.MainAppSchema.GetUserGuidSql(); + object guid = sqlAccess.ExecuteScalar(Maps.Instance.DuradosMap.connectionString, sql, parameters); if (guid == null || guid == DBNull.Value) throw new DuradosException(Map.Database.Localizer.Translate("Username has no uniqe guid ,password canot be reset.")); @@ -2152,7 +2156,7 @@ public bool AuthenticateUser(Map map, string userName, string password) //if (map.Database.BackandSSO) if (map is DuradosMap) { - return _provider.ValidateUser(userName, password); + return AccountService.ValidateUser(_provider, userName, password); } else { @@ -2373,8 +2377,10 @@ public bool ValidateUser(string userName) private bool ValidateUser(int appID, int userId) { - string sql = string.Format("select Cast( case when exists(select 1 from durados_App with(nolock) where durados_app.[ToDelete]=0 AND Id = {0} and Creator = {1}) or exists(select 1 from dbo.durados_UserApp with(nolock) where AppId = {0} and UserId = {1}) then 1 else 0 end as bit)", appID, userId); - string scalar = (new SqlAccess()).ExecuteScalar(Maps.Instance.DuradosMap.Database.ConnectionString, sql); + + string sql = Maps.MainAppSchema.GetValidateUserSql(appID, userId); + + string scalar = Maps.MainAppSqlAccess.ExecuteScalar(Maps.Instance.DuradosMap.Database.ConnectionString, sql); if (string.IsNullOrEmpty(scalar)) return false; diff --git a/Durados.Web.Mvc/Controllers/AdminController.cs b/Durados.Web.Mvc/Controllers/AdminController.cs index 004925c2..de29e7b1 100644 --- a/Durados.Web.Mvc/Controllers/AdminController.cs +++ b/Durados.Web.Mvc/Controllers/AdminController.cs @@ -103,7 +103,9 @@ protected override void BeforeEdit(EditEventArgs e) { HandleLayoutType(e); ApplyToAllViews(e); - UpdateTheme(e); + /* TODO: Main MySQL depricated + * UpdateTheme(e); + */ } else if (e.View.Name == "Field") @@ -312,7 +314,7 @@ private void HandleJsonName(EditEventArgs e) } } - + /* TODO: Main MySQL depricated public JsonResult GetPreviewPath() { return Json(Map.GetPreviewPath()); @@ -321,6 +323,7 @@ public JsonResult GetThemPath() { return Json(Map.Theme.Path); } + private void UpdateTheme(EditEventArgs e) { try @@ -345,7 +348,7 @@ private void UpdateTheme(EditEventArgs e) { path = e.Values["CustomThemePath"].ToString(); } - + Theme theme = new Theme() { Id = currentThemeId, Name = name, Path = path }; Map.UpdateTheme(theme); @@ -355,6 +358,7 @@ private void UpdateTheme(EditEventArgs e) Map.Logger.Log(GetControllerNameForLog(this.ControllerContext), this.ControllerContext.RouteData.Values["action"].ToString(), exception.Source, exception, 1, "UpdateTheme"); } } + * */ private void ApplyToAllViews(EditEventArgs e) { @@ -2795,9 +2799,10 @@ protected override System.Data.DataRow GetDataRow(Durados.Web.Mvc.View view, str else if (view.Name == "View") { DataRow row = base.GetDataRow(view, pk); - + /* TODO: Main MySQL depricated try { + row["Theme"] = Map.Theme.Name; if (Map.Theme.Id == Maps.CustomTheme) { @@ -2808,6 +2813,7 @@ protected override System.Data.DataRow GetDataRow(Durados.Web.Mvc.View view, str { Map.Database.Logger.Log(GetControllerNameForLog(this.ControllerContext), this.ControllerContext.RouteData.Values["action"].ToString(), "GetDataRow", exception, 1, "Update theme from cache"); } + */ return row; } else diff --git a/Durados.Web.Mvc/Controllers/MultiTenancy/DnsAliasController.cs b/Durados.Web.Mvc/Controllers/MultiTenancy/DnsAliasController.cs deleted file mode 100644 index 525b8b32..00000000 --- a/Durados.Web.Mvc/Controllers/MultiTenancy/DnsAliasController.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.Mvc; -using System.Data; -using System.IO; -using System.Data.SqlClient; - -using Durados.DataAccess; -using Durados.Web.Mvc; -namespace Durados.Web.Mvc.App.Controllers -{ - [HandleError] - public class DnsAliasController : Durados.Web.Mvc.Controllers.DuradosController - { - protected override void AfterEditAfterCommit(EditEventArgs e) - { - base.AfterEditAfterCommit(e); - - string prevAlias = e.PrevRow["Alias"].ToString(); - string currAlias = e.Values["Alias"].ToString(); - string name = GetAppName(e.PrimaryKey); - - if (Maps.DnsAliases.ContainsKey(prevAlias)) - { - Maps.DnsAliases.Remove(prevAlias); - } - if (Maps.DnsAliases.ContainsKey(currAlias)) - { - Maps.DnsAliases.Remove(currAlias); - } - - Maps.DnsAliases.Add(currAlias, name); - } - - protected override void AfterCreateAfterCommit(CreateEventArgs e) - { - base.AfterCreateAfterCommit(e); - - string currAlias = e.Values["Alias"].ToString(); - string name = GetAppName(e.PrimaryKey); - - if (Maps.DnsAliases.ContainsKey(currAlias)) - { - Maps.DnsAliases.Remove(currAlias); - } - - Maps.DnsAliases.Add(currAlias, name); - } - - protected override void AfterDeleteAfterCommit(DeleteEventArgs e) - { - base.AfterDeleteAfterCommit(e); - - string prevAlias = e.PrevRow["Alias"].ToString(); - - if (Maps.DnsAliases.ContainsKey(prevAlias)) - { - Maps.DnsAliases.Remove(prevAlias); - } - } - - private string GetAppName(string pk) - { - SqlAccess sqlAccess = new SqlAccess(); - - return sqlAccess.ExecuteScalar(Map.connectionString, "SELECT dbo.durados_App.Name FROM dbo.durados_App INNER JOIN dbo.durados_DnsAlias ON dbo.durados_App.Id = dbo.durados_DnsAlias.AppId WHERE dbo.durados_DnsAlias.Id = " + pk).ToLower(); - } - } -} - diff --git a/Durados.Web.Mvc/Database.cs b/Durados.Web.Mvc/Database.cs index 79aff39c..311e827f 100644 --- a/Durados.Web.Mvc/Database.cs +++ b/Durados.Web.Mvc/Database.cs @@ -72,7 +72,7 @@ public Database(DataSet dataSet, Map map) : DefaultSymmetricKeyName = GetDefaultSymmetricKeyName(); DefaultCertificateName = GetDefaultCertificateName(); DefaultSymmetricKeyAlgorithm = SymmetricKeyAlgorithm.TRIPLE_DES; - MaxInvalidPasswordAttempts = 5; + MaxInvalidPasswordAttempts = 6; MinRequiredPasswordLength = 6; MinRequiredNonalphanumericCharacters = 0; PasswordAttemptWindow = 10; @@ -1115,7 +1115,7 @@ public override bool IdenticalSystemConnection private object GetValueFromRequestCache(string key) { - if (System.Web.HttpContext.Current.Items.Contains(key)) + if (System.Web.HttpContext.Current != null && System.Web.HttpContext.Current.Items.Contains(key)) return System.Web.HttpContext.Current.Items[key]; return null; diff --git a/Durados.Web.Mvc/Durados.Web.Mvc.csproj b/Durados.Web.Mvc/Durados.Web.Mvc.csproj index e5cff3f8..978db432 100644 --- a/Durados.Web.Mvc/Durados.Web.Mvc.csproj +++ b/Durados.Web.Mvc/Durados.Web.Mvc.csproj @@ -249,7 +249,6 @@ - @@ -316,6 +315,7 @@ + @@ -381,6 +381,12 @@ + + + + + + diff --git a/Durados.Web.Mvc/Infrastructure/ProductMaintenance.cs b/Durados.Web.Mvc/Infrastructure/ProductMaintenance.cs index 5b53bff7..6c8860e1 100644 --- a/Durados.Web.Mvc/Infrastructure/ProductMaintenance.cs +++ b/Durados.Web.Mvc/Infrastructure/ProductMaintenance.cs @@ -153,32 +153,39 @@ private void DeleteConfiguration(string configFileName) } private void UpdateDeletedApp(int appId) { - SqlSchema schema = new SqlSchema(); - using (IDbCommand command = schema.GetCommand()) + using (IDbConnection connection = Maps.MainAppSchema.GetNewConnection(Maps.Instance.ConnectionString)) { - command.Connection = schema.GetConnection(Maps.Instance.DuradosMap.connectionString); - command.CommandText = "UPDATE durados_App SET [ToDelete]=1,[deleteddate] =getdate() WHERE Id=@Id"; - command.Parameters.Add(new System.Data.SqlClient.SqlParameter("Id", appId)); - try - { - command.Connection.Open(); - command.ExecuteNonQuery(); - - } - catch (Exception ex) - { throw new DuradosException("
Failed to update app " + appId.ToString()); } - command.CommandText = "Delete From durados_UserApp WHERE appId=@Id"; - try + using (IDbCommand command = connection.CreateCommand()) { - if (command.Connection.State == ConnectionState.Closed) + //command.Connection = schema.GetConnection(Maps.Instance.DuradosMap.connectionString); + command.CommandText = Maps.MainAppSchema.GetUpdateAppToBeDeleted(); + var parameter = command.CreateParameter(); + parameter.ParameterName = "Id"; + parameter.Value = appId; + command.Parameters.Add(parameter); + + try + { command.Connection.Open(); - command.ExecuteNonQuery(); + command.ExecuteNonQuery(); - } - catch (Exception ex) - { throw new DuradosException("
Failed to update user app " + appId.ToString()); } + } + catch (Exception ex) + { throw new DuradosException("
Failed to update app " + appId.ToString()); } + command.CommandText = "Delete From durados_UserApp WHERE appId=@Id"; + + try + { + if (command.Connection.State == ConnectionState.Closed) + command.Connection.Open(); + command.ExecuteNonQuery(); + + } + catch (Exception ex) + { throw new DuradosException("
Failed to update user app " + appId.ToString()); } + } } } @@ -249,12 +256,16 @@ private App GetApp(string sql, string parameterName, string parameterVal) { App app = new App(); - SqlSchema schema = new SqlSchema(); - IDbCommand command = schema.GetCommand(); - command.Connection = schema.GetConnection(Maps.Instance.DuradosMap.connectionString); - ValidateSelectFunctionExists(command); + ISqlMainSchema schema = Maps.MainAppSchema;; + IDbCommand command = schema.GetNewCommand(); + command.Connection = schema.GetNewConnection(Maps.Instance.DuradosMap.connectionString); + //ValidateSelectFunctionExists(command); command.CommandText = sql; - command.Parameters.Add(new System.Data.SqlClient.SqlParameter(parameterName, parameterVal)); + var parameter = command.CreateParameter(); + parameter.ParameterName = parameterName; + parameter.Value = parameterVal; + command.Parameters.Add(parameter); + try { command.Connection.Open(); @@ -284,43 +295,10 @@ private App GetApp(string sql, string parameterName, string parameterVal) private void ValidateSelectFunctionExists(IDbCommand command) { - string sql = @"IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[f_report_connection_type]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT')) - BEGIN - execute dbo.sp_executesql @statement = N' - -- ============================================= - -- Author: - -- Create date: - -- Description: - -- ============================================= - Create FUNCTION [dbo].[f_report_connection_type] - ( - -- Add the parameters for the function here - @id int - ) - RETURNS int - AS - BEGIN - -- Declare the return variable here - DECLARE @ResultVar int - --1 console --2 free - -- Add the T-SQL statements to compute the return value here - select @ResultVar = CASE - WHEN ServerName IN(SELECT ServerName - FROM durados_ExternaInstance WITH(NOLOCK) - INNER JOIN durados_SqlConnection WITH(NOLOCK) ON durados_SqlConnection.Id = durados_ExternaInstance.SqlConnectionId) - THEN 2 - ELSE 1 END - FROM dbo.durados_SqlConnection c with (NOLOCK) - where id=@id - - -- Return the result of the function - RETURN @ResultVar - END - - ' - END - "; + string sql = Maps.MainAppSchema.GetValidateSelectFunctionExistsSql(); + if(string.IsNullOrEmpty(sql)) return; command.CommandText = sql; + try { @@ -358,10 +336,7 @@ public static DataTable GetToDeleteAppsTable(IDbCommand command) } private static string GetAppSql() { - return @"SELECT a.Id, a.Name, dbo.f_report_connection_type(a.SqlConnectionId) AS AppType, - a.Creator,cnn.ServerName, cnn.catalog ,syscnn.ServerName sysServerName,syscnn.catalog sysCatalog - FROM dbo.durados_App AS a WITH (NOLOCK) INNER JOIN dbo.durados_SqlConnection AS cnn WITH (NOLOCK) ON a.SqlConnectionId = cnn.Id INNER JOIN dbo.durados_SqlConnection AS syscnn WITH (NOLOCK) ON a.SystemSqlConnectionId = syscnn.Id - WHERE [ToDelete]<>1"; + return Maps.MainAppSchema.GetAppSql(); //dbo.f_report_is_user_from_wix(a.Creator, NULL) AS inwix, } diff --git a/Durados.Web.Mvc/Map.cs b/Durados.Web.Mvc/Map.cs index 185ad5fe..cec7f146 100644 --- a/Durados.Web.Mvc/Map.cs +++ b/Durados.Web.Mvc/Map.cs @@ -4,13 +4,14 @@ using Durados.Web.Mvc.Azure; using Durados.Web.Mvc.Farm; using Durados.Web.Mvc.UI.Helpers; +using Durados.Web.Mvc.UI.Helpers.Config.Cloud; using Microsoft.WindowsAzure.StorageClient; using Newtonsoft.Json; using System; using System.Collections; using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; +using System.Data.Common; using System.Diagnostics; using System.IO; using System.Linq; @@ -605,13 +606,14 @@ private bool Initiate(Durados.Web.Mvc.Config.IProject project, bool save) u.Buid(); firstTime = true; } - + /* + * TODO: Main MySQL depricated if (this is DuradosMap && !Maps.PrivateCloud) { string plugInFileName = Maps.GetDeploymentPath("Sql/PlugIn.sql"); Durados.DataAccess.AutoGeneration.PlugIn plugIn = new Durados.DataAccess.AutoGeneration.PlugIn(systemConnectionString, plugInFileName); } - + */ AddSystemTables(ds); if (ds.Tables.Contains("User") && ds.Tables["User"].Columns.Contains("Password")) @@ -714,12 +716,12 @@ private bool Initiate(Durados.Web.Mvc.Config.IProject project, bool save) View userView = (View)Database.GetUserView(); userView.Precedent = true; userView.AllowSelectRoles = "Developer"; + /* TODO: Main MySQL depricated + string dnsAliasFileName = Maps.GetDeploymentPath("Sql/DnsAlias.sql"); - string dnsAliasFileName = Maps.GetDeploymentPath("Sql/DnsAlias.sql"); - - Durados.DataAccess.AutoGeneration.DnsAlias dnsAlias = new Durados.DataAccess.AutoGeneration.DnsAlias(systemConnectionString, dnsAliasFileName); - + Durados.DataAccess.AutoGeneration.DnsAlias dnsAlias = new Durados.DataAccess.AutoGeneration.DnsAlias(systemConnectionString, dnsAliasFileName); + */ View appView = (View)Database.Views["durados_App"]; Field sysConnectionField = appView.GetFieldByColumnNames("SystemSqlConnectionId"); @@ -803,7 +805,7 @@ public void NotifyUser(string subjectKey, string messageKey) string message = Database.Localizer.Translate(System.Web.Mvc.CmsHelper.GetContent(messageKey)); message = string.IsNullOrEmpty(message) ? messageKey : message; string siteWithoutQueryString = System.Web.HttpContext.Current.Request.Url.Scheme + "://" + System.Web.HttpContext.Current.Request.Url.Authority; - message = message.Replace("[Url]", siteWithoutQueryString).Replace("[UserPreviewUrl]", this.GetPreviewPath()); + message = message.Replace("[Url]", siteWithoutQueryString); /* TODO: Main MySQL depricated Replace("[UserPreviewUrl]", this.GetPreviewPath()); */ int appId = Convert.ToInt32(Maps.Instance.GetCurrentAppId()); string to = Maps.Instance.DuradosMap.Database.GetCreatorUsername(appId); @@ -1139,17 +1141,18 @@ private int GetSaveChangesIndicationFromDb() { return GetSaveChangesIndicationFromDb2(); } - catch (SqlException) + catch (DbException) { try { - using (SqlConnection connection = new SqlConnection(Maps.Instance.DuradosMap.connectionString)) + ISqlMainSchema sqlMain = Maps.MainAppSchema; + using (IDbConnection connection = sqlMain.GetNewConnection(Maps.Instance.DuradosMap.connectionString)) { connection.Open(); - using (SqlCommand command = new SqlCommand()) + using (IDbCommand command = sqlMain.GetNewCommand()) { command.Connection = connection; - new SqlSchema().AddNewColumnToTable("durados_App", "ConfigChangesIndication", DataType.SingleSelect, command); + Maps.MainAppSqlAccess.GetNewSqlSchema().AddNewColumnToTable("durados_App", "ConfigChangesIndication", DataType.SingleSelect, command); } } return GetSaveChangesIndicationFromDb2(); @@ -1167,8 +1170,9 @@ private int GetSaveChangesIndicationFromDb() private int GetSaveChangesIndicationFromDb2() { - string sql = "select ConfigChangesIndication from durados_App with(nolock) where id = " + Id; - string scalar = new SqlAccess().ExecuteScalar(Maps.Instance.DuradosMap.connectionString, sql); + + string sql = Maps.MainAppSchema.GetSaveChangesIndicationFromDb2(Id); + string scalar = Maps.MainAppSqlAccess.ExecuteScalar(Maps.Instance.DuradosMap.connectionString, sql); return Convert.ToInt32(string.IsNullOrEmpty(scalar) ? "0" : scalar); } @@ -1177,23 +1181,25 @@ private void SetSaveChangesIndicationFromDb() { int config = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["isChangesInConfigStructure"] ?? "0") + 1; - string sql = "Update durados_App set ConfigChangesIndication = " + config + " where id = " + Id; - SqlAccess sqlAccess = new SqlAccess(); + string sql = Maps.MainAppSchema.GetSetSaveChangesIndicationFromDbSql(config,Id); + + SqlAccess sqlAccess = Maps.MainAppSqlAccess; try { sqlAccess.ExecuteNonQuery(Maps.Instance.DuradosMap.connectionString, sql); } - catch (SqlException) + catch (DbException) { try { - using (SqlConnection connection = new SqlConnection(Maps.Instance.DuradosMap.connectionString)) + ISqlMainSchema sqlMain = Maps.MainAppSchema; + using (IDbConnection connection = sqlMain.GetNewConnection(Maps.Instance.DuradosMap.connectionString)) { connection.Open(); - using (SqlCommand command = new SqlCommand()) + using (IDbCommand command = sqlMain.GetNewCommand()) { command.Connection = connection; - new SqlSchema().AddNewColumnToTable("durados_App", "ConfigChangesIndication", DataType.SingleSelect, command); + sqlAccess.GetNewSqlSchema().AddNewColumnToTable("durados_App", "ConfigChangesIndication", DataType.SingleSelect, command); } } sqlAccess.ExecuteNonQuery(Maps.Instance.DuradosMap.connectionString, sql); @@ -1570,7 +1576,7 @@ private void InitiateFirstTime() { SetSaveChangesIndicationFromDb(); AddCreator(); - AddDemo(); + // AddDemo(); AddNewUserVerification(); AddBeforeSocialSignup(); AddSendForgotPassword(); @@ -1627,7 +1633,7 @@ public string GetConnectionSource() return "unknown"; } } - + /* TODO : Main Mysql private void AddSyncUserRulesOld() { const string USERS = "users"; @@ -1645,7 +1651,7 @@ private void AddSyncUserRulesOld() values.Add("WorkflowAction", Durados.WorkflowAction.Execute.ToString()); values.Add("WhereCondition", whereCondition); values.Add("ExecuteMessage", "Your objects do not contain a users object. Please set the where condition to false in the Security & Auth action \"Create My App User\"."); - values.Add("ExecuteCommand", "insert into " + sqlTextBuilder.EscapeDbObject(USERS) + " (" + sqlTextBuilder.EscapeDbObject("email") + "," + sqlTextBuilder.EscapeDbObject("firstName") + "," + sqlTextBuilder.EscapeDbObject("lastName") + ") " + sqlTextBuilder.Top("select '{{Username}}','{{FirstName}}','{{LastName}}' " + sqlTextBuilder.FromDual() + " WHERE NOT EXISTS (SELECT * FROM " + sqlTextBuilder.EscapeDbObject(USERS) + " WHERE " + sqlTextBuilder.EscapeDbObject("email") + "='{{Username}}' ) ", 1)); + values.Add("ExecuteCommand", "INSERT INTO " + sqlTextBuilder.EscapeDbObject(USERS) + " (" + sqlTextBuilder.EscapeDbObject("email") + "," + sqlTextBuilder.EscapeDbObject("firstName") + "," + sqlTextBuilder.EscapeDbObject("lastName") + ") " + sqlTextBuilder.Top("select '{{Username}}','{{FirstName}}','{{LastName}}' " + sqlTextBuilder.FromDual() + " WHERE NOT EXISTS (SELECT * FROM " + sqlTextBuilder.EscapeDbObject(USERS) + " WHERE " + sqlTextBuilder.EscapeDbObject("email") + "='{{Username}}' ) ", 1)); ruleView.Create(values, null, null, null, null, null); values = new Dictionary(); @@ -1668,7 +1674,7 @@ private void AddSyncUserRulesOld() values.Add("ExecuteCommand", "delete from " + sqlTextBuilder.EscapeDbObject(USERS) + " where " + sqlTextBuilder.EscapeDbObject("email") + " = '{{Username}}'"); ruleView.Create(values, null, null, null, null, null); } - + */ private string GetJsCode(string internalCode) { @@ -2295,35 +2301,7 @@ private void AddNewAdminInvitation() databaseView.Edit(values, null, null, null, null, null); } - private void AddDemo() - { - if (Maps.GetCurrentAppName().StartsWith(Maps.DemoDatabaseName)) - { - DataAccess.SqlAccess sqlAccess = new SqlAccess(); - - string scriptFilename = Maps.GetDeploymentPath("Sql/NorthwindSysAdditional.sql"); - - try - { - sqlAccess.RunScriptFile(scriptFilename, systemConnectionString); - } - catch (Exception exception) - { - Logger.Log("Map", "Initiate", "AddDemo", exception, 1, "Failed to add to demo sys"); - } - scriptFilename = Maps.GetDeploymentPath("Sql/NorthwindAdditional.sql"); - - try - { - sqlAccess.RunScriptFile(scriptFilename, connectionString); - } - catch (Exception exception) - { - Logger.Log("Map", "Initiate", "AddDemo", exception, 1, "Failed to add to demo"); - } - } - } - + private void AddCreator() { @@ -2385,13 +2363,15 @@ private void AddSystemTables(DataSet ds) if (!this.IsMainMap) AddSystemCloudTable(ds); AddSystemRootTable(ds); - + /* + * TODO: Main MySQL depricated if (this is DuradosMap && !Maps.PrivateCloud) { AddSystemPlugInTable(ds); AddSystemMailingServiceTable(ds); AddSystemMessageBoardTable(ds); } + */ } private void ConfigSystemTables() @@ -2412,11 +2392,14 @@ private void ConfigSystemTables() ConfigSystemRootTable(); ConfigSystemPlugInTable(); + /* + * TODO: Main MySQL depricated if (this is DuradosMap && !Maps.PrivateCloud) { ConfigSystemMailingServiceTable(); ConfigSystemMessageBoardTable(); } + */ try { foreach (View systemView in db.Views.Values.Where(v => v.SystemView)) @@ -3679,8 +3662,10 @@ public void BackupConfig() private void BackupConfig(string filename) { + if (Database.LongProductName == filename) + return; + string containerName = Maps.GetStorageBlobName(filename); - CloudBlobContainer container = GetContainer(containerName); (new Durados.Web.Mvc.Azure.BlobBackup()).BackupSync(container, containerName, Database.ConfigVersion); @@ -4172,7 +4157,7 @@ private Durados.Web.Mvc.Config.Database CreateConfigDatabase(Database tempDb) //{ // ReadConfig(ds, filename); //} - if ((Maps.Cloud && !(this is DuradosMap) && storage.Exists(filename)) || (System.IO.File.Exists(filename))) + if ((Maps.Cloud && !(this is DuradosMap) && ConfigCloudStorage.Exists(filename)) || (System.IO.File.Exists(filename))) { ReadConfig(ds, filename); } @@ -4281,7 +4266,7 @@ public bool Exists(string filename) string containerName = Maps.GetStorageBlobName(filename); - return storage.Exists(containerName); + return ConfigCloudStorage.Exists(containerName); } public void ReadConfigFromCloud(DataSet ds, string filename) @@ -4341,31 +4326,46 @@ public void ReadConfigFromCloud(DataSet ds, string filename) Maps.Instance.StorageCache.Add(blobName, ds); } + private IStorage configCloudStorage = null; + + private IStorage ConfigCloudStorage + { + get + { + if (configCloudStorage == null) + { + configCloudStorage = StorageFactory.GetStorage(Maps.ConfigCloudProvider, this); + } + return configCloudStorage; + } + } + public void ReadConfigFromCloudStorage(DataSet ds, string filename) { - CheckIfConfigIsLockedAndWait(AppName); + ConfigCloudStorage.Read(ds, filename, AppName, IsMainMap); + //CheckIfConfigIsLockedAndWait(AppName); - string containerName = Maps.GetStorageBlobName(filename); - CloudBlobContainer container = GetContainer(containerName); + //string containerName = Maps.GetStorageBlobName(filename); + //CloudBlobContainer container = GetContainer(containerName); - CloudBlob blob = container.GetBlobReference(containerName); - try - { - //BlobStream stream = blob.OpenRead(); - //string tempFileName = fileInfo.DirectoryName + "\\temp" + filenameOnly + "." + fileInfo.Extension; + //CloudBlob blob = container.GetBlobReference(containerName); + //try + //{ + // //BlobStream stream = blob.OpenRead(); + // //string tempFileName = fileInfo.DirectoryName + "\\temp" + filenameOnly + "." + fileInfo.Extension; - using (MemoryStream stream = new MemoryStream()) - { - blob.DownloadToStream(stream); + // using (MemoryStream stream = new MemoryStream()) + // { + // blob.DownloadToStream(stream); - stream.Seek(0, SeekOrigin.Begin); + // stream.Seek(0, SeekOrigin.Begin); - ds.ReadXml(stream); - } - //System.IO.File.Delete(tempFileName); + // ds.ReadXml(stream); + // } + // //System.IO.File.Delete(tempFileName); - } - catch { } + //} + //catch { } } private void CheckIfConfigIsLockedAndWait(string appName) @@ -4440,93 +4440,95 @@ public void WriteConfigToCloud(DataSet ds, string filename, bool async) public void WriteConfigToCloud2(DataSet ds, string filename, bool async, Map map) { - string containerName = Maps.GetStorageBlobName(filename); - Maps.Instance.StorageCache.Add(containerName, ds); - - CloudBlobContainer container = GetContainer(containerName); - - CloudBlob blob = container.GetBlobReference(containerName); - blob.Properties.ContentType = "application/xml"; - - if (!Maps.Instance.StorageCache.ContainsKey(containerName) || !async) - { - using (MemoryStream stream = new MemoryStream()) - { - ds.WriteXml(stream, XmlWriteMode.WriteSchema); - stream.Seek(0, SeekOrigin.Begin); - blob.UploadFromStream(stream); - RefreshApis(map); - Maps.Instance.Backup.BackupAsync(container, containerName); - } - } - else - { - MemoryStream stream = new MemoryStream(); - ds.WriteXml(stream, XmlWriteMode.WriteSchema); - stream.Seek(0, SeekOrigin.Begin); + //string containerName = Maps.GetStorageBlobName(filename); + //Maps.Instance.StorageCache.Add(containerName, ds); - DateTime started = DateTime.Now; + //CloudBlobContainer container = GetContainer(containerName); - blob.BeginUploadFromStream(stream, BlobTransferCompletedCallback, new BlobTransferAsyncState(blob, stream, started, container, containerName, map)); + //CloudBlob blob = container.GetBlobReference(containerName); + //blob.Properties.ContentType = "application/xml"; - //try - //{ - // if (map != null) - // { - // Maps.Instance.DuradosMap.Logger.Log("Map", "WriteConfigToCloud", map.AppName ?? string.Empty, string.Empty, string.Empty, -8, containerName + " started", started); - // } - //} - //catch { } - } + //if (!Maps.Instance.StorageCache.ContainsKey(containerName) || !async) + //{ + // using (MemoryStream stream = new MemoryStream()) + // { + // ds.WriteXml(stream, XmlWriteMode.WriteSchema); + // stream.Seek(0, SeekOrigin.Begin); + // blob.UploadFromStream(stream); + // RefreshApis(map); + // Maps.Instance.Backup.BackupAsync(container, containerName); + // } + //} + //else + //{ + // MemoryStream stream = new MemoryStream(); + // ds.WriteXml(stream, XmlWriteMode.WriteSchema); + // stream.Seek(0, SeekOrigin.Begin); + + // DateTime started = DateTime.Now; + + // blob.BeginUploadFromStream(stream, BlobTransferCompletedCallback, new BlobTransferAsyncState(blob, stream, started, container, containerName, map)); + + // //try + // //{ + // // if (map != null) + // // { + // // Maps.Instance.DuradosMap.Logger.Log("Map", "WriteConfigToCloud", map.AppName ?? string.Empty, string.Empty, string.Empty, -8, containerName + " started", started); + // // } + // //} + // //catch { } + //} + ConfigCloudStorage.Write(ds, filename, async, map, string.Empty); } public void WriteConfigToCloud3(DataSet ds, string filename, bool async, Map map, string version) { - string containerName = Maps.GetStorageBlobName(filename); - //Maps.Instance.StorageCache.Add(containerName, ds); + //string containerName = Maps.GetStorageBlobName(filename); + ////Maps.Instance.StorageCache.Add(containerName, ds); - CloudBlobContainer container = GetContainer(containerName); + //CloudBlobContainer container = GetContainer(containerName); - CloudBlob blob = container.GetBlobReference(containerName + version); - blob.Properties.ContentType = "application/xml"; + //CloudBlob blob = container.GetBlobReference(containerName + version); + //blob.Properties.ContentType = "application/xml"; - if (!Maps.Instance.StorageCache.ContainsKey(containerName) || !async) - { - using (MemoryStream stream = new MemoryStream()) - { - ds.WriteXml(stream, XmlWriteMode.WriteSchema); - stream.Seek(0, SeekOrigin.Begin); + //if (!Maps.Instance.StorageCache.ContainsKey(containerName) || !async) + //{ + // using (MemoryStream stream = new MemoryStream()) + // { + // ds.WriteXml(stream, XmlWriteMode.WriteSchema); + // stream.Seek(0, SeekOrigin.Begin); - blob.UploadFromStream(stream); + // blob.UploadFromStream(stream); - //RefreshApis(map); + // //RefreshApis(map); - Maps.Instance.Backup.BackupAsync(container, containerName); + // Maps.Instance.Backup.BackupAsync(container, containerName); - } - } - else - { - MemoryStream stream = new MemoryStream(); - ds.WriteXml(stream, XmlWriteMode.WriteSchema); - stream.Seek(0, SeekOrigin.Begin); + // } + //} + //else + //{ + // MemoryStream stream = new MemoryStream(); + // ds.WriteXml(stream, XmlWriteMode.WriteSchema); + // stream.Seek(0, SeekOrigin.Begin); - DateTime started = DateTime.Now; + // DateTime started = DateTime.Now; - blob.BeginUploadFromStream(stream, BlobTransferCompletedCallback, new BlobTransferAsyncState(blob, stream, started, container, containerName, map)); + // blob.BeginUploadFromStream(stream, BlobTransferCompletedCallback, new BlobTransferAsyncState(blob, stream, started, container, containerName, map)); - try - { - if (map != null) - { - Maps.Instance.DuradosMap.Logger.Log("Map", "WriteConfigToCloud", map.AppName ?? string.Empty, string.Empty, string.Empty, -8, containerName + " started", started); - } - } - catch { } - } + // try + // { + // if (map != null) + // { + // Maps.Instance.DuradosMap.Logger.Log("Map", "WriteConfigToCloud", map.AppName ?? string.Empty, string.Empty, string.Empty, -8, containerName + " started", started); + // } + // } + // catch { } + //} + configCloudStorage.Write(ds, filename, async, map, version); } - private void BlobTransferCompletedCallback(IAsyncResult result) + public void BlobTransferCompletedCallback(IAsyncResult result) { BlobTransferAsyncState state = (BlobTransferAsyncState)result.AsyncState; if (state == null || state.Map == null) @@ -5160,9 +5162,9 @@ public MapSimpleCache MapSimpleCache return mapSimpleCache; } } - + /* TODO: Main MySQL depricated public Theme Theme { get; set; } - + public void UpdateTheme(Theme theme) { try @@ -5184,7 +5186,7 @@ public void UpdateTheme(Theme theme) Logger.Log("Map", "UpdateTheme", "ExecuteNonQuery", exception, 1, "theme id: " + theme.Id.ToString()); } } - + public string GetPreviewPath() { if (Theme.Id == Maps.CustomTheme) @@ -5199,7 +5201,7 @@ public string GetPreviewPath() } } - + */ private ICache lockerCache = CacheFactory.CreateCache("lockerCache"); @@ -5250,8 +5252,8 @@ public void LoadLimits() { try { - SqlAccess sqlAccess = new SqlAccess(); - DataTable table = sqlAccess.ExecuteTable(Maps.Instance.DuradosMap.connectionString, "select Name, Limit from durados_AppLimits with(nolock) where AppId = " + Id, null, CommandType.Text); + SqlAccess sqlAccess = Maps.MainAppSqlAccess; + DataTable table = sqlAccess.ExecuteTable(Maps.Instance.DuradosMap.connectionString, Maps.MainAppSchema.GetAppLimitSql(Id), null, CommandType.Text); foreach (DataRow row in table.Rows) { string limitName = row["Name"].ToString(); @@ -5408,12 +5410,12 @@ public Dictionary GetEnvironmentDictionary() Backand.security security = new Backand.security(); - public string Decrypt(string text) + public virtual string Decrypt(string text) { return security.decrypt(text, Guid.ToString() + Maps.AwsAccountSecretKeyPart); } - public string Encrypt(string text) + public virtual string Encrypt(string text) { return security.encrypt(text, Guid.ToString() + Maps.AwsAccountSecretKeyPart); diff --git a/Durados.Web.Mvc/Map/DuradosMap.cs b/Durados.Web.Mvc/Map/DuradosMap.cs index 6de1d73e..4b19f6e1 100644 --- a/Durados.Web.Mvc/Map/DuradosMap.cs +++ b/Durados.Web.Mvc/Map/DuradosMap.cs @@ -114,9 +114,10 @@ public void AddSslAndAahKeyColumnConfig() public Dictionary GetUserApps(int userId) { Dictionary values = new Dictionary(); - SqlAccess sqlAccess = new SqlAccess(); + + SqlAccess sqlAccess = GetSqlAccess(); - DataTable table = sqlAccess.ExecuteTable(Maps.Instance.DuradosMap.Database.ConnectionString, "select * from durados_App with(nolock) where durados_app.[ToDelete]=0 AND Creator = " + userId + " or id in (select durados_UserApp.AppId from durados_UserApp with(nolock) where durados_UserApp.UserId = " + userId + ") ", null, CommandType.Text); + DataTable table = sqlAccess.ExecuteTable(Maps.Instance.DuradosMap.Database.ConnectionString, GetUserAppsSql(userId), null, CommandType.Text); Dictionary apps = new Dictionary(); foreach (System.Data.DataRow row in table.Rows) @@ -127,6 +128,11 @@ public Dictionary GetUserApps(int userId) return apps; } + private static string GetUserAppsSql(int userId) + { + return Maps.MainAppSchema.GetUsersApps(userId); + } + public virtual string GetPlanContent() { if (string.IsNullOrEmpty(Database.PlanContent) || Database.PlanContent == "") @@ -143,27 +149,82 @@ public override string GetLogoSrc() //return string.Format("/Home/{0}/{1}?fieldName={2}&fileName={3}&pk='\'", DownloadActionName, "durados_App", "Image", this.Database.SiteInfo.Logo); } + private SqlProduct? sqlProduct = null; public override SqlProduct SqlProduct { get { - return SqlProduct.SqlServer; + if (!sqlProduct.HasValue) + { + sqlProduct = GetMainAppSqlProduct(); + } + return sqlProduct.Value; + } + set + { + } + } + + private SqlProduct? systemSqlProduct = null; + public override SqlProduct SystemSqlProduct + { + get + { + if (!systemSqlProduct.HasValue) + { + systemSqlProduct = GetMainAppSystemSqlProduct(); + } + return systemSqlProduct.Value; } set { } } + private SqlProduct GetMainAppSqlProduct() + { + return DataAccessHelper.GetDataTableAccess(this.connectionString).GetSqlProduct(); + } + private SqlProduct GetMainAppSystemSqlProduct() + { + return DataAccessHelper.GetDataTableAccess(this.connectionString).GetSqlProduct(); + } + public override Guid Guid { get { - return Guid.Parse(System.Configuration.ConfigurationManager.AppSettings["masterGuid"] ?? Guid.Empty.ToString()); + return Guid.Parse(System.Configuration.ConfigurationManager.AppSettings["masterAppGuid"] ?? Guid.Empty.ToString()); } set { base.Guid = value; } } + + public SqlAccess GetSqlAccess() + { + return Durados.DataAccess.Rest.GetSqlAccess(SqlProduct); + } + private string masterOpsAuth = null; + public override string GetCreatorGuid() + { + if (masterOpsAuth == null || masterOpsAuth == Guid.Empty.ToString()) + masterOpsAuth = (System.Configuration.ConfigurationManager.AppSettings["masterOpsAuth"] ?? Guid.Empty.ToString()); + + return masterOpsAuth; + } + public override string Decrypt(string text) + { + if(sqlProduct == Durados.SqlProduct.MySql) + return base.Decrypt(text); + return text; + } + public override string Encrypt(string text) + { + if (sqlProduct == Durados.SqlProduct.MySql) + return base.Encrypt(text); + return text; + } } } diff --git a/Durados.Web.Mvc/Map/Maps.cs b/Durados.Web.Mvc/Map/Maps.cs index 6a438fd4..e4389599 100644 --- a/Durados.Web.Mvc/Map/Maps.cs +++ b/Durados.Web.Mvc/Map/Maps.cs @@ -7,7 +7,7 @@ using System.Web; using System.IO; using System.Reflection; -using System.Data.SqlClient; + using Microsoft.WindowsAzure; using Microsoft.WindowsAzure.ServiceRuntime; @@ -31,1291 +31,1379 @@ using System.Web.Script.Serialization; using System.Runtime.Caching; using Durados.Security.Cloud; +using Durados.Web.Mvc.UI.Helpers.Config.Cloud; namespace Durados.Web.Mvc { - public class Maps - { - private static Maps instance; - - public static string GetInMemoryKey() - { - try - { - if (System.Web.HttpContext.Current != null && System.Web.HttpContext.Current.Request != null) - return System.Web.HttpContext.Current.Request.Headers["TestKey"]; - return null; - } - catch - { - return null; - } - } - - public static bool IsInMemoryMode() - { - return GetInMemoryKey() != null; - } - - public string[] GetVersions(string name) - { - int? id = AppExists(name); - if (!id.HasValue) - return null; - - string containerName = Maps.DuradosAppPrefix.Replace("_", "").Replace(".", "").ToLower() + id.ToString(); - CloudBlobContainer container = GetContainer(containerName); - - List versions = (new Durados.Web.Mvc.Azure.BlobBackup()).GetVersions(container); - - return versions.ToArray(); - } - - public void Restore(string name, string version = null) - { - int? id = AppExists(name); - if (!id.HasValue) - return; - - string containerName = Maps.DuradosAppPrefix.Replace("_", "").Replace(".", "").ToLower() + id.ToString(); - CloudBlobContainer container = GetContainer(containerName); - - if (version == null) - { - (new Durados.Web.Mvc.Azure.BlobBackup()).RestoreSync(container, containerName); - } - else - { - (new Durados.Web.Mvc.Azure.BlobBackup()).CopyBack(container, version, containerName); - } - - containerName += "xml"; - container = GetContainer(containerName); - if (version == null) - { - (new Durados.Web.Mvc.Azure.BlobBackup()).RestoreSync(container, containerName); - } - else - { - (new Durados.Web.Mvc.Azure.BlobBackup()).CopyBack(container, version, containerName); - } - } - public Dictionary GetAllConfigs(string id, string version) - { - - string containerName = Maps.DuradosAppPrefix.Replace("_", "").Replace(".", "").ToLower() + id; - Dictionary configs = new Dictionary(); - configs.Add(containerName, GetConfig(containerName, version)); - configs.Add(containerName + "xml", GetSchemaConfig(id, version)); - return configs; - } - public Stream GetSchemaConfig(string id, string version) - { - string containerName = Maps.DuradosAppPrefix.Replace("_", "").Replace(".", "").ToLower() + id + "xml"; - return GetConfig(containerName, version); - } - - public Stream GetConfig(string filename, string version) - { - if (version == null) - version = string.Empty; - else - version = (new Durados.Web.Mvc.Azure.BlobBackup()).VersionPrefix + version; - - CloudBlobContainer container = GetContainer(filename); - var source = container.GetBlobReference(filename + version); - if (!source.Exists()) - { - throw new DuradosException("Could not find configuration version " + version); - } - MemoryStream stream = new MemoryStream(); - source.DownloadToStream(stream); - return stream; - } - - Azure.DuradosStorage storage = new Azure.DuradosStorage(); - - private CloudBlobContainer GetContainer(string filename) - { - // Get a handle on account, create a blob service client and get container proxy - //var account = CloudStorageAccount.Parse(RoleEnvironment.GetConfigurationSettingValue("ConfigAzureStorage")); - //var client = account.CreateCloudBlobClient(); - //return client.GetContainerReference(RoleEnvironment.GetConfigurationSettingValue("configContainer")); - return storage.GetContainer(filename); - } - - static readonly object _object = new object(); - - private Maps() - { - InitPersistency(); - - if (multiTenancy) - { - lock (_object) - { - duradosMap = new DuradosMap(); - duradosMap.connectionString = persistency.ConnectionString; - duradosMap.systemConnectionString = persistency.ConnectionString; - duradosMap.ConfigFileName = Maps.GetConfigPath(Maps.GetmainAppConfigName() + ".xml"); - duradosMap.Url = GetAppUrl(duradosAppName); - duradosMap.Initiate(false); - //duradosMap.Logger.RedisProvider = SharedMemorySingeltone.Instance; - //duradosMap.Database.BackandSSO = true; - - View appView = (View)duradosMap.Database.Views["durados_App"]; - appView.PermanentFilter = "(durados_App.toDelete =0 AND (durados_App.Creator = [m_User] or durados_App.id in (select durados_UserApp.AppId from durados_UserApp where durados_UserApp.UserId = [m_User] and (durados_UserApp.[Role] = 'Admin' or durados_UserApp.[Role] = 'Developer'))))"; - appView.Controller = "MultiTenancy"; - - View connectionView = (View)duradosMap.Database.Views["durados_SqlConnection"]; - connectionView.PermanentFilter = "";// "DuradosUser = [Durados_User] ";//OR durados_SqlConnection.id in - //((select SqlConnectionId from durados_app inner join durados_userApp on durados_app.id =durados_userApp.appId where durados_UserApp.UserId = [Durados_User]) - //union - //(select SystemSqlConnectionId from durados_app inner join durados_userApp on durados_app.id =durados_userApp.appId where durados_UserApp.UserId = [Durados_User]))"; - - //maps = new Dictionary(); - mapsCache = CacheFactory.CreateCache("maps"); - - LoadDnsAliases(); - - PluginsCache = new Dictionary(); - - foreach (PlugInType plugInType in Enum.GetValues(typeof(PlugInType))) - { - PluginsCache.Add(plugInType, new PluginCache()); - } - } - } - } - - - - public static Maps Instance - { - get - { - if (instance == null) - { - instance = new Maps(); - } - return instance; - } - } - - public void WakeupCalltoApps() - { - using (SqlConnection connection = new SqlConnection(duradosMap.connectionString)) - { - connection.Open(); - - string sql = "select [Id],[Url] from dbo.durados_App with (NOLOCK) where [Creator] is null"; - - using (SqlCommand command = new SqlCommand(sql, connection)) - { - using (SqlDataReader reader = command.ExecuteReader()) - { - int urlOrdinal = reader.GetOrdinal("Url"); - - while (reader.Read()) - { - string url = reader.GetString(urlOrdinal).ToLower(); - //Infrastructure.ISendAsyncErrorHandler SendAsyncErrorHandler = null; - //ignore errors - Infrastructure.Http.CallWebRequest(url.Split('|')[2]); - } - } - } - } - - } - - private void LoadDnsAliases() - { - DnsAliases = new Dictionary(); - - using (SqlConnection connection = new SqlConnection(duradosMap.connectionString)) - { - connection.Open(); - - string sql = "SELECT dbo.durados_DnsAlias.Alias, dbo.durados_App.Name FROM dbo.durados_App with (NOLOCK) INNER JOIN dbo.durados_DnsAlias with (NOLOCK) ON dbo.durados_App.Id = dbo.durados_DnsAlias.AppId"; - - using (SqlCommand command = new SqlCommand(sql, connection)) - { - using (SqlDataReader reader = command.ExecuteReader()) - { - int aliasOrdinal = reader.GetOrdinal("Alias"); - int nameOrdinal = reader.GetOrdinal("Name"); - while (reader.Read()) - { - DnsAliases.Add(reader.GetString(aliasOrdinal).ToLower(), reader.GetString(nameOrdinal).ToLower()); - } - } - } - } - - } - - static Maps() - { - host = System.Configuration.ConfigurationManager.AppSettings["durados_host"] ?? "durados.com"; - poolCreator = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["poolCreator"] ?? "55555"); - poolShouldBeUsed = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["poolShouldBeUsed"] ?? "false"); - - redisConnectionString = System.Configuration.ConfigurationManager.AppSettings["redisConnectionString"] ?? "pub-redis-10938.us-east-1-4.3.ec2.garantiadata.com:10938,password=bell1234,allowAdmin=true"; - redisHostAndPort = System.Configuration.ConfigurationManager.AppSettings["redisHostAndPort"]; - - - mainAppConfigName = System.Configuration.ConfigurationManager.AppSettings["mainAppConfigName"] ?? "backand"; - hostByUs = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["hostByUs"] ?? "false"); - duradosAppName = System.Configuration.ConfigurationManager.AppSettings["durados_appName"] ?? "www"; - demoAzureUsername = System.Configuration.ConfigurationManager.AppSettings["demoAzureUsername"] ?? "itayher"; - demoAzurePassword = System.Configuration.ConfigurationManager.AppSettings["demoAzurePassword"] ?? "Durados2012"; - demoSqlUsername = System.Configuration.ConfigurationManager.AppSettings["demoSqlUsername"] ?? "durados"; - demoSqlPassword = System.Configuration.ConfigurationManager.AppSettings["demoSqlPassword"] ?? "durados"; - demoDatabaseName = System.Configuration.ConfigurationManager.AppSettings["demoDatabaseName"] ?? "Northwind"; - demoConfigFilename = System.Configuration.ConfigurationManager.AppSettings["demoConfigFilename"] ?? "Northwind"; - demoAzureServer = System.Configuration.ConfigurationManager.AppSettings["demoAzureServer"] ?? "tcp:d9gwdrhh5n.database.windows.net,1433"; - demoOnPremiseServer = System.Configuration.ConfigurationManager.AppSettings["demoOnPremiseServer"] ?? @"durados.info\sqlexpress"; - demoCreatePending = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["demoCreatePending"] ?? "true"); - demoPendingNext = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["demoPendingNext"] ?? "5"); - demoFtpTempHost = System.Configuration.ConfigurationManager.AppSettings["demoFtpTempHost"] ?? "temp"; - demoFtpHost = System.Configuration.ConfigurationManager.AppSettings["demoFtpHost"] ?? "durados.info"; - demoFtpPort = System.Configuration.ConfigurationManager.AppSettings["demoFtpPort"] ?? "21"; - demoFtpFileSizeLimitKb = Convert.ToInt64(System.Configuration.ConfigurationManager.AppSettings["demoFtpFileSizeLimitKb"] ?? "1024"); - demoFtpFolderSizeLimitKb = Convert.ToInt64(System.Configuration.ConfigurationManager.AppSettings["demoFtpFolderSizeLimitKb"] ?? "1024"); - demoFtpUser = System.Configuration.ConfigurationManager.AppSettings["demoFtpUser"] ?? "itay"; - demoFtpPassword = System.Configuration.ConfigurationManager.AppSettings["demoFtpPassword"] ?? "dio2008"; - demoFtpPhysicalPath = System.Configuration.ConfigurationManager.AppSettings["demoFtpPhysicalPath"] ?? @"C:\FTP\"; - demoUploadSourcePath = System.Configuration.ConfigurationManager.AppSettings["demoUploadSourcePath"] ?? "/Uploads/220/"; - demoOnPremiseSourcePath = System.Configuration.ConfigurationManager.AppSettings["demoOnPremiseSourcePath"] ?? @"C:\Dev\Databases\"; - allowLocalConnection = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["allowLocalConnection"] ?? "false"); - cloud = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["cloud"] ?? "false"); // false;// RoleEnvironment.IsAvailable;// - multiTenancy = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["multiTenancy"] ?? "false"); - useSecureConnection = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["UseSecureConnection"] ?? "false"); - skin = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["skin"] ?? "false"); - duradosAppPrefix = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["duradosAppSysPrefix"] ?? "durados_AppSys_"); - duradosAppSysPrefix = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["duradosAppPrefix"] ?? "durados_App_"); - debug = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["debug"] ?? "false"); - appNameMax = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["appNameMax"] ?? "32"); - dropAppDatabase = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["dropAppDatabase"] ?? "true"); - privateCloud = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["privateCloud"] ?? "false"); - ConfigPath = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["configPath"] ?? "~/Config/"); - plugInSampleGenerationCount = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["plugInSampleGenerationCount"] ?? "5"); - - superDeveloper = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["superDeveloper"] ?? "dev@devitout.com").ToLower(); - - DownloadDenyPolicy = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["DownloadDenyPolicy"] ?? "true"); - OldAdminHttp = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["OldAdminHttp"] ?? "false"); - AllowedDownloadFileTypes = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["AllowedDownloadFileTypes"] ?? allowedDownloadFileTypesDefault).Split(',').ToArray(); - DenyDownloadFileTypes = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["DenyDownloadFileTypes"] ?? denyDownloadFileTypesDefault).Split(',').ToArray(); - - ReservedAppNames = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["ReservedAppNames"] ?? reservedAppNames).Split(',').Select(k => k).ToHashSet(); - - azureDatabasePendingPool = new PendingPool(demoPendingNext); - onPremiseDatabasePendingPool = new PendingPool(demoPendingNext); - - AzureStorageAccountName = System.Configuration.ConfigurationManager.AppSettings["AzureStorageAccountName"]; - if (AzureStorageAccountName == null) - { - throw new DuradosException("Please add the AzureStorageAccountName to the web.config."); - } - - ConfigAzureStorageAccountName = System.Configuration.ConfigurationManager.AppSettings["ConfigAzureStorageAccountName"]; - if (ConfigAzureStorageAccountName == null) - { - throw new DuradosException("Please add the ConfigAzureStorageAccountName to the web.config."); - } - - AzureStorageAccountKey = System.Configuration.ConfigurationManager.AppSettings["AzureStorageAccountKey"]; - if (AzureStorageAccountKey == null) - { - throw new DuradosException("Please add the AzureStorageAccountKey to the web.config."); - } - - ConfigAzureStorageAccountKey = System.Configuration.ConfigurationManager.AppSettings["ConfigAzureStorageAccountKey"]; - if (ConfigAzureStorageAccountKey == null) - { - throw new DuradosException("Please add the ConfigAzureStorageAccountKey to the web.config."); - } - - - AzureStorageUrl = System.Configuration.ConfigurationManager.AppSettings["AzureStorageUrl"] ?? "http://{0}.blob.core.windows.net/{1}"; - - - AzureCacheAccountKey = System.Configuration.ConfigurationManager.AppSettings["AzureCacheAccountKey"]; - if (AzureCacheAccountKey == null) - { - throw new DuradosException("Please add the AzureCacheAccountKey to the web.config."); - } - - AzureCacheAccountName = System.Configuration.ConfigurationManager.AppSettings["AzureCacheAccountName"]; - if (AzureCacheAccountName == null) - { - throw new DuradosException("Please add the AzureCacheAccountName to the web.config."); - } - - AzureCacheUrl = System.Configuration.ConfigurationManager.AppSettings["AzureCacheUrl"]; - if (AzureCacheUrl == null) - { - throw new DuradosException("Please add the AzureCacheUrl to the web.config."); - } - - - - AzureCachePort = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["AzureCachePort"] ?? "22233"); - - AzureCacheUpdateInterval = new TimeSpan(0, 0, Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["AzureCacheUpdateInterval"] ?? "60")); - - DefaultUploadName = System.Configuration.ConfigurationManager.AppSettings["DefaultUploadName"] ?? "DefaultUpload"; - - DefaultImageHeight = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["DefaultImageHeight"] ?? "80"); - - SplitProducts = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["SplitProducts"] ?? "true"); - - ProductsPort = new Dictionary(); - - foreach (SqlProduct sqlProduct in Enum.GetValues(typeof(SqlProduct))) - { - ProductsPort.Add(sqlProduct, Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings[sqlProduct.ToString() + "Port"] ?? "80")); - } - - ApiUrls = (System.Configuration.ConfigurationManager.AppSettings["apiUrls"] ?? string.Empty).Split(';'); - - UserPreviewUrl = System.Configuration.ConfigurationManager.AppSettings["UserPreviewUrl"] ?? ".backand.loc:4012/"; - - S3Bucket = System.Configuration.ConfigurationManager.AppSettings["S3Bucket"]; - if (string.IsNullOrEmpty(S3Bucket)) - { - throw new DuradosException("Missing S3Bucket key in web config"); - } - - S3FilesBucket = System.Configuration.ConfigurationManager.AppSettings["S3FilesBucket"]; - - if (string.IsNullOrEmpty(S3FilesBucket)) - { - throw new DuradosException("Missing S3FilesBucket key in web config"); - } - - ParseConverterMasterKey = System.Configuration.ConfigurationManager.AppSettings["ParseConverterMasterKey"]; - if (string.IsNullOrEmpty(ParseConverterMasterKey)) - { - throw new DuradosException("Missing ParseConverterMasterKey key in web config"); - } - - ParseConverterAdminKey = System.Configuration.ConfigurationManager.AppSettings["ParseConverterAdminKey"]; - if (string.IsNullOrEmpty(ParseConverterAdminKey)) - { - throw new DuradosException("Missing ParseConverterAdminKey key in web config"); - } - - ParseConverterObjectName = System.Configuration.ConfigurationManager.AppSettings["ParseConverterObjectName"]; - if (string.IsNullOrEmpty(ParseConverterObjectName)) - { - throw new DuradosException("Missing ParseConverterObjectName key in web config"); - } - - AppLockedMessage = System.Configuration.ConfigurationManager.AppSettings["AppLockedMessage"]; - - if (string.IsNullOrEmpty(AppLockedMessage)) - { - throw new DuradosException("Missing AppLockedMessage key in web config"); - } - - NodeJSBucket = System.Configuration.ConfigurationManager.AppSettings["NodeJSBucket"]; - - if (string.IsNullOrEmpty(NodeJSBucket)) - { - throw new DuradosException("Missing NodeJSBucket key in web config"); - } - - - ExcludedEmailDomains = System.Configuration.ConfigurationManager.AppSettings["ExcludedEmailDomains"]; - - if (string.IsNullOrEmpty(ExcludedEmailDomains)) - { - throw new DuradosException("Missing ExcludedEmailDomains key in web config"); - } - - ReportConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["reportConnectionString"].ConnectionString; - - if (string.IsNullOrEmpty(ReportConnectionString)) - { - throw new DuradosException("Missing reportConnectionString key in web config"); - } - - SendWelcomeEmail = System.Configuration.ConfigurationManager.AppSettings["SendWelcomeEmail"] ?? "true"; - - System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Ssl3 | System.Net.SecurityProtocolType.Tls | System.Net.SecurityProtocolType.Tls11 | System.Net.SecurityProtocolType.Tls12; - - DevUsers = System.Configuration.ConfigurationManager.AppSettings["DevUsers"].Split(','); - - string embeddedReportsApiToken = System.Configuration.ConfigurationManager.AppSettings["embeddedReportsApiToken"]; - if (string.IsNullOrEmpty(embeddedReportsApiToken)) - { - throw new DuradosException("Missing embeddedReportsApiToken key in web config"); - } - string embeddedReportsUrlStep1 = System.Configuration.ConfigurationManager.AppSettings["embeddedReportsUrlStep1"]; - if (string.IsNullOrEmpty(embeddedReportsUrlStep1)) - { - throw new DuradosException("Missing embeddedReportsUrlStep1 key in web config"); - } - string embeddedReportsUrlStep2 = System.Configuration.ConfigurationManager.AppSettings["embeddedReportsUrlStep2"]; - if (string.IsNullOrEmpty(embeddedReportsUrlStep2)) - { - throw new DuradosException("Missing embeddedReportsUrlStep2 key in web config"); - } - string embeddedReportAppPropertyName = System.Configuration.ConfigurationManager.AppSettings["embeddedReportAppPropertyName"]; - if (string.IsNullOrEmpty(embeddedReportAppPropertyName)) - { - throw new DuradosException("Missing embeddedReportAppPropertyName key in web config"); - } - embeddedReportsConfig = new EmbeddedReportsConfig(embeddedReportsApiToken, embeddedReportsUrlStep1, embeddedReportsUrlStep2, embeddedReportAppPropertyName); - - string awsAccessKeyId = System.Configuration.ConfigurationManager.AppSettings["awsAccessKeyId"]; - if (string.IsNullOrEmpty(awsAccessKeyId)) - { - throw new DuradosException("Missing awsAccessKeyId key in web config"); - } - string awsSecretAccessKey = System.Configuration.ConfigurationManager.AppSettings["awsSecretAccessKey"]; - if (string.IsNullOrEmpty(awsSecretAccessKey)) - { - throw new DuradosException("Missing awsSecretAccessKey key in web config"); - } - string awsRegion = System.Configuration.ConfigurationManager.AppSettings["awsRegion"]; - if (string.IsNullOrEmpty(awsRegion)) - { - throw new DuradosException("Missing awsRegion key in web config"); - } - awsCredentials = new AwsCredentials() { AccessKeyID = awsAccessKeyId, SecretAccessKey = awsSecretAccessKey, Region = awsRegion }; - - LambdaArnRoot = System.Configuration.ConfigurationManager.AppSettings["lambdaArnRoot"]; - if (string.IsNullOrEmpty(LambdaArnRoot)) - { - throw new DuradosException("Missing lambdaArnRoot key in web config"); - } - - WebhooksParametersFileName = System.Configuration.ConfigurationManager.AppSettings["webhooksParametersFileName"]; - - cqlConfig = new CqlConfig(); - cqlConfig.ApiUrl = System.Configuration.ConfigurationManager.AppSettings["CqlApiUrl"]; - if (string.IsNullOrEmpty(cqlConfig.ApiUrl)) - { - throw new DuradosException("Missing CqlApiUrl key in web config"); - } - - cqlConfig.AuthorizationHeader = System.Configuration.ConfigurationManager.AppSettings["CqlAuthorizationHeader"]; - if (string.IsNullOrEmpty(cqlConfig.AuthorizationHeader)) - { - throw new DuradosException("Missing CqlAuthorizationHeader key in web config"); - } - - string cqlsFileName = System.Configuration.ConfigurationManager.AppSettings["CqlsFileName"]; - if (string.IsNullOrEmpty(cqlsFileName)) - { - throw new DuradosException("Missing CqlsFileName key in web config"); - } - cqlConfig.Cqls = GetCqls(cqlsFileName); - //GetWebhookParameters("AppCreated"); - - - LambdaArn = System.Configuration.ConfigurationManager.AppSettings["lambdaArn"]; - if (string.IsNullOrEmpty(LambdaArn)) - { - throw new DuradosException("Missing lambdaArn key in web config"); - } - - CronPrefix = System.Configuration.ConfigurationManager.AppSettings["cronPrefix"]; - if (string.IsNullOrEmpty(CronPrefix)) - { - throw new DuradosException("Missing CronPrefix key in web config"); - } - - CronAuthorizationHeader = System.Configuration.ConfigurationManager.AppSettings["cronAuthorizationHeader"]; - if (string.IsNullOrEmpty(CronAuthorizationHeader)) - { - throw new DuradosException("Missing CronAuthorizationHeader key in web config"); - } - - var actionParametersKbSizeLimit = System.Configuration.ConfigurationManager.AppSettings["actionParametersKbSizeLimit"]; - if (string.IsNullOrEmpty(actionParametersKbSizeLimit)) - { - throw new DuradosException("Missing actionParametersKbSizeLimit key in web config"); - } - - limits[Limits.Cron.ToString()] = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["cronLimit"]); - limits[Limits.ActionParametersKbSize.ToString()] = Convert.ToInt32(actionParametersKbSizeLimit); - - - var actionTimeMSecLimit = System.Configuration.ConfigurationManager.AppSettings["actionTimeMSecLimit"]; - if (string.IsNullOrEmpty(actionTimeMSecLimit)) - { - throw new DuradosException("Missing actionTimeMSecLimit key in web config"); - } - limits[Limits.ActionTimeMSec.ToString()] = Convert.ToInt32(actionTimeMSecLimit); - var uploadTimeMSecLimit = System.Configuration.ConfigurationManager.AppSettings["uploadTimeMSecLimit"]; - if (string.IsNullOrEmpty(uploadTimeMSecLimit)) - { - throw new DuradosException("Missing uploadTimeMSecLimit key in web config"); - } - limits[Limits.UploadTimeMSec.ToString()] = Convert.ToInt32(uploadTimeMSecLimit); - - LocalAddress = System.Configuration.ConfigurationManager.AppSettings["localAddress"] ?? "http://localhost:8080"; - - SocialRedirectHost = System.Configuration.ConfigurationManager.AppSettings["socialRedirectHost"]; - - ReturnAddressForMobile = System.Configuration.ConfigurationManager.AppSettings["returnAddressForMobile"] ?? "http://www.backandblabla.bla"; - - AwsAccountSecretKeyPart = System.Configuration.ConfigurationManager.AppSettings["AwsAccountSecretKeyPart"]; - } - - private static Dictionary GetCqls(string cqlsFileName) - { - Dictionary dic = new Dictionary(); - string jsonString = GetStringFromFile(cqlsFileName, ref cqlsJsonString).Replace("\\", "\\\\"); - - - Dictionary cqls = Durados.Web.Mvc.Controllers.Api.JsonConverter.Deserialize(jsonString); - - foreach (string name in cqls.Keys) - { - dic.Add(name, cqls[name].ToString()); - } - - return dic; - } - - - - private static AwsCredentials awsCredentials; - public static AwsCredentials AwsCredentials - { - get - { - return awsCredentials; - } - } - - public static string GetConfigPath(string filename) - { - //if (ConfigPath.StartsWith("~")) - // return System.Web.HttpContext.Current.Server.MapPath(ConfigPath + filename); - //else - // return ConfigPath + filename.Replace('/','\\'); - - return GetConfigPath(filename, ConfigPath); - } - - public static string GetConfigPath(string filename, string configPath) - { - if (configPath.StartsWith("~")) - return System.Web.HttpContext.Current.Server.MapPath(configPath + filename); - else - return configPath + filename.Replace('/', '\\'); - } - - public static string GetConfigPath(string filename, SqlProduct sqlProduct) - { - string key = sqlProduct.ToString() + "ConfigPath"; - string configPath = System.Configuration.ConfigurationManager.AppSettings[key] ?? ConfigPath; - - return GetConfigPath(filename, configPath); - } - - public static string GetUploadPath(SqlProduct sqlProduct) - { - string key = sqlProduct.ToString() + "UploadPath"; - string uploadPath = System.Configuration.ConfigurationManager.AppSettings[key]; - - if (string.IsNullOrEmpty(uploadPath)) - return System.Web.HttpContext.Current.Server.MapPath("/Uploads/"); - else if (uploadPath.StartsWith("~")) - return System.Web.HttpContext.Current.Server.MapPath(uploadPath); - else - return uploadPath; - } - - public static string GetDeploymentPath(string filename) - { - return System.Web.HttpContext.Current.Server.MapPath("~/Deployment/") + filename; - - } - - public static string Version = null; - - public static Dictionary ProductsPort { get; private set; } - public static bool SplitProducts { get; private set; } - public static string AzureStorageUrl { get; private set; } - public static string AzureStorageAccountName { get; private set; } - public static string AzureStorageAccountKey { get; private set; } - public static string DefaultUploadName { get; private set; } - public static int DefaultImageHeight { get; private set; } - public static string ConfigAzureStorageAccountName { get; private set; } - public static string ConfigAzureStorageAccountKey { get; private set; } - public static string[] ApiUrls { get; private set; } - - public static string AzureCacheAccountKey { get; private set; } - public static string AzureCacheAccountName { get; private set; } - public static string AzureCacheUrl { get; private set; } - public static int AzureCachePort { get; private set; } - public static string UserPreviewUrl { get; private set; } - public static string S3Bucket { get; private set; } - public static string S3FilesBucket { get; private set; } - public static string SendWelcomeEmail { get; private set; } - public static string[] DevUsers { get; private set; } - - public static string ParseConverterMasterKey { get; private set; } - - public static string LambdaArn { get; private set; } - public static string LambdaArnRoot { get; private set; } - - public static string CronPrefix { get; private set; } - public static string CronAuthorizationHeader { get; private set; } - - - public static string ParseConverterAdminKey { get; private set; } - public static string ParseConverterObjectName { get; private set; } - public static string NodeJSBucket { get; private set; } - public static string AppLockedMessage { get; private set; } - public static string ExcludedEmailDomains { get; private set; } - public static string ReportConnectionString { get; private set; } - - public static TimeSpan AzureCacheUpdateInterval { get; private set; } - - public static string ConfigPath { get; private set; } - - public static bool DownloadDenyPolicy { get; private set; } - public static string[] AllowedDownloadFileTypes { get; private set; } - public static string[] DenyDownloadFileTypes { get; private set; } - - private Durados.Data.ICache mapsCache = null; - public static Dictionary DnsAliases = null; - private IPersistency persistency = null; - private static bool multiTenancy = false; - private static string duradosAppPrefix; - private static string duradosAppSysPrefix; - private static bool cloud = false; - private static bool skin = false; - private static bool useSecureConnection = false; - private static bool debug = false; - private static bool dropAppDatabase = true; - private static int appNameMax = 32; - private static string host = "durados.com"; - private static int poolCreator = 5555; - private static bool poolShouldBeUsed = false; - - private static string redisConnectionString = ""; - private static string redisHostAndPort = ""; - - private static string mainAppConfigName = "backand"; - private static bool hostByUs = false; - private static string duradosAppName = "www"; - private static string demoAzureUsername = "itayher"; - private static string demoAzurePassword = "Durados2012"; - private static string demoSqlUsername = "durados"; - private static string demoSqlPassword = "durados"; - private static string demoDatabaseName = "Northwind"; - private static string demoConfigFilename = "Northwind"; - private static string demoAzureServer = "tcp:d9gwdrhh5n.database.windows.net,1433"; - private static string demoOnPremiseServer = @"durados.info\sqlexpress"; - private static bool demoCreatePending = true; - private static int demoPendingNext = 5; - private static string demoFtpTempHost = "temp"; - private static string demoFtpHost = "durados.info"; - private static string demoFtpPort = "21"; - private static long demoFtpFileSizeLimitKb = 1024; - private static long demoFtpFolderSizeLimitKb = 1024; - private static string demoFtpPhysicalPath = @"C:\FTP\"; - private static string demoUploadSourcePath = @"C:\Dev\Demo\"; - private static string demoOnPremiseSourcePath = @"C:\Dev\Databases\"; - private static string demoFtpUser = "itay"; - private static string demoFtpPassword = "dio2008"; - private static bool allowLocalConnection = false; - private static PendingPool azureDatabasePendingPool; - private static PendingPool onPremiseDatabasePendingPool; - private static string PandingDatabaseSuffix = "Pending"; - private static bool privateCloud = false; - - private static bool downloadDenyPolicy = true; - private static string allowedDownloadFileTypesDefault = "jpg,png,gif,pdf,docx,doc,xls,xlsx,pptx,ppt"; - private static string denyDownloadFileTypesDefault = "ade,adp,app,bas,bat,chm,cmd,cpl,crt,csh,exe,fxp,hlp,hta,inf,ins,isp,ksh,Lnk,mda,mdb,mde,mdt,mdt,mdw,mdz,msc,msi,msp,mst,ops,pcd,pif,prf,prg,pst,reg,scf,scr,sct,shb,shs,url,vb,vbe,vbs,wsc,wsf,wsh,config,dll"; - private static string downloadActionName = "Download"; - private static string azureAppPrefix = "app"; - - private static int plugInSampleGenerationCount = 5; - private static string superDeveloper = "dev@devitout.com"; - private static string adminButtonText = "Admin"; - private static string publicButtonText = "Public"; - public static bool OldAdminHttp = false; - - private static string reservedAppNames = "api"; - - private Map duradosMap = null; - System.Data.SqlClient.SqlConnectionStringBuilder builder = new System.Data.SqlClient.SqlConnectionStringBuilder(); - - private static CqlConfig cqlConfig; - public static string GetAdminButtonText() - { - return adminButtonText; - } - - public static string GetPublicButtonText() - { - return publicButtonText; - } - - public static string GetAdminButtonUrl(Map map) - { - return "/Home/Default?workspaceId=" + map.Database.GetAdminWorkspaceId() + "&menuId=10001"; - } - - public static string GetPublicButtonUrl(Map map) - { - return "/Home/Default?workspaceId=" + map.Database.GetPublicWorkspaceId(); - } - - public static bool IsSuperDeveloper(string userName) - { - if (string.IsNullOrEmpty(userName) && HttpContext.Current.User != null && HttpContext.Current.User.Identity != null && HttpContext.Current.User.Identity.Name != null) - userName = HttpContext.Current.User.Identity.Name; - return !string.IsNullOrEmpty(userName) && userName.Equals(SuperDeveloper); - } - - protected virtual void InitPersistency() - { - if (multiTenancy) - { - - - IPersistency sqlPersistency = GetNewPersistency(); - sqlPersistency.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["MapsConnectionString"].ConnectionString; - if (System.Configuration.ConfigurationManager.ConnectionStrings["SystemMapsConnectionString"] == null) - throw new DuradosException("Please add SystemMapsConnectionString to the web.config connection strings"); - sqlPersistency.SystemConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["SystemMapsConnectionString"].ConnectionString; - - persistency = sqlPersistency; - builder.ConnectionString = sqlPersistency.ConnectionString; - - Durados.DataAccess.ConfigAccess.storage = new Map(); - Durados.DataAccess.ConfigAccess.multiTenancy = multiTenancy; - Durados.DataAccess.ConfigAccess.cloud = cloud; - - - } - } - - - - public static string GetPendingDatabase(string template) - { - string next; - if (template == "1") - next = azureDatabasePendingPool.Next().ToString(); - else - next = onPremiseDatabasePendingPool.Next().ToString(); - return demoDatabaseName + PandingDatabaseSuffix + next; - } - - public static CqlConfig CqlConfig - { - get - { - return cqlConfig; - } - } - - public virtual IPersistency GetNewPersistency() - { - return new SqlPersistency(); - } - - public static bool PrivateCloud - { - get - { - return privateCloud; - } - } - - public static bool DropAppDatabase - { - get - { - return dropAppDatabase; - } - } - - public static bool AllowLocalConnection - { - get - { - return allowLocalConnection; - } - } - - public static string DemoFtpPhysicalPath - { - get - { - return demoFtpPhysicalPath; - } - } - - public static string DemoUploadSourcePath - { - get - { - return demoUploadSourcePath; - } - } - - - public static string DemoOnPremiseSourcePath - { - get - { - return demoOnPremiseSourcePath; - } - } - - public static string DemoFtpPassword - { - get - { - return demoFtpPassword; - } - } - - public static string DemoFtpUser - { - get - { - return demoFtpUser; - } - } - - public static string DemoFtpHost - { - get - { - return demoFtpHost; - } - } - public static int PoolCreator - { - get - { - return poolCreator; - } - } - - public static string RedisConnectionString - { - get - { - return redisConnectionString; - } - } - - public static string RedisHostAndPort - { - get - { - return redisHostAndPort; - } - } - - public static bool PoolShouldBeUsed - { - get - { - return poolShouldBeUsed; - } - } - - - - - public static string DemoFtpPort - { - get - { - return demoFtpPort; - } - } - - public static long DemoFtpFileSizeLimitKb - { - get - { - return demoFtpFileSizeLimitKb; - } - } - - public static long DemoFtpFolderSizeLimitKb - { - get - { - return demoFtpFolderSizeLimitKb; - } - } - - public static string DemoFtpTempHost - { - get - { - return demoFtpTempHost; - } - } - - public static int DemoPendingNext - { - get - { - return demoPendingNext; - } - } - - public static bool DemoCreatePending - { - get - { - return demoCreatePending; - } - } - - public static string DemoConfigFilename - { - get - { - return demoConfigFilename; - } - } - - public static string DemoDatabaseName - { - get - { - return demoDatabaseName; - } - } - - public static string DemoAzureUsername - { - get - { - return demoAzureUsername; - } - } - - public static string DemoAzurePassword - { - get - { - return demoAzurePassword; - } - } - - public static string DemoSqlUsername - { - get - { - return demoSqlUsername; - } - } - - public static string DemoSqlPassword - { - get - { - return demoSqlPassword; - } - } - - public static string DemoAzureServer - { - get - { - return demoAzureServer; - } - } - - public static string DemoOnPremiseServer - { - get - { - return demoOnPremiseServer; - } - } - - public static string Host - { - get - { - return host; - } - } - - public static bool HostByUs - { - get - { - return hostByUs; - } - } - - public static string DuradosAppName - { - get - { - return duradosAppName; - } - } + public class Maps + { + private static Maps instance; - public static bool Debug + public static string GetInMemoryKey() { - get + try { - return debug; + if (System.Web.HttpContext.Current != null && System.Web.HttpContext.Current.Request != null) + return System.Web.HttpContext.Current.Request.Headers["TestKey"]; + return null; } - } - - public static bool UseSecureConnection - { - get + catch { - return useSecureConnection; + return null; } } - public static int AppNameMax + public static bool IsInMemoryMode() { - get - { - return appNameMax; - } + return GetInMemoryKey() != null; } - public static string SuperDeveloper + public string[] GetVersions(string name) { - get - { - return superDeveloper; - } - } + int? id = AppExists(name); + if (!id.HasValue) + return null; + string containerName = Maps.DuradosAppPrefix.Replace("_", "").Replace(".", "").ToLower() + id.ToString(); + CloudBlobContainer container = GetContainer(containerName); - public static int PlugInSampleGenerationCount - { - get - { - return plugInSampleGenerationCount; - } + List versions = (new Durados.Web.Mvc.Azure.BlobBackup()).GetVersions(container); + + return versions.ToArray(); } - public string ConnectionString + public void Restore(string name, string version = null) { - get + int? id = AppExists(name); + if (!id.HasValue) + return; + + string containerName = Maps.DuradosAppPrefix.Replace("_", "").Replace(".", "").ToLower() + id.ToString(); + CloudBlobContainer container = GetContainer(containerName); + + if (version == null) { - return persistency.ConnectionString; + (new Durados.Web.Mvc.Azure.BlobBackup()).RestoreSync(container, containerName); } - } - public string SystemConnectionString - { - get + else { - return persistency.SystemConnectionString; + (new Durados.Web.Mvc.Azure.BlobBackup()).CopyBack(container, version, containerName); } - } - public static bool MultiTenancy - { - get + containerName += "xml"; + container = GetContainer(containerName); + if (version == null) { - return multiTenancy; + (new Durados.Web.Mvc.Azure.BlobBackup()).RestoreSync(container, containerName); } - } - - public static bool Skin - { - get + else { - return skin; + (new Durados.Web.Mvc.Azure.BlobBackup()).CopyBack(container, version, containerName); } } - - public static string DuradosAppSysPrefix + public Dictionary GetAllConfigs(string id, string version) { - get - { - return duradosAppSysPrefix; - } - } - public static string DuradosAppPrefix - { - get - { - return duradosAppPrefix; - } + string containerName = Maps.DuradosAppPrefix.Replace("_", "").Replace(".", "").ToLower() + id; + Dictionary configs = new Dictionary(); + configs.Add(containerName, GetConfig(containerName, version)); + configs.Add(containerName + "xml", GetSchemaConfig(id, version)); + return configs; } - - public static bool Cloud + public Stream GetSchemaConfig(string id, string version) { - get - { - return cloud; - } + string containerName = Maps.DuradosAppPrefix.Replace("_", "").Replace(".", "").ToLower() + id + "xml"; + return GetConfig(containerName, version); } - public static string DownloadActionName + public Stream GetConfig(string filename, string version) { - get + if (version == null) + version = string.Empty; + else + version = (new Durados.Web.Mvc.Azure.BlobBackup()).VersionPrefix + version; + + CloudBlobContainer container = GetContainer(filename); + var source = container.GetBlobReference(filename + version); + if (!source.Exists()) { - return downloadActionName; + throw new DuradosException("Could not find configuration version " + version); } + MemoryStream stream = new MemoryStream(); + source.DownloadToStream(stream); + return stream; } - public static string AzureAppPrefix + + Azure.DuradosStorage storage = new Azure.DuradosStorage(); + + private CloudBlobContainer GetContainer(string filename) { - get - { - return azureAppPrefix; - } + // Get a handle on account, create a blob service client and get container proxy + //var account = CloudStorageAccount.Parse(RoleEnvironment.GetConfigurationSettingValue("ConfigAzureStorage")); + //var client = account.CreateCloudBlobClient(); + //return client.GetContainerReference(RoleEnvironment.GetConfigurationSettingValue("configContainer")); + return storage.GetContainer(filename); } - public static string GetCurrentAppName() + static readonly object _object = new object(); + + private Maps() { - if (System.Web.HttpContext.Current == null) - { - return null; - } - if (System.Web.HttpContext.Current.Items.Contains(Database.AppName)) + InitPersistency(); + + if (multiTenancy) { - return System.Web.HttpContext.Current.Items[Database.AppName].ToString(); - } + lock (_object) + { + duradosMap = new DuradosMap(); + duradosMap.connectionString = persistency.ConnectionString; + duradosMap.systemConnectionString = persistency.ConnectionString; + duradosMap.ConfigFileName = Maps.GetConfigPath(Maps.GetmainAppConfigName() + ".xml"); + duradosMap.Url = GetAppUrl(duradosAppName); + duradosMap.Initiate(false); + //duradosMap.Logger.RedisProvider = SharedMemorySingeltone.Instance; + //duradosMap.Database.BackandSSO = true; - if (System.Web.HttpContext.Current == null) - throw new DuradosException("System.Web.HttpContext.Current is null"); - if (System.Web.HttpContext.Current.Request == null) - throw new DuradosException("System.Web.HttpContext.Current.Request is null"); - if (System.Web.HttpContext.Current.Request.Headers == null) - throw new DuradosException("System.Web.HttpContext.Current.Request.Headers is null"); - if (System.Web.HttpContext.Current.Request.Headers["Host"] == null) - throw new DuradosException("System.Web.HttpContext.Current.Request.Headers[\"Host\"] is null"); + View appView = (View)duradosMap.Database.Views["durados_App"]; - string headersHost = System.Web.HttpContext.Current.Request.Headers["Host"]; - string port = System.Web.HttpContext.Current.Request.Url.Port.ToString(); + appView.PermanentFilter = MainAppSchema.GetAppsPermanentFilter(); + appView.Controller = "MultiTenancy"; - if (headersHost.ToLower().Contains(host.ToLower())) - { + View connectionView = (View)duradosMap.Database.Views["durados_SqlConnection"]; + connectionView.PermanentFilter = "";// "DuradosUser = [Durados_User] ";//OR durados_SqlConnection.id in - return headersHost.Replace("." + host, string.Empty).Replace(":" + port, string.Empty); - } - else if (DnsAliases.ContainsKey(headersHost.ToLower().Replace(":" + port, string.Empty))) - { - return DnsAliases[headersHost.ToLower().Replace(":" + port, string.Empty)]; - } - else - return null; - } + mapsCache = CacheFactory.CreateCache("maps"); + /* TODO: Main MySQL depricated + LoadDnsAliases(); - public Map DuradosMap - { - get - { - return duradosMap; + PluginsCache = new Dictionary(); + + foreach (PlugInType plugInType in Enum.GetValues(typeof(PlugInType))) + { + PluginsCache.Add(plugInType, new PluginCache()); + } + */ + } } } - public Map GetMap() + + + + public static Maps Instance { - if (!multiTenancy) + get { - if (this.map == null) + if (instance == null) { - this.map = new Map(); - this.map.Initiate(false); + instance = new Maps(); } - - return this.map; - } - - Map m = GetMap(GetAppName()); - - if (System.Web.HttpContext.Current != null) - { - System.Web.HttpContext.Current.Items[Database.AppId] = m.Id; + return instance; } - - return m; } - string prevAppName = null; - - public string GetAppName() + public void WakeupCalltoApps() { - try + //ISqlMainSchema sqlSchema = MainAppSchema; + using (IDbConnection connection = MainAppSchema.GetNewConnection(duradosMap.connectionString)) { - if (System.Web.HttpContext.Current == null) - { - return null; - } - - //int l = System.Web.HttpContext.Current.Request.Url.Segments.Length; - - //if (l > 3) - //{ + connection.Open(); - // if (System.Web.HttpContext.Current.Items.Contains("xxxzzzzzzzzz") && System.Web.HttpContext.Current.Request.Url.Segments[l - 2] == "myAppConnection/" && System.Web.HttpContext.Current.Request.HttpMethod == "POST") - // { - // return System.Web.HttpContext.Current.Request.Url.Segments[l - 1]; - // } - //} + string sql = MainAppSchema.GetWakeupCallToAppSql(); - if (System.Web.HttpContext.Current.Items.Contains(Database.AppName)) + using (IDbCommand command = MainAppSchema.GetNewCommand(sql, connection)) { - return System.Web.HttpContext.Current.Items[Database.AppName].ToString(); - } + using (IDataReader reader = command.ExecuteReader()) + { + int urlOrdinal = reader.GetOrdinal("Url"); - string logText = "OriginalString: " + System.Web.HttpContext.Current.Request.Url.OriginalString + "; host:" + System.Web.HttpContext.Current.Request.Headers["Host"] + "; Referer: " + System.Web.HttpContext.Current.Request.Headers["Referer"]; - string appName = GetCurrentAppName(); - if (appName == null || prevAppName == null || !appName.Equals(prevAppName)) - DuradosMap.Logger.Log("Maps", "GetAppName", appName ?? string.Empty, null, 170, logText); - prevAppName = appName; - return appName; - } - catch (Exception exception) - { - DuradosMap.Logger.Log("Maps", "GetMap", "GetAppName", exception, 5, ""); - return null; + while (reader.Read()) + { + string url = reader.GetString(urlOrdinal).ToLower(); + //Infrastructure.ISendAsyncErrorHandler SendAsyncErrorHandler = null; + //ignore errors + Infrastructure.Http.CallWebRequest(url.Split('|')[2]); + } + } + } } - } - private Map map = null; - - private View GetAppView() - { - return (View)duradosMap.Database.Views["durados_App"]; } + /* TODO: Main MySQL depricated + private void LoadDnsAliases() + { + DnsAliases = new Dictionary(); + + using (SqlConnection connection = new SqlConnection(duradosMap.connectionString)) + { + connection.Open(); + + string sql = "SELECT dbo.durados_DnsAlias.Alias, dbo.durados_App.Name FROM dbo.durados_App with (NOLOCK) INNER JOIN dbo.durados_DnsAlias with (NOLOCK) ON dbo.durados_App.Id = dbo.durados_DnsAlias.AppId"; + + using (SqlCommand command = new SqlCommand(sql, connection)) + { + using (SqlDataReader reader = command.ExecuteReader()) + { + int aliasOrdinal = reader.GetOrdinal("Alias"); + int nameOrdinal = reader.GetOrdinal("Name"); + while (reader.Read()) + { + DnsAliases.Add(reader.GetString(aliasOrdinal).ToLower(), reader.GetString(nameOrdinal).ToLower()); + } + } + } + } + + } + */ + static Maps() + { + host = System.Configuration.ConfigurationManager.AppSettings["durados_host"] ?? "durados.com"; + poolCreator = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["poolCreator"] ?? "55555"); + poolShouldBeUsed = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["poolShouldBeUsed"] ?? "false"); + + redisConnectionString = System.Configuration.ConfigurationManager.AppSettings["redisConnectionString"] ?? "pub-redis-10938.us-east-1-4.3.ec2.garantiadata.com:10938,password=bell1234,allowAdmin=true"; + redisHostAndPort = System.Configuration.ConfigurationManager.AppSettings["redisHostAndPort"]; + + + mainAppConfigName = System.Configuration.ConfigurationManager.AppSettings["mainAppConfigName"] ?? "backand"; + hostByUs = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["hostByUs"] ?? "false"); + duradosAppName = System.Configuration.ConfigurationManager.AppSettings["durados_appName"] ?? "www"; + demoAzureUsername = System.Configuration.ConfigurationManager.AppSettings["demoAzureUsername"] ?? "itayher"; + demoAzurePassword = System.Configuration.ConfigurationManager.AppSettings["demoAzurePassword"] ?? "Durados2012"; + demoSqlUsername = System.Configuration.ConfigurationManager.AppSettings["demoSqlUsername"] ?? "durados"; + demoSqlPassword = System.Configuration.ConfigurationManager.AppSettings["demoSqlPassword"] ?? "durados"; + demoDatabaseName = System.Configuration.ConfigurationManager.AppSettings["demoDatabaseName"] ?? "Northwind"; + demoConfigFilename = System.Configuration.ConfigurationManager.AppSettings["demoConfigFilename"] ?? "Northwind"; + demoAzureServer = System.Configuration.ConfigurationManager.AppSettings["demoAzureServer"] ?? "tcp:d9gwdrhh5n.database.windows.net,1433"; + demoOnPremiseServer = System.Configuration.ConfigurationManager.AppSettings["demoOnPremiseServer"] ?? @"durados.info\sqlexpress"; + demoCreatePending = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["demoCreatePending"] ?? "true"); + demoPendingNext = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["demoPendingNext"] ?? "5"); + demoFtpTempHost = System.Configuration.ConfigurationManager.AppSettings["demoFtpTempHost"] ?? "temp"; + demoFtpHost = System.Configuration.ConfigurationManager.AppSettings["demoFtpHost"] ?? "durados.info"; + demoFtpPort = System.Configuration.ConfigurationManager.AppSettings["demoFtpPort"] ?? "21"; + demoFtpFileSizeLimitKb = Convert.ToInt64(System.Configuration.ConfigurationManager.AppSettings["demoFtpFileSizeLimitKb"] ?? "1024"); + demoFtpFolderSizeLimitKb = Convert.ToInt64(System.Configuration.ConfigurationManager.AppSettings["demoFtpFolderSizeLimitKb"] ?? "1024"); + demoFtpUser = System.Configuration.ConfigurationManager.AppSettings["demoFtpUser"] ?? "itay"; + demoFtpPassword = System.Configuration.ConfigurationManager.AppSettings["demoFtpPassword"] ?? "dio2008"; + demoFtpPhysicalPath = System.Configuration.ConfigurationManager.AppSettings["demoFtpPhysicalPath"] ?? @"C:\FTP\"; + demoUploadSourcePath = System.Configuration.ConfigurationManager.AppSettings["demoUploadSourcePath"] ?? "/Uploads/220/"; + demoOnPremiseSourcePath = System.Configuration.ConfigurationManager.AppSettings["demoOnPremiseSourcePath"] ?? @"C:\Dev\Databases\"; + allowLocalConnection = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["allowLocalConnection"] ?? "false"); + cloud = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["cloud"] ?? "false"); // false;// RoleEnvironment.IsAvailable;// + configCloudProvider = (CloudProvider) Enum.Parse(typeof(CloudProvider), (System.Configuration.ConfigurationManager.AppSettings["configCloudProvider"] ?? "Azure")); // false;// RoleEnvironment.IsAvailable;// + multiTenancy = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["multiTenancy"] ?? "false"); + useSecureConnection = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["UseSecureConnection"] ?? "false"); + skin = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["skin"] ?? "false"); + duradosAppPrefix = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["duradosAppSysPrefix"] ?? "durados_AppSys_"); + duradosAppSysPrefix = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["duradosAppPrefix"] ?? "durados_App_"); + debug = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["debug"] ?? "false"); + appNameMax = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["appNameMax"] ?? "32"); + dropAppDatabase = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["dropAppDatabase"] ?? "true"); + privateCloud = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["privateCloud"] ?? "false"); + ConfigPath = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["configPath"] ?? "~/Config/"); + plugInSampleGenerationCount = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["plugInSampleGenerationCount"] ?? "5"); + + superDeveloper = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["superDeveloper"] ?? "dev@devitout.com").ToLower(); + existOldAdmin = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["existOldAdmin"] ?? "false"); + DownloadDenyPolicy = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["DownloadDenyPolicy"] ?? "true"); + OldAdminHttp = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["OldAdminHttp"] ?? "false"); + AllowedDownloadFileTypes = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["AllowedDownloadFileTypes"] ?? allowedDownloadFileTypesDefault).Split(',').ToArray(); + DenyDownloadFileTypes = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["DenyDownloadFileTypes"] ?? denyDownloadFileTypesDefault).Split(',').ToArray(); + + + ConfigAwsStorageBucketName = System.Configuration.ConfigurationManager.AppSettings["ConfigAwsStorageBucketName"]; + if (ConfigAwsStorageBucketName == null) + { + throw new DuradosException("Please add the ConfigAwsStorageBucketName to the web.config."); + } + + ConfigAwsStorageAccessKeyID = System.Configuration.ConfigurationManager.AppSettings["ConfigAwsStorageAccessKeyID"]; + if (ConfigAwsStorageAccessKeyID == null) + { + throw new DuradosException("Please add the ConfigAwsStorageAccessKeyID to the web.config."); + } + + ConfigAwsStorageSecretAccessKey = System.Configuration.ConfigurationManager.AppSettings["ConfigAwsStorageSecretAccessKey"]; + if (ConfigAwsStorageSecretAccessKey == null) + { + throw new DuradosException("Please add the ConfigAwsStorageSecretAccessKey to the web.config."); + } + + ReservedAppNames = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["ReservedAppNames"] ?? reservedAppNames).Split(',').Select(k => k).ToHashSet(); + + azureDatabasePendingPool = new PendingPool(demoPendingNext); + onPremiseDatabasePendingPool = new PendingPool(demoPendingNext); + + AzureStorageAccountName = System.Configuration.ConfigurationManager.AppSettings["AzureStorageAccountName"]; + if (AzureStorageAccountName == null) + { + throw new DuradosException("Please add the AzureStorageAccountName to the web.config."); + } + + ConfigAzureStorageAccountName = System.Configuration.ConfigurationManager.AppSettings["ConfigAzureStorageAccountName"]; + if (ConfigAzureStorageAccountName == null) + { + throw new DuradosException("Please add the ConfigAzureStorageAccountName to the web.config."); + } + + AzureStorageAccountKey = System.Configuration.ConfigurationManager.AppSettings["AzureStorageAccountKey"]; + if (AzureStorageAccountKey == null) + { + throw new DuradosException("Please add the AzureStorageAccountKey to the web.config."); + } + + ConfigAzureStorageAccountKey = System.Configuration.ConfigurationManager.AppSettings["ConfigAzureStorageAccountKey"]; + if (ConfigAzureStorageAccountKey == null) + { + throw new DuradosException("Please add the ConfigAzureStorageAccountKey to the web.config."); + } + + + AzureStorageUrl = System.Configuration.ConfigurationManager.AppSettings["AzureStorageUrl"] ?? "http://{0}.blob.core.windows.net/{1}"; + + + AzureCacheAccountKey = System.Configuration.ConfigurationManager.AppSettings["AzureCacheAccountKey"]; + if (AzureCacheAccountKey == null) + { + throw new DuradosException("Please add the AzureCacheAccountKey to the web.config."); + } + + AzureCacheAccountName = System.Configuration.ConfigurationManager.AppSettings["AzureCacheAccountName"]; + if (AzureCacheAccountName == null) + { + throw new DuradosException("Please add the AzureCacheAccountName to the web.config."); + } + + AzureCacheUrl = System.Configuration.ConfigurationManager.AppSettings["AzureCacheUrl"]; + if (AzureCacheUrl == null) + { + throw new DuradosException("Please add the AzureCacheUrl to the web.config."); + } + + + + AzureCachePort = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["AzureCachePort"] ?? "22233"); + + AzureCacheUpdateInterval = new TimeSpan(0, 0, Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["AzureCacheUpdateInterval"] ?? "60")); + + DefaultUploadName = System.Configuration.ConfigurationManager.AppSettings["DefaultUploadName"] ?? "DefaultUpload"; + + DefaultImageHeight = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["DefaultImageHeight"] ?? "80"); + + SplitProducts = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["SplitProducts"] ?? "true"); + + ProductsPort = new Dictionary(); + + foreach (SqlProduct sqlProduct in Enum.GetValues(typeof(SqlProduct))) + { + ProductsPort.Add(sqlProduct, Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings[sqlProduct.ToString() + "Port"] ?? "80")); + } + + ApiUrls = (System.Configuration.ConfigurationManager.AppSettings["apiUrls"] ?? string.Empty).Split(';'); + + UserPreviewUrl = System.Configuration.ConfigurationManager.AppSettings["UserPreviewUrl"] ?? ".backand.loc:4012/"; + + S3Bucket = System.Configuration.ConfigurationManager.AppSettings["S3Bucket"]; + if (string.IsNullOrEmpty(S3Bucket)) + { + throw new DuradosException("Missing S3Bucket key in web config"); + } + + S3FilesBucket = System.Configuration.ConfigurationManager.AppSettings["S3FilesBucket"]; + + if (string.IsNullOrEmpty(S3FilesBucket)) + { + throw new DuradosException("Missing S3FilesBucket key in web config"); + } + + ParseConverterMasterKey = System.Configuration.ConfigurationManager.AppSettings["ParseConverterMasterKey"]; + if (string.IsNullOrEmpty(ParseConverterMasterKey)) + { + throw new DuradosException("Missing ParseConverterMasterKey key in web config"); + } + + ParseConverterAdminKey = System.Configuration.ConfigurationManager.AppSettings["ParseConverterAdminKey"]; + if (string.IsNullOrEmpty(ParseConverterAdminKey)) + { + throw new DuradosException("Missing ParseConverterAdminKey key in web config"); + } + + ParseConverterObjectName = System.Configuration.ConfigurationManager.AppSettings["ParseConverterObjectName"]; + if (string.IsNullOrEmpty(ParseConverterObjectName)) + { + throw new DuradosException("Missing ParseConverterObjectName key in web config"); + } + + AppLockedMessage = System.Configuration.ConfigurationManager.AppSettings["AppLockedMessage"]; + + if (string.IsNullOrEmpty(AppLockedMessage)) + { + throw new DuradosException("Missing AppLockedMessage key in web config"); + } + + NodeJSBucket = System.Configuration.ConfigurationManager.AppSettings["NodeJSBucket"]; + + if (string.IsNullOrEmpty(NodeJSBucket)) + { + throw new DuradosException("Missing NodeJSBucket key in web config"); + } + + + ExcludedEmailDomains = System.Configuration.ConfigurationManager.AppSettings["ExcludedEmailDomains"]; + + if (string.IsNullOrEmpty(ExcludedEmailDomains)) + { + throw new DuradosException("Missing ExcludedEmailDomains key in web config"); + } + + ReportConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["reportConnectionString"].ConnectionString; + + if (string.IsNullOrEmpty(ReportConnectionString)) + { + throw new DuradosException("Missing reportConnectionString key in web config"); + } + + SendWelcomeEmail = System.Configuration.ConfigurationManager.AppSettings["SendWelcomeEmail"] ?? "true"; + + System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Ssl3 | System.Net.SecurityProtocolType.Tls | System.Net.SecurityProtocolType.Tls11 | System.Net.SecurityProtocolType.Tls12; + + + DevUsers = (System.Configuration.ConfigurationManager.AppSettings["DevUsers"] ?? string.Empty).Split(','); + + string embeddedReportsApiToken = System.Configuration.ConfigurationManager.AppSettings["embeddedReportsApiToken"]; + if (string.IsNullOrEmpty(embeddedReportsApiToken)) + { + throw new DuradosException("Missing embeddedReportsApiToken key in web config"); + } + string embeddedReportsUrlStep1 = System.Configuration.ConfigurationManager.AppSettings["embeddedReportsUrlStep1"]; + if (string.IsNullOrEmpty(embeddedReportsUrlStep1)) + { + throw new DuradosException("Missing embeddedReportsUrlStep1 key in web config"); + } + string embeddedReportsUrlStep2 = System.Configuration.ConfigurationManager.AppSettings["embeddedReportsUrlStep2"]; + if (string.IsNullOrEmpty(embeddedReportsUrlStep2)) + { + throw new DuradosException("Missing embeddedReportsUrlStep2 key in web config"); + } + string embeddedReportAppPropertyName = System.Configuration.ConfigurationManager.AppSettings["embeddedReportAppPropertyName"]; + if (string.IsNullOrEmpty(embeddedReportAppPropertyName)) + { + throw new DuradosException("Missing embeddedReportAppPropertyName key in web config"); + } + embeddedReportsConfig = new EmbeddedReportsConfig(embeddedReportsApiToken, embeddedReportsUrlStep1, embeddedReportsUrlStep2, embeddedReportAppPropertyName); + + string awsAccessKeyId = System.Configuration.ConfigurationManager.AppSettings["awsAccessKeyId"]; + if (string.IsNullOrEmpty(awsAccessKeyId)) + { + throw new DuradosException("Missing awsAccessKeyId key in web config"); + } + string awsSecretAccessKey = System.Configuration.ConfigurationManager.AppSettings["awsSecretAccessKey"]; + if (string.IsNullOrEmpty(awsSecretAccessKey)) + { + throw new DuradosException("Missing awsSecretAccessKey key in web config"); + } + string awsRegion = System.Configuration.ConfigurationManager.AppSettings["awsRegion"]; + if (string.IsNullOrEmpty(awsRegion)) + { + throw new DuradosException("Missing awsRegion key in web config"); + } + awsCredentials = new AwsCredentials() { AccessKeyID = awsAccessKeyId, SecretAccessKey = awsSecretAccessKey, Region = awsRegion }; + + LambdaArnRoot = System.Configuration.ConfigurationManager.AppSettings["lambdaArnRoot"]; + if (string.IsNullOrEmpty(LambdaArnRoot)) + { + throw new DuradosException("Missing lambdaArnRoot key in web config"); + } + + WebhooksParametersFileName = System.Configuration.ConfigurationManager.AppSettings["webhooksParametersFileName"]; + + cqlConfig = new CqlConfig(); + cqlConfig.ApiUrl = System.Configuration.ConfigurationManager.AppSettings["CqlApiUrl"]; + if (string.IsNullOrEmpty(cqlConfig.ApiUrl)) + { + throw new DuradosException("Missing CqlApiUrl key in web config"); + } + + cqlConfig.AuthorizationHeader = System.Configuration.ConfigurationManager.AppSettings["CqlAuthorizationHeader"]; + if (string.IsNullOrEmpty(cqlConfig.AuthorizationHeader)) + { + throw new DuradosException("Missing CqlAuthorizationHeader key in web config"); + } + + string cqlsFileName = System.Configuration.ConfigurationManager.AppSettings["CqlsFileName"]; + if (string.IsNullOrEmpty(cqlsFileName)) + { + throw new DuradosException("Missing CqlsFileName key in web config"); + } + cqlConfig.Cqls = GetCqls(cqlsFileName); + //GetWebhookParameters("AppCreated"); + + + LambdaArn = System.Configuration.ConfigurationManager.AppSettings["lambdaArn"]; + if (string.IsNullOrEmpty(LambdaArn)) + { + throw new DuradosException("Missing lambdaArn key in web config"); + } + + CronPrefix = System.Configuration.ConfigurationManager.AppSettings["cronPrefix"]; + if (string.IsNullOrEmpty(CronPrefix)) + { + throw new DuradosException("Missing CronPrefix key in web config"); + } + + CronAuthorizationHeader = System.Configuration.ConfigurationManager.AppSettings["cronAuthorizationHeader"]; + if (string.IsNullOrEmpty(CronAuthorizationHeader)) + { + throw new DuradosException("Missing CronAuthorizationHeader key in web config"); + } + + var actionParametersKbSizeLimit = System.Configuration.ConfigurationManager.AppSettings["actionParametersKbSizeLimit"]; + if (string.IsNullOrEmpty(actionParametersKbSizeLimit)) + { + throw new DuradosException("Missing actionParametersKbSizeLimit key in web config"); + } + + limits[Limits.Cron.ToString()] = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["cronLimit"]); + limits[Limits.ActionParametersKbSize.ToString()] = Convert.ToInt32(actionParametersKbSizeLimit); + + + var actionTimeMSecLimit = System.Configuration.ConfigurationManager.AppSettings["actionTimeMSecLimit"]; + if (string.IsNullOrEmpty(actionTimeMSecLimit)) + { + throw new DuradosException("Missing actionTimeMSecLimit key in web config"); + } + limits[Limits.ActionTimeMSec.ToString()] = Convert.ToInt32(actionTimeMSecLimit); + var uploadTimeMSecLimit = System.Configuration.ConfigurationManager.AppSettings["uploadTimeMSecLimit"]; + if (string.IsNullOrEmpty(uploadTimeMSecLimit)) + { + throw new DuradosException("Missing uploadTimeMSecLimit key in web config"); + } + limits[Limits.UploadTimeMSec.ToString()] = Convert.ToInt32(uploadTimeMSecLimit); + + LocalAddress = System.Configuration.ConfigurationManager.AppSettings["localAddress"] ?? "http://localhost:8080"; + + SocialRedirectHost = System.Configuration.ConfigurationManager.AppSettings["socialRedirectHost"]; + + ReturnAddressForMobile = System.Configuration.ConfigurationManager.AppSettings["returnAddressForMobile"] ?? "http://www.backandblabla.bla"; + + AwsAccountSecretKeyPart = System.Configuration.ConfigurationManager.AppSettings["AwsAccountSecretKeyPart"]; + //if (string.IsNullOrEmpty(AwsAccountSecretKeyPart)) + // throw new DuradosException("Missing AwsAccountSecretKeyPart key in web config"); + + + MasterOpsAuth = System.Configuration.ConfigurationManager.AppSettings["masterOpsAuth"]; + if (string.IsNullOrEmpty(MasterOpsAuth)) + throw new DuradosException("Missing MasterOpsAuth key in web config"); + } + + private static Dictionary GetCqls(string cqlsFileName) + { + Dictionary dic = new Dictionary(); + string jsonString = GetStringFromFile(cqlsFileName, ref cqlsJsonString).Replace("\\", "\\\\"); + + + Dictionary cqls = Durados.Web.Mvc.Controllers.Api.JsonConverter.Deserialize(jsonString); + + foreach (string name in cqls.Keys) + { + dic.Add(name, cqls[name].ToString()); + } + + return dic; + } + + + + private static AwsCredentials awsCredentials; + public static AwsCredentials AwsCredentials + { + get + { + return awsCredentials; + } + } + + public static string GetConfigPath(string filename) + { + //if (ConfigPath.StartsWith("~")) + // return System.Web.HttpContext.Current.Server.MapPath(ConfigPath + filename); + //else + // return ConfigPath + filename.Replace('/','\\'); + + return GetConfigPath(filename, ConfigPath); + } + + public static string GetConfigPath(string filename, string configPath) + { + if (configPath.StartsWith("~")) + return System.Web.HttpContext.Current.Server.MapPath(configPath + filename); + else + return configPath + filename.Replace('/', '\\'); + } + + public static string GetConfigPath(string filename, SqlProduct sqlProduct) + { + string key = sqlProduct.ToString() + "ConfigPath"; + string configPath = System.Configuration.ConfigurationManager.AppSettings[key] ?? ConfigPath; + + return GetConfigPath(filename, configPath); + } + + public static string GetUploadPath(SqlProduct sqlProduct) + { + string key = sqlProduct.ToString() + "UploadPath"; + string uploadPath = System.Configuration.ConfigurationManager.AppSettings[key]; + + if (string.IsNullOrEmpty(uploadPath)) + return System.Web.HttpContext.Current.Server.MapPath("/Uploads/"); + else if (uploadPath.StartsWith("~")) + return System.Web.HttpContext.Current.Server.MapPath(uploadPath); + else + return uploadPath; + } + + public static string GetDeploymentPath(string filename) + { + return System.Web.HttpContext.Current.Server.MapPath("~/Deployment/") + filename; + + } + + public static string Version = null; + + public static Dictionary ProductsPort { get; private set; } + public static bool SplitProducts { get; private set; } + public static string AzureStorageUrl { get; private set; } + public static string AzureStorageAccountName { get; private set; } + public static string AzureStorageAccountKey { get; private set; } + public static string DefaultUploadName { get; private set; } + public static int DefaultImageHeight { get; private set; } + public static string ConfigAzureStorageAccountName { get; private set; } + public static string ConfigAzureStorageAccountKey { get; private set; } + + public static string ConfigAwsStorageBucketName { get; private set; } + public static string ConfigAwsStorageAccessKeyID { get; private set; } + public static string ConfigAwsStorageSecretAccessKey { get; private set; } + + public static string[] ApiUrls { get; private set; } + + public static string AzureCacheAccountKey { get; private set; } + public static string AzureCacheAccountName { get; private set; } + public static string AzureCacheUrl { get; private set; } + public static int AzureCachePort { get; private set; } + public static string UserPreviewUrl { get; private set; } + public static string S3Bucket { get; private set; } + public static string S3FilesBucket { get; private set; } + public static string SendWelcomeEmail { get; private set; } + public static string[] DevUsers { get; private set; } + + public static string ParseConverterMasterKey { get; private set; } + + public static string LambdaArn { get; private set; } + public static string LambdaArnRoot { get; private set; } + + public static string CronPrefix { get; private set; } + public static string CronAuthorizationHeader { get; private set; } + + + public static string ParseConverterAdminKey { get; private set; } + public static string ParseConverterObjectName { get; private set; } + public static string NodeJSBucket { get; private set; } + public static string AppLockedMessage { get; private set; } + public static string ExcludedEmailDomains { get; private set; } + public static string ReportConnectionString { get; private set; } - /***Return - Plugin Type (Id) or 0 if value wasn't set or exist*/ - private int GetPluginType(int appId) - { - SqlAccess sql = new SqlAccess(); - - string sSqlCommand = "SELECT dbo.durados_PlugInSite.PlugInId "; - sSqlCommand += "from dbo.durados_PlugInSite with(nolock), dbo.durados_PlugInSiteApp with(nolock) "; - sSqlCommand += "where dbo.durados_PlugInSite.Id = dbo.durados_PlugInSiteApp.PlugInSiteId "; - sSqlCommand += " and dbo.durados_PlugInSiteApp.AppId = " + appId + " "; - - object scalar = sql.ExecuteScalar(duradosMap.connectionString, sSqlCommand); + public static TimeSpan AzureCacheUpdateInterval { get; private set; } - if (scalar.Equals(string.Empty) || scalar == null || scalar == DBNull.Value) - return 0; - else - return Convert.ToInt32(scalar); - } + public static string ConfigPath { get; private set; } - public int GetPluginSiteId(int appId) + public static bool DownloadDenyPolicy { get; private set; } + public static string[] AllowedDownloadFileTypes { get; private set; } + public static string[] DenyDownloadFileTypes { get; private set; } + + private Durados.Data.ICache mapsCache = null; + /* TODO: Main MySQL depricated + public static Dictionary DnsAliases = null; + * */ + private IPersistency persistency = null; + private static bool multiTenancy = false; + private static string duradosAppPrefix; + private static string duradosAppSysPrefix; + private static bool cloud = false; + private static CloudProvider configCloudProvider = CloudProvider.Azure; + + private static bool skin = false; + private static bool useSecureConnection = false; + private static bool debug = false; + private static bool dropAppDatabase = true; + private static int appNameMax = 32; + private static string host = "durados.com"; + private static int poolCreator = 5555; + private static bool poolShouldBeUsed = false; + + private static string redisConnectionString = ""; + private static string redisHostAndPort = ""; + + private static string mainAppConfigName = "backand"; + private static bool hostByUs = false; + private static string duradosAppName = "www"; + private static string demoAzureUsername = "itayher"; + private static string demoAzurePassword = "Durados2012"; + private static string demoSqlUsername = "durados"; + private static string demoSqlPassword = "durados"; + private static string demoDatabaseName = "Northwind"; + private static string demoConfigFilename = "Northwind"; + private static string demoAzureServer = "tcp:d9gwdrhh5n.database.windows.net,1433"; + private static string demoOnPremiseServer = @"durados.info\sqlexpress"; + private static bool demoCreatePending = true; + private static int demoPendingNext = 5; + private static string demoFtpTempHost = "temp"; + private static string demoFtpHost = "durados.info"; + private static string demoFtpPort = "21"; + private static long demoFtpFileSizeLimitKb = 1024; + private static long demoFtpFolderSizeLimitKb = 1024; + private static string demoFtpPhysicalPath = @"C:\FTP\"; + private static string demoUploadSourcePath = @"C:\Dev\Demo\"; + private static string demoOnPremiseSourcePath = @"C:\Dev\Databases\"; + private static string demoFtpUser = "itay"; + private static string demoFtpPassword = "dio2008"; + private static bool allowLocalConnection = false; + private static PendingPool azureDatabasePendingPool; + private static PendingPool onPremiseDatabasePendingPool; + private static string PandingDatabaseSuffix = "Pending"; + private static bool privateCloud = false; + + private static bool downloadDenyPolicy = true; + private static string allowedDownloadFileTypesDefault = "jpg,png,gif,pdf,docx,doc,xls,xlsx,pptx,ppt"; + private static string denyDownloadFileTypesDefault = "ade,adp,app,bas,bat,chm,cmd,cpl,crt,csh,exe,fxp,hlp,hta,inf,ins,isp,ksh,Lnk,mda,mdb,mde,mdt,mdt,mdw,mdz,msc,msi,msp,mst,ops,pcd,pif,prf,prg,pst,reg,scf,scr,sct,shb,shs,url,vb,vbe,vbs,wsc,wsf,wsh,config,dll"; + private static string downloadActionName = "Download"; + private static string azureAppPrefix = "app"; + + private static int plugInSampleGenerationCount = 5; + private static string superDeveloper = "dev@devitout.com"; + private static bool existOldAdmin = true; + private static string adminButtonText = "Admin"; + private static string publicButtonText = "Public"; + public static bool OldAdminHttp = false; + + private static string reservedAppNames = "api"; + + private Map duradosMap = null; + System.Data.Common.DbConnectionStringBuilder builder = null; + //public static ISqlMainSchema MainAppSchema = GetMainAppSchema(); + + private static ISqlMainSchema mainAppSqlSchema = null; + public static ISqlMainSchema MainAppSchema + { + get + { + if (mainAppSqlSchema == null) + { + string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["MapsConnectionString"].ConnectionString; + if (MySqlAccess.IsMySqlConnectionString(connectionString)) + mainAppSqlSchema = new MySqlMainSchema(); + else + mainAppSqlSchema = new SqlMainSchema(); + } + return mainAppSqlSchema; + } + } + + private static CqlConfig cqlConfig; + public static string GetAdminButtonText() + { + return adminButtonText; + } + + public static string GetPublicButtonText() + { + return publicButtonText; + } + + public static string GetAdminButtonUrl(Map map) + { + return "/Home/Default?workspaceId=" + map.Database.GetAdminWorkspaceId() + "&menuId=10001"; + } + + public static string GetPublicButtonUrl(Map map) + { + return "/Home/Default?workspaceId=" + map.Database.GetPublicWorkspaceId(); + } + + public static bool IsSuperDeveloper(string userName) + { + if (string.IsNullOrEmpty(userName) && HttpContext.Current.User != null && HttpContext.Current.User.Identity != null && HttpContext.Current.User.Identity.Name != null) + userName = HttpContext.Current.User.Identity.Name; + return !string.IsNullOrEmpty(userName) && userName.Equals(SuperDeveloper); + } + + protected virtual void InitPersistency() + { + if (multiTenancy) + { + + + IPersistency sqlPersistency = GetNewPersistency(); + sqlPersistency.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["MapsConnectionString"].ConnectionString; + + if (System.Configuration.ConfigurationManager.ConnectionStrings["SystemMapsConnectionString"] == null) + throw new DuradosException("Please add SystemMapsConnectionString to the web.config connection strings"); + sqlPersistency.SystemConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["SystemMapsConnectionString"].ConnectionString; + + persistency = sqlPersistency; + builder = GetMapsConnectionStringBuilder(sqlPersistency.ConnectionString); + //mainAppSqlSchema = MainAppSchema(); + + Durados.DataAccess.ConfigAccess.storage = new Map(); + Durados.DataAccess.ConfigAccess.multiTenancy = multiTenancy; + Durados.DataAccess.ConfigAccess.cloud = cloud; + + + } + } + + public static System.Data.Common.DbConnectionStringBuilder GetMapsConnectionStringBuilder(string connectionString= null) + { + connectionString = connectionString ?? Maps.Instance.ConnectionString; + + if (MySqlAccess.IsMySqlConnectionString(connectionString)) + return new MySql.Data.MySqlClient.MySqlConnectionStringBuilder() { ConnectionString = connectionString }; + + return new System.Data.SqlClient.SqlConnectionStringBuilder() {ConnectionString = connectionString}; + } + + + + public static string GetPendingDatabase(string template) + { + string next; + if (template == "1") + next = azureDatabasePendingPool.Next().ToString(); + else + next = onPremiseDatabasePendingPool.Next().ToString(); + return demoDatabaseName + PandingDatabaseSuffix + next; + } + + public static CqlConfig CqlConfig + { + get + { + return cqlConfig; + } + } + + public virtual IPersistency GetNewPersistency() + { + return new SqlPersistency(); + } + + public static bool PrivateCloud + { + get + { + return privateCloud; + } + } + + public static bool DropAppDatabase + { + get + { + return dropAppDatabase; + } + } + + public static bool AllowLocalConnection + { + get + { + return allowLocalConnection; + } + } + + public static string DemoFtpPhysicalPath + { + get + { + return demoFtpPhysicalPath; + } + } + + public static string DemoUploadSourcePath + { + get + { + return demoUploadSourcePath; + } + } + + + public static string DemoOnPremiseSourcePath + { + get + { + return demoOnPremiseSourcePath; + } + } + + public static string DemoFtpPassword + { + get + { + return demoFtpPassword; + } + } + + public static string DemoFtpUser + { + get + { + return demoFtpUser; + } + } + + public static string DemoFtpHost + { + get + { + return demoFtpHost; + } + } + public static int PoolCreator + { + get + { + return poolCreator; + } + } + + public static string RedisConnectionString + { + get + { + return redisConnectionString; + } + } + + public static string RedisHostAndPort + { + get + { + return redisHostAndPort; + } + } + + public static bool PoolShouldBeUsed + { + get + { + return poolShouldBeUsed; + } + } + + + + + public static string DemoFtpPort + { + get + { + return demoFtpPort; + } + } + + public static long DemoFtpFileSizeLimitKb + { + get + { + return demoFtpFileSizeLimitKb; + } + } + + public static long DemoFtpFolderSizeLimitKb + { + get + { + return demoFtpFolderSizeLimitKb; + } + } + + public static string DemoFtpTempHost + { + get + { + return demoFtpTempHost; + } + } + + public static int DemoPendingNext + { + get + { + return demoPendingNext; + } + } + + public static bool DemoCreatePending + { + get + { + return demoCreatePending; + } + } + + public static string DemoConfigFilename + { + get + { + return demoConfigFilename; + } + } + + public static string DemoDatabaseName + { + get + { + return demoDatabaseName; + } + } + + public static string DemoAzureUsername + { + get + { + return demoAzureUsername; + } + } + + public static string DemoAzurePassword + { + get + { + return demoAzurePassword; + } + } + + public static string DemoSqlUsername + { + get + { + return demoSqlUsername; + } + } + + public static string DemoSqlPassword + { + get + { + return demoSqlPassword; + } + } + + public static string DemoAzureServer + { + get + { + return demoAzureServer; + } + } + + public static string DemoOnPremiseServer + { + get + { + return demoOnPremiseServer; + } + } + + public static string Host + { + get + { + return host; + } + } + + public static bool HostByUs + { + get + { + return hostByUs; + } + } + + public static string DuradosAppName + { + get + { + return duradosAppName; + } + } + + public static bool Debug + { + get + { + return debug; + } + } + + public static bool UseSecureConnection + { + get + { + return useSecureConnection; + } + } + + public static int AppNameMax + { + get + { + return appNameMax; + } + } + + public static string SuperDeveloper + { + get + { + return superDeveloper; + } + } + public static bool ExistsOldAdmin + { + get + { + return existOldAdmin; + } + } + + public static int PlugInSampleGenerationCount + { + get + { + return plugInSampleGenerationCount; + } + } + + public string ConnectionString + { + get + { + return persistency.ConnectionString; + } + } + public string SystemConnectionString + { + get + { + return persistency.SystemConnectionString; + } + } + + public static bool MultiTenancy + { + get + { + return multiTenancy; + } + } + + public static bool Skin + { + get + { + return skin; + } + } + + public static string DuradosAppSysPrefix + { + get + { + return duradosAppSysPrefix; + } + } + + public static string DuradosAppPrefix + { + get + { + return duradosAppPrefix; + } + } + + public static bool Cloud + { + get + { + return cloud; + } + } + + + public static CloudProvider ConfigCloudProvider + { + get + { + return configCloudProvider; + } + } + + public static string DownloadActionName + { + get + { + return downloadActionName; + } + } + public static string AzureAppPrefix + { + get + { + return azureAppPrefix; + } + } + + public static string GetCurrentAppName() + { + if (System.Web.HttpContext.Current == null) + { + return null; + } + if (System.Web.HttpContext.Current.Items.Contains(Database.AppName)) + { + return System.Web.HttpContext.Current.Items[Database.AppName].ToString(); + } + + if (System.Web.HttpContext.Current == null) + throw new DuradosException("System.Web.HttpContext.Current is null"); + if (System.Web.HttpContext.Current.Request == null) + throw new DuradosException("System.Web.HttpContext.Current.Request is null"); + if (System.Web.HttpContext.Current.Request.Headers == null) + throw new DuradosException("System.Web.HttpContext.Current.Request.Headers is null"); + if (System.Web.HttpContext.Current.Request.Headers["Host"] == null) + throw new DuradosException("System.Web.HttpContext.Current.Request.Headers[\"Host\"] is null"); + + string headersHost = System.Web.HttpContext.Current.Request.Headers["Host"]; + string port = System.Web.HttpContext.Current.Request.Url.Port.ToString(); + + if (headersHost.ToLower().Contains(host.ToLower())) + { + + return headersHost.Replace("." + host, string.Empty).Replace(":" + port, string.Empty); + } + /* TODO: Main MySQL depricated + else if (DnsAliases.ContainsKey(headersHost.ToLower().Replace(":" + port, string.Empty))) + { + return DnsAliases[headersHost.ToLower().Replace(":" + port, string.Empty)]; + } + */ + else + return null; + } + + public Map DuradosMap + { + get + { + return duradosMap; + } + } + + public Map GetMap() + { + if (!multiTenancy) + { + if (this.map == null) + { + this.map = new Map(); + this.map.Initiate(false); + } + + return this.map; + } + + Map m = GetMap(GetAppName()); + + if (System.Web.HttpContext.Current != null) + { + System.Web.HttpContext.Current.Items[Database.AppId] = m.Id; + } + + return m; + } + + string prevAppName = null; + + public string GetAppName() + { + try + { + if (System.Web.HttpContext.Current == null) + { + return null; + } + + //int l = System.Web.HttpContext.Current.Request.Url.Segments.Length; + + //if (l > 3) + //{ + + // if (System.Web.HttpContext.Current.Items.Contains("xxxzzzzzzzzz") && System.Web.HttpContext.Current.Request.Url.Segments[l - 2] == "myAppConnection/" && System.Web.HttpContext.Current.Request.HttpMethod == "POST") + // { + // return System.Web.HttpContext.Current.Request.Url.Segments[l - 1]; + // } + //} + + if (System.Web.HttpContext.Current.Items.Contains(Database.AppName)) + { + return System.Web.HttpContext.Current.Items[Database.AppName].ToString(); + } + + string logText = "OriginalString: " + System.Web.HttpContext.Current.Request.Url.OriginalString + "; host:" + System.Web.HttpContext.Current.Request.Headers["Host"] + "; Referer: " + System.Web.HttpContext.Current.Request.Headers["Referer"]; + string appName = GetCurrentAppName(); + if (appName == null || prevAppName == null || !appName.Equals(prevAppName)) + DuradosMap.Logger.Log("Maps", "GetAppName", appName ?? string.Empty, null, 170, logText); + prevAppName = appName; + return appName; + } + catch (Exception exception) + { + DuradosMap.Logger.Log("Maps", "GetMap", "GetAppName", exception, 5, ""); + return null; + } + } + + private Map map = null; + + private View GetAppView() + { + return (View)duradosMap.Database.Views["durados_App"]; + } + + /***Return - Plugin Type (Id) or 0 if value wasn't set or exist*/ + /* + * TODO: Main MySQL depricated + private int GetPluginType(int appId) + { + SqlAccess sql = new SqlAccess(); + + string sSqlCommand = "SELECT dbo.durados_PlugInSite.PlugInId "; + sSqlCommand += "from dbo.durados_PlugInSite with(nolock), dbo.durados_PlugInSiteApp with(nolock) "; + sSqlCommand += "where dbo.durados_PlugInSite.Id = dbo.durados_PlugInSiteApp.PlugInSiteId "; + sSqlCommand += " and dbo.durados_PlugInSiteApp.AppId = " + appId + " "; + + object scalar = sql.ExecuteScalar(duradosMap.connectionString, sSqlCommand); + + if (scalar.Equals(string.Empty) || scalar == null || scalar == DBNull.Value) + return 0; + else + return Convert.ToInt32(scalar); + } + + public int GetPluginSiteId(int appId) { SqlAccess sql = new SqlAccess(); @@ -1330,11 +1418,13 @@ public int GetPluginSiteId(int appId) else return Convert.ToInt32(scalar); } - private View GetDnsAliasView() - { - return (View)duradosMap.Database.Views["durados_DnsAlias"]; - } - + */ + /* TODO: Main MySQL depricated + private View GetDnsAliasView() + { + return (View)duradosMap.Database.Views["durados_DnsAlias"]; + } + */ public void Rename(string oldAppName, string newAppName) { @@ -1657,12 +1747,12 @@ private Map CreateMap(string appName, out bool newStructure) //Durados.Diagnostics.EventViewer.WriteEvent("appRow found for: " + appName + " id: " + id, System.Diagnostics.EventLogEntryType.SuccessAudit, 500); Map map = new Map(); - + /* TODO: Main MySQL depricated map.PlugInId = GetPluginType((int)id);/***Return - Plugin Type (Id) or 0 if value wasn't set or exist*/ //map.connectionString = persistency.GetConnection(appRow, builder).ToString(); - int sqlProduct = 1; + int sqlProduct = 3; int systemSqlProduct = 1; if (appRow.durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection == null) throw new DuradosException("The app " + appName + " is not connected. Please connect your app."); @@ -1781,7 +1871,7 @@ private Map CreateMap(string appName, out bool newStructure) map.Environment = appRow.IsEnvironmentNull() ? null : appRow.Environment; map.EnvVar = appRow.IsEnvVarNull() ? null : appRow.EnvVar; map.LoadLimits(); - + /* TODO: Main MySQL depricated int themeId = 0; string themeName = ""; string themePath = ""; @@ -1800,10 +1890,12 @@ private Map CreateMap(string appName, out bool newStructure) } map.Theme = new Theme() { Id = themeId, Name = themeName, Path = themePath }; + * */ if (firstTime && Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["NotifyUserOnConsoleReady"] ?? "true")) map.NotifyUser("consoleFirstTimeSubject", "consoleFirstTimeMessage"); - - RefreshMapDnsAlias(map); + /* TODO: Main MySQL depricated + RefreshMapDnsAlias(map); + */ UpdatePlan(appRow.Id, map); newStructure = map.SaveChangesInConfigStructure(); @@ -1828,7 +1920,7 @@ private Map CreateMap(string appName, out bool newStructure) return map; } - + /* TODO: Main MySQL depricated private MapDataSet.durados_ThemeRow defaultThemeRow = null; public const int DefaultThemeId = 2; @@ -1842,7 +1934,7 @@ private MapDataSet.durados_ThemeRow GetDefaultTheme() return defaultThemeRow; } - + public string GetAppThemePath(string appName) { if (string.IsNullOrEmpty(appName)) @@ -1888,14 +1980,14 @@ public string GetAppThemePath(string appName) return GetTheme(themeId).RelativePath; } } - + public MapDataSet.durados_ThemeRow GetTheme(int? themeId = DefaultThemeId) { if (!themeId.HasValue) themeId = DefaultThemeId; return (MapDataSet.durados_ThemeRow)duradosMap.Database.Views["durados_Theme"].GetDataRow(themeId.ToString()); } - + */ public int AssignLocalPort() { return portManager.Assign(); @@ -1903,10 +1995,10 @@ public int AssignLocalPort() public void UpdatePlan(int appId, Map map) { - string sql = "select top(1) PlanId from durados_AppPlan where AppId=" + appId + " order by PurchaseDate desc"; + string sql = MainAppSchema.GetPlanForAppSql(appId); try { - string scalar = (new SqlAccess()).ExecuteScalar(duradosMap.connectionString, sql); + string scalar = MainAppSqlAccess.ExecuteScalar(duradosMap.connectionString, sql); if (string.IsNullOrEmpty(scalar)) map.Plan = 0; else @@ -1918,22 +2010,22 @@ public void UpdatePlan(int appId, Map map) } } + /* TODO: Main MySQL depricated + private void RefreshMapDnsAlias(Map map) + { + int rowCount = 0; + Dictionary values = new Dictionary(); - private void RefreshMapDnsAlias(Map map) - { - int rowCount = 0; - Dictionary values = new Dictionary(); - - View dnsAliasView = GetDnsAliasView(); - - DataView dnsAliasDataView = dnsAliasView.FillPage(1, 10000, values, null, null, out rowCount, null, null); - map.Aliases.Clear(); - foreach (System.Data.DataRowView dnsAliasRow in dnsAliasDataView) - { - map.Aliases.Add(dnsAliasRow["Alias"].ToString()); - } - } + View dnsAliasView = GetDnsAliasView(); + DataView dnsAliasDataView = dnsAliasView.FillPage(1, 10000, values, null, null, out rowCount, null, null); + map.Aliases.Clear(); + foreach (System.Data.DataRowView dnsAliasRow in dnsAliasDataView) + { + map.Aliases.Add(dnsAliasRow["Alias"].ToString()); + } + } + */ public bool AppInCach(string appName) { return mapsCache.ContainsKey(appName); @@ -2008,7 +2100,7 @@ private void SetAppNameByGuidToCache(string guid, string appName) public string GetAppNameByGuidFromDb(string guid) { - SqlAccess sql = new SqlAccess(); + SqlAccess sqlAccess = MainAppSqlAccess; string sSqlCommand = ""; Guid parsedGuid; @@ -2017,9 +2109,9 @@ public string GetAppNameByGuidFromDb(string guid) throw new ArgumentException("Illegal token"); } - sSqlCommand = "select [name] from durados_App with(nolock) where [Guid] = '" + guid + "'"; + sSqlCommand = Maps.MainAppSchema.GetAppNameByGuidFromDb(guid); - object scalar = sql.ExecuteScalar(duradosMap.connectionString, sSqlCommand); + object scalar = sqlAccess.ExecuteScalar(duradosMap.connectionString, sSqlCommand); if (scalar.Equals(string.Empty) || scalar == null || scalar == DBNull.Value) return null; @@ -2044,10 +2136,10 @@ public Billing.PaymentStatus PaymentStatus(string appName) } try { - SqlAccess sql = new SqlAccess(); - string sSqlCommand = "select PaymentStatus from durados_App with(nolock) where Name = N'" + appName + "'"; + SqlAccess sqlAccess = MainAppSqlAccess; + string sSqlCommand = MainAppSchema.GetPaymentStatusSql(appName); - object scalar = sql.ExecuteScalar(duradosMap.connectionString, sSqlCommand); + object scalar = sqlAccess.ExecuteScalar(duradosMap.connectionString, sSqlCommand); if (scalar.Equals(string.Empty) || scalar == null || scalar == DBNull.Value) return Billing.PaymentStatus.Active; @@ -2060,23 +2152,29 @@ public Billing.PaymentStatus PaymentStatus(string appName) } } + //private SqlAccess MainAppSqlAccess + //{ + // return (DuradosMap as DuradosMap).GetSqlAccess(); + //} + public int? AppExists(string appName, int? userId = null, bool ignoreDevUser = false) { - SqlAccess sql = new SqlAccess(); + SqlAccess sqlAccess = MainAppSqlAccess; + ISqlMainSchema sqlMain = MainAppSchema; string sSqlCommand = ""; if (!userId.HasValue || (IsDevUser() && !ignoreDevUser)) { - sSqlCommand = "select Id from durados_App with(nolock) where Name = N'" + appName + "'"; + sSqlCommand = MainAppSchema.GetAppsExistsSql(appName); } else { - sSqlCommand = "SELECT dbo.durados_App.Id FROM dbo.durados_App with(nolock), dbo.durados_UserApp with(nolock) where (dbo.durados_App.Name = N'" + appName + "' and ((dbo.durados_UserApp.UserId=" + userId + " and dbo.durados_UserApp.AppId = dbo.durados_App.Id) or dbo.durados_App.Creator=" + userId + ") ) group by(dbo.durados_App.Id)"; - /*"SELECT dbo.durados_App.Id FROM dbo.durados_App with(nolock) INNER JOIN dbo.durados_UserApp with(nolock) ON dbo.durados_App.Id = dbo.durados_UserApp.AppId WHERE (dbo.durados_App.Name = N'" + appName + "' and dbo.durados_UserApp.UserId = "+userId+")";*/ + sSqlCommand = MainAppSchema.GetAppsExistsForUserSql(appName, userId); + } - object scalar = sql.ExecuteScalar(duradosMap.connectionString, sSqlCommand); + object scalar = sqlAccess.ExecuteScalar(duradosMap.connectionString, sSqlCommand); if (scalar.Equals(string.Empty) || scalar == null || scalar == DBNull.Value) return null; @@ -2114,6 +2212,16 @@ public static string GetMainAppUrl() { return GetAppUrl(duradosAppName); } + private static SqlAccess mainAppSqlAccess = null; + //public static SqlAccess MainAppSqlAccess + public static SqlAccess MainAppSqlAccess + { + get + { + return Durados.DataAccess.Rest.GetSqlAccess(Maps.instance.DuradosMap.SqlProduct);; + } + + } public static string GetmainAppConfigName() { @@ -2244,11 +2352,12 @@ public int GetAppAcount() return Convert.ToInt16(HttpContext.Current.Session["AppAcount"]); try { - using (SqlConnection connection = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["MapsConnectionString"].ConnectionString)) + + using (IDbConnection connection = MainAppSchema.GetNewConnection(System.Configuration.ConfigurationManager.ConnectionStrings["MapsConnectionString"].ConnectionString)) { connection.Open(); - string sql = "SELECT count(*) FROM dbo.durados_App a with(nolock) INNER JOIN dbo.durados_PlugInInstance p with(nolock) ON a.id = p.Appid WHERE Deleted =0 and p.selected=1"; - using (SqlCommand command = new SqlCommand(sql, connection)) + string sql = MainAppSchema.GetAppsCountsql(); + using (IDbCommand command = MainAppSchema.GetNewCommand(sql, connection)) { object scalar = command.ExecuteScalar(); appCount = Convert.ToInt16(scalar); @@ -2269,9 +2378,10 @@ public string GetCurrentAppId() public int? GetConnection(string server, string catalog, string username, string userId) { - SqlAccess sql = new SqlAccess(); + //SqlAccess sqlAccess = MainAppSqlAccess; + string sql = MainAppSchema.GetCurrentAppIdSql(server, catalog, username, userId); - object scalar = sql.ExecuteScalar(duradosMap.connectionString, string.Format("select Id from durados_SqlConnection where ServerName=N'{0}' and Catalog=N'{1}' and Username=N'{2}' and DuradosUser={3}", server, catalog, username, userId)); + object scalar = MainAppSqlAccess.ExecuteScalar(duradosMap.connectionString, sql); if (string.Empty.Equals(scalar) || scalar == null || scalar == DBNull.Value) return null; @@ -2315,18 +2425,26 @@ public static void UpdateSqlProduct(string appName, SqlProduct sqlProduct) public static SqlProduct GetSqlProduct(string appName) { + if (string.IsNullOrEmpty(appName) || appName == duradosAppName) - return SqlProduct.SqlServer; + return Maps.Instance.DuradosMap.SqlProduct; if (!appsSqlProducts.ContainsKey(appName)) { - using (SqlConnection connection = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["MapsConnectionString"].ConnectionString)) + + string sql1 = MainAppSchema.InsertNewUserSql("durados_User", "durados_User"); + using (IDbConnection connection = MainAppSchema.GetNewConnection(System.Configuration.ConfigurationManager.ConnectionStrings["MapsConnectionString"].ConnectionString)) { connection.Open(); - string sql = "SELECT dbo.durados_SqlConnection.SqlProductId FROM dbo.durados_App with(nolock) INNER JOIN dbo.durados_SqlConnection with(nolock) ON dbo.durados_App.SqlConnectionId = dbo.durados_SqlConnection.Id WHERE (dbo.durados_App.Name = @AppName)"; - using (SqlCommand command = new SqlCommand(sql, connection)) + string sql = MainAppSchema.GetSqlProductSql(); + using (IDbCommand command = MainAppSchema.GetNewCommand(sql, connection)) { - command.Parameters.AddWithValue("@AppName", appName); + var parameter = command.CreateParameter(); + parameter.ParameterName = "@AppName"; + parameter.Value = appName; + + command.Parameters.Add(parameter); + object scalar = command.ExecuteScalar(); if (scalar == null || scalar == DBNull.Value) { @@ -2382,16 +2500,18 @@ public FieldProperty FieldProperty public void UpdateOnBoardingStatus(OnBoardingStatus onBoardingStatus, string appId) { - string sql = "Update durados_App set DatabaseStatus = " + (int)onBoardingStatus + " where id = " + appId; - Durados.DataAccess.SqlAccess sqlAccess = new Durados.DataAccess.SqlAccess(); + string sql = Maps.MainAppSchema.GetUpdateDBStatusSql((int)onBoardingStatus,Convert.ToInt32(appId)); + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; sqlAccess.ExecuteNonQuery(DuradosMap.connectionString, sql); } public OnBoardingStatus GetOnBoardingStatus(string appId) { - string sql = "select DatabaseStatus from dbo.durados_App with (NOLOCK) where id = " + appId; - Durados.DataAccess.SqlAccess sqlAccess = new Durados.DataAccess.SqlAccess(); + string sql = Maps.MainAppSchema.GetDbStatusSql(appId); + + + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; object scalar = sqlAccess.ExecuteScalar(DuradosMap.connectionString, sql); @@ -2403,8 +2523,10 @@ public OnBoardingStatus GetOnBoardingStatus(string appId) public string GetAppNameById(int appId) { - string sql = "select Name from dbo.durados_App with (NOLOCK) where id = " + appId; - Durados.DataAccess.SqlAccess sqlAccess = new Durados.DataAccess.SqlAccess(); + string sql = Maps.MainAppSchema.GetAppNameByIdSqlSql(appId); + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; + + object scalar = sqlAccess.ExecuteScalar(DuradosMap.connectionString, sql); @@ -2617,5 +2739,6 @@ internal static int GetLimit(Limits limit) public static string AwsAccountSecretKeyPart { get; private set; } + public static string MasterOpsAuth { get; private set; } } } diff --git a/Durados.Web.Mvc/Map/SqlPersistency.cs b/Durados.Web.Mvc/Map/SqlPersistency.cs index 8a079706..8f6d93a9 100644 --- a/Durados.Web.Mvc/Map/SqlPersistency.cs +++ b/Durados.Web.Mvc/Map/SqlPersistency.cs @@ -7,7 +7,7 @@ using System.Web; using System.IO; using System.Reflection; -using System.Data.SqlClient; +//using System.Data.SqlClient; using Microsoft.WindowsAzure; using Microsoft.WindowsAzure.ServiceRuntime; @@ -64,10 +64,10 @@ public object GetLogConnection(MapDataSet.durados_AppRow appRow, object builder) public object GetConnection(MapDataSet.durados_SqlConnectionRow sqlConnectionRow, int dataSourceTypeId, object builder) { - return GetConnection(sqlConnectionRow, dataSourceTypeId, (System.Data.SqlClient.SqlConnectionStringBuilder)builder); + return GetConnection(sqlConnectionRow, dataSourceTypeId, (System.Data.Common.DbConnectionStringBuilder)builder); } - public object GetConnection(MapDataSet.durados_SqlConnectionRow sqlConnectionRow, int dataSourceTypeId, System.Data.SqlClient.SqlConnectionStringBuilder builder) + public object GetConnection(MapDataSet.durados_SqlConnectionRow sqlConnectionRow, int dataSourceTypeId, System.Data.Common.DbConnectionStringBuilder builder) { return GetConnection(sqlConnectionRow, dataSourceTypeId, builder, GetConnectionStringTemplate(sqlConnectionRow)); } @@ -83,30 +83,30 @@ private string GetConnectionStringTemplate(MapDataSet.durados_SqlConnectionRow s public object GetSqlServerConnection(MapDataSet.durados_AppRow appRow, object builder) { int dataSourceTypeId = appRow.DataSourceTypeId; - return GetConnection(appRow.durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection, dataSourceTypeId, (System.Data.SqlClient.SqlConnectionStringBuilder)builder, "Data Source={0};Initial Catalog={1};User ID={2};Password={3};Integrated Security=False;"); + return GetConnection(appRow.durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection, dataSourceTypeId, (System.Data.Common.DbConnectionStringBuilder)builder, "Data Source={0};Initial Catalog={1};User ID={2};Password={3};Integrated Security=False;"); } public object GetMySqlConnection(MapDataSet.durados_AppRow appRow, object builder, int localPort) { int dataSourceTypeId = appRow.DataSourceTypeId; bool usesSsh = !appRow.durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection.IsSshUsesNull() && appRow.durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection.SshUses; - return GetConnection(appRow.durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection, dataSourceTypeId, (System.Data.SqlClient.SqlConnectionStringBuilder)builder, usesSsh ? "server=localhost;database={1};User Id={2};password={3};Allow User Variables=True;CharSet=utf8mb4;UseProcedureBodies=true;" : "server={0};database={1};User Id={2};password={3}") + ";port=" + localPort.ToString() + ";convert zero datetime=True;default command timeout=90;Connection Timeout=60;Allow User Variables=True;CharSet=utf8mb4;UseProcedureBodies=true;"; + return GetConnection(appRow.durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection, dataSourceTypeId, (System.Data.Common.DbConnectionStringBuilder)builder, usesSsh ? "server=localhost;database={1};User Id={2};password={3};Allow User Variables=True;CharSet=utf8mb4;UseProcedureBodies=true;" : "server={0};database={1};User Id={2};password={3}") + ";port=" + localPort.ToString() + ";convert zero datetime=True;default command timeout=90;Connection Timeout=60;Allow User Variables=True;CharSet=utf8mb4;UseProcedureBodies=true;"; } public object GetPostgreConnection(MapDataSet.durados_AppRow appRow, object builder, int localPort) { int dataSourceTypeId = appRow.DataSourceTypeId; bool usesSsl = !appRow.durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection.IsSslUsesNull() && appRow.durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection.SslUses; - return GetConnection(appRow.durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection, dataSourceTypeId, (System.Data.SqlClient.SqlConnectionStringBuilder)builder, usesSsl ? "server={0};database={1};User Id={2};password={3};SSL=true;SslMode=Require;" : "server={0};database={1};User Id={2};password={3}") + ";port=" + localPort.ToString() + ";Encoding=UNICODE;CommandTimeout=90;Timeout=60;"; + return GetConnection(appRow.durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection, dataSourceTypeId, (System.Data.Common.DbConnectionStringBuilder)builder, usesSsl ? "server={0};database={1};User Id={2};password={3};SSL=true;SslMode=Require;" : "server={0};database={1};User Id={2};password={3}") + ";port=" + localPort.ToString() + ";Encoding=UNICODE;CommandTimeout=90;Timeout=60;"; } public object GetOracleConnection(MapDataSet.durados_AppRow appRow, object builder, int localPort) { int dataSourceTypeId = appRow.DataSourceTypeId; bool usesSsh = !appRow.durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection.IsSshUsesNull() && appRow.durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection.SshUses; - return GetConnection(appRow.durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection, dataSourceTypeId, (System.Data.SqlClient.SqlConnectionStringBuilder)builder, OracleAccess.GetConnectionStringSchema()); + return GetConnection(appRow.durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection, dataSourceTypeId,(System.Data.Common.DbConnectionStringBuilder) builder, OracleAccess.GetConnectionStringSchema()); } - public object GetConnection(MapDataSet.durados_SqlConnectionRow sqlConnectionRow, int dataSourceTypeId, System.Data.SqlClient.SqlConnectionStringBuilder builder, string template) + public object GetConnection(MapDataSet.durados_SqlConnectionRow sqlConnectionRow, int dataSourceTypeId, System.Data.Common.DbConnectionStringBuilder builder, string template) { string connectionString = null; string serverName = null; @@ -115,19 +115,19 @@ public object GetConnection(MapDataSet.durados_SqlConnectionRow sqlConnectionRow if (dataSourceTypeId == 2 || dataSourceTypeId == 4) { if (sqlConnectionRow.IsServerNameNull()) - serverName = builder.DataSource; + serverName = builder.Server(); else serverName = sqlConnectionRow.ServerName; if (sqlConnectionRow.IsIntegratedSecurityNull()) - integratedSecurity = builder.IntegratedSecurity; + integratedSecurity = builder.IntegratedSecurity(); else integratedSecurity = sqlConnectionRow.IntegratedSecurity; } else { - integratedSecurity = builder.IntegratedSecurity; - serverName = builder.DataSource; + integratedSecurity = builder.IntegratedSecurity(); + serverName = builder.Server(); } if (integratedSecurity.HasValue && integratedSecurity.Value) @@ -145,19 +145,19 @@ public object GetConnection(MapDataSet.durados_SqlConnectionRow sqlConnectionRow { if (sqlConnectionRow.IsUsernameNull()) - username = builder.UserID; + username = builder.UserId(); else username = sqlConnectionRow.Username; if (sqlConnectionRow.IsPasswordNull()) - password = builder.Password; + password = builder.Password(); else - password = sqlConnectionRow.Password; + password = Maps.Instance.DuradosMap.Decrypt(sqlConnectionRow.Password); } else { - username = builder.UserID; - password = builder.Password; + username = builder.UserId(); + password = builder.Password(); } if (!sqlConnectionRow.IsProductPortNull()) return string.Format(connectionString, serverName, sqlConnectionRow.Catalog, username, password, sqlConnectionRow.ProductPort); diff --git a/Durados.Web.Mvc/MapDataSet.Designer.cs b/Durados.Web.Mvc/MapDataSet.Designer.cs index 060371a4..30680ea8 100644 --- a/Durados.Web.Mvc/MapDataSet.Designer.cs +++ b/Durados.Web.Mvc/MapDataSet.Designer.cs @@ -36,14 +36,8 @@ public partial class MapDataSet : global::System.Data.DataSet { private durados_DataSourceTypeDataTable tabledurados_DataSourceType; - private durados_DnsAliasDataTable tabledurados_DnsAlias; - private durados_SqlProductDataTable tabledurados_SqlProduct; - private durados_ThemeDataTable tabledurados_Theme; - - private durados_AppStatDataTable tabledurados_AppStat; - private backand_ActionTemplateDataTable tablebackand_ActionTemplate; private durados_UserSocialDataTable tabledurados_UserSocial; @@ -70,14 +64,8 @@ public partial class MapDataSet : global::System.Data.DataSet { private global::System.Data.DataRelation relationFK_durados_App_durados_SqlConnection_System; - private global::System.Data.DataRelation relationdurados_App_durados_DnsAlias; - private global::System.Data.DataRelation relationdurados_SqlProduct_durados_SqlConnection; - private global::System.Data.DataRelation relationFK_durados_App_durados_Theme; - - private global::System.Data.DataRelation relationFK_durados_AppStat_durados_App; - private global::System.Data.DataRelation relationv_durados_User_durados_UserSocial; private global::System.Data.DataRelation relationdurados_App_durados_UserSocial; @@ -128,18 +116,9 @@ protected MapDataSet(global::System.Runtime.Serialization.SerializationInfo info if ((ds.Tables["durados_DataSourceType"] != null)) { base.Tables.Add(new durados_DataSourceTypeDataTable(ds.Tables["durados_DataSourceType"])); } - if ((ds.Tables["durados_DnsAlias"] != null)) { - base.Tables.Add(new durados_DnsAliasDataTable(ds.Tables["durados_DnsAlias"])); - } if ((ds.Tables["durados_SqlProduct"] != null)) { base.Tables.Add(new durados_SqlProductDataTable(ds.Tables["durados_SqlProduct"])); } - if ((ds.Tables["durados_Theme"] != null)) { - base.Tables.Add(new durados_ThemeDataTable(ds.Tables["durados_Theme"])); - } - if ((ds.Tables["durados_AppStat"] != null)) { - base.Tables.Add(new durados_AppStatDataTable(ds.Tables["durados_AppStat"])); - } if ((ds.Tables["backand_ActionTemplate"] != null)) { base.Tables.Add(new backand_ActionTemplateDataTable(ds.Tables["backand_ActionTemplate"])); } @@ -224,16 +203,6 @@ public durados_DataSourceTypeDataTable durados_DataSourceType { } } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Browsable(false)] - [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] - public durados_DnsAliasDataTable durados_DnsAlias { - get { - return this.tabledurados_DnsAlias; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -244,26 +213,6 @@ public durados_SqlProductDataTable durados_SqlProduct { } } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Browsable(false)] - [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] - public durados_ThemeDataTable durados_Theme { - get { - return this.tabledurados_Theme; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Browsable(false)] - [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] - public durados_AppStatDataTable durados_AppStat { - get { - return this.tabledurados_AppStat; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -369,18 +318,9 @@ protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) if ((ds.Tables["durados_DataSourceType"] != null)) { base.Tables.Add(new durados_DataSourceTypeDataTable(ds.Tables["durados_DataSourceType"])); } - if ((ds.Tables["durados_DnsAlias"] != null)) { - base.Tables.Add(new durados_DnsAliasDataTable(ds.Tables["durados_DnsAlias"])); - } if ((ds.Tables["durados_SqlProduct"] != null)) { base.Tables.Add(new durados_SqlProductDataTable(ds.Tables["durados_SqlProduct"])); } - if ((ds.Tables["durados_Theme"] != null)) { - base.Tables.Add(new durados_ThemeDataTable(ds.Tables["durados_Theme"])); - } - if ((ds.Tables["durados_AppStat"] != null)) { - base.Tables.Add(new durados_AppStatDataTable(ds.Tables["durados_AppStat"])); - } if ((ds.Tables["backand_ActionTemplate"] != null)) { base.Tables.Add(new backand_ActionTemplateDataTable(ds.Tables["backand_ActionTemplate"])); } @@ -456,30 +396,12 @@ internal void InitVars(bool initTable) { this.tabledurados_DataSourceType.InitVars(); } } - this.tabledurados_DnsAlias = ((durados_DnsAliasDataTable)(base.Tables["durados_DnsAlias"])); - if ((initTable == true)) { - if ((this.tabledurados_DnsAlias != null)) { - this.tabledurados_DnsAlias.InitVars(); - } - } this.tabledurados_SqlProduct = ((durados_SqlProductDataTable)(base.Tables["durados_SqlProduct"])); if ((initTable == true)) { if ((this.tabledurados_SqlProduct != null)) { this.tabledurados_SqlProduct.InitVars(); } } - this.tabledurados_Theme = ((durados_ThemeDataTable)(base.Tables["durados_Theme"])); - if ((initTable == true)) { - if ((this.tabledurados_Theme != null)) { - this.tabledurados_Theme.InitVars(); - } - } - this.tabledurados_AppStat = ((durados_AppStatDataTable)(base.Tables["durados_AppStat"])); - if ((initTable == true)) { - if ((this.tabledurados_AppStat != null)) { - this.tabledurados_AppStat.InitVars(); - } - } this.tablebackand_ActionTemplate = ((backand_ActionTemplateDataTable)(base.Tables["backand_ActionTemplate"])); if ((initTable == true)) { if ((this.tablebackand_ActionTemplate != null)) { @@ -503,10 +425,7 @@ internal void InitVars(bool initTable) { this.relationFK_durados_UserApp_durados_User = this.Relations["FK_durados_UserApp_durados_User"]; this.relationFK_durados_App_durados_SqlConnection_Security = this.Relations["FK_durados_App_durados_SqlConnection_Security"]; this.relationFK_durados_App_durados_SqlConnection_System = this.Relations["FK_durados_App_durados_SqlConnection_System"]; - this.relationdurados_App_durados_DnsAlias = this.Relations["durados_App_durados_DnsAlias"]; this.relationdurados_SqlProduct_durados_SqlConnection = this.Relations["durados_SqlProduct_durados_SqlConnection"]; - this.relationFK_durados_App_durados_Theme = this.Relations["FK_durados_App_durados_Theme"]; - this.relationFK_durados_AppStat_durados_App = this.Relations["FK_durados_AppStat_durados_App"]; this.relationv_durados_User_durados_UserSocial = this.Relations["v_durados_User_durados_UserSocial"]; this.relationdurados_App_durados_UserSocial = this.Relations["durados_App_durados_UserSocial"]; } @@ -531,14 +450,8 @@ private void InitClass() { base.Tables.Add(this.tabledurados_UserApp); this.tabledurados_DataSourceType = new durados_DataSourceTypeDataTable(); base.Tables.Add(this.tabledurados_DataSourceType); - this.tabledurados_DnsAlias = new durados_DnsAliasDataTable(); - base.Tables.Add(this.tabledurados_DnsAlias); this.tabledurados_SqlProduct = new durados_SqlProductDataTable(); base.Tables.Add(this.tabledurados_SqlProduct); - this.tabledurados_Theme = new durados_ThemeDataTable(); - base.Tables.Add(this.tabledurados_Theme); - this.tabledurados_AppStat = new durados_AppStatDataTable(); - base.Tables.Add(this.tabledurados_AppStat); this.tablebackand_ActionTemplate = new backand_ActionTemplateDataTable(); base.Tables.Add(this.tablebackand_ActionTemplate); this.tabledurados_UserSocial = new durados_UserSocialDataTable(); @@ -587,22 +500,10 @@ private void InitClass() { this.tabledurados_SqlConnection.IdColumn}, new global::System.Data.DataColumn[] { this.tabledurados_App.SystemSqlConnectionIdColumn}, false); this.Relations.Add(this.relationFK_durados_App_durados_SqlConnection_System); - this.relationdurados_App_durados_DnsAlias = new global::System.Data.DataRelation("durados_App_durados_DnsAlias", new global::System.Data.DataColumn[] { - this.tabledurados_App.IdColumn}, new global::System.Data.DataColumn[] { - this.tabledurados_DnsAlias.AppIdColumn}, false); - this.Relations.Add(this.relationdurados_App_durados_DnsAlias); this.relationdurados_SqlProduct_durados_SqlConnection = new global::System.Data.DataRelation("durados_SqlProduct_durados_SqlConnection", new global::System.Data.DataColumn[] { this.tabledurados_SqlProduct.IdColumn}, new global::System.Data.DataColumn[] { this.tabledurados_SqlConnection.SqlProductIdColumn}, false); this.Relations.Add(this.relationdurados_SqlProduct_durados_SqlConnection); - this.relationFK_durados_App_durados_Theme = new global::System.Data.DataRelation("FK_durados_App_durados_Theme", new global::System.Data.DataColumn[] { - this.tabledurados_Theme.IdColumn}, new global::System.Data.DataColumn[] { - this.tabledurados_App.ThemeIdColumn}, false); - this.Relations.Add(this.relationFK_durados_App_durados_Theme); - this.relationFK_durados_AppStat_durados_App = new global::System.Data.DataRelation("FK_durados_AppStat_durados_App", new global::System.Data.DataColumn[] { - this.tabledurados_App.IdColumn}, new global::System.Data.DataColumn[] { - this.tabledurados_AppStat.AppIdColumn}, false); - this.Relations.Add(this.relationFK_durados_AppStat_durados_App); this.relationv_durados_User_durados_UserSocial = new global::System.Data.DataRelation("v_durados_User_durados_UserSocial", new global::System.Data.DataColumn[] { this.tablev_durados_User.IDColumn}, new global::System.Data.DataColumn[] { this.tabledurados_UserSocial.UserIdColumn}, false); @@ -649,30 +550,12 @@ private bool ShouldSerializedurados_DataSourceType() { return false; } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private bool ShouldSerializedurados_DnsAlias() { - return false; - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private bool ShouldSerializedurados_SqlProduct() { return false; } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private bool ShouldSerializedurados_Theme() { - return false; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private bool ShouldSerializedurados_AppStat() { - return false; - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private bool ShouldSerializebackand_ActionTemplate() { @@ -758,18 +641,9 @@ private void SchemaChanged(object sender, global::System.ComponentModel.Collecti [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public delegate void durados_DataSourceTypeRowChangeEventHandler(object sender, durados_DataSourceTypeRowChangeEvent e); - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public delegate void durados_DnsAliasRowChangeEventHandler(object sender, durados_DnsAliasRowChangeEvent e); - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public delegate void durados_SqlProductRowChangeEventHandler(object sender, durados_SqlProductRowChangeEvent e); - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public delegate void durados_ThemeRowChangeEventHandler(object sender, durados_ThemeRowChangeEvent e); - - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public delegate void durados_AppStatRowChangeEventHandler(object sender, durados_AppStatRowChangeEvent e); - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public delegate void backand_ActionTemplateRowChangeEventHandler(object sender, backand_ActionTemplateRowChangeEvent e); @@ -1301,7 +1175,7 @@ public durados_AppRow Adddurados_AppRow( string Title, bool Basic, System.Guid Guid, - durados_ThemeRow parentdurados_ThemeRowByFK_durados_App_durados_Theme, + int ThemeId, string CustomThemePath, int DatabaseStatus, int TemplateStatus, @@ -1345,7 +1219,7 @@ public durados_AppRow Adddurados_AppRow( Title, Basic, Guid, - null, + ThemeId, CustomThemePath, DatabaseStatus, TemplateStatus, @@ -1377,9 +1251,6 @@ public durados_AppRow Adddurados_AppRow( if ((parentdurados_SqlConnectionRowByFK_durados_App_durados_SqlConnection_Security != null)) { columnValuesArray[24] = parentdurados_SqlConnectionRowByFK_durados_App_durados_SqlConnection_Security[0]; } - if ((parentdurados_ThemeRowByFK_durados_App_durados_Theme != null)) { - columnValuesArray[28] = parentdurados_ThemeRowByFK_durados_App_durados_Theme[0]; - } rowdurados_AppRow.ItemArray = columnValuesArray; this.Rows.Add(rowdurados_AppRow); return rowdurados_AppRow; @@ -3549,18 +3420,18 @@ public void Removedurados_DataSourceTypeRow(durados_DataSourceTypeRow row) { /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] - public partial class durados_DnsAliasDataTable : global::System.Data.TypedTableBase { + public partial class durados_SqlProductDataTable : global::System.Data.TypedTableBase { private global::System.Data.DataColumn columnId; - private global::System.Data.DataColumn columnAlias; + private global::System.Data.DataColumn columnName; - private global::System.Data.DataColumn columnAppId; + private global::System.Data.DataColumn columnOrdinal; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_DnsAliasDataTable() { - this.TableName = "durados_DnsAlias"; + public durados_SqlProductDataTable() { + this.TableName = "durados_SqlProduct"; this.BeginInit(); this.InitClass(); this.EndInit(); @@ -3568,7 +3439,7 @@ public durados_DnsAliasDataTable() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal durados_DnsAliasDataTable(global::System.Data.DataTable table) { + internal durados_SqlProductDataTable(global::System.Data.DataTable table) { this.TableName = table.TableName; if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { this.CaseSensitive = table.CaseSensitive; @@ -3585,7 +3456,7 @@ internal durados_DnsAliasDataTable(global::System.Data.DataTable table) { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected durados_DnsAliasDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + protected durados_SqlProductDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } @@ -3600,17 +3471,17 @@ protected durados_DnsAliasDataTable(global::System.Runtime.Serialization.Seriali [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn AliasColumn { + public global::System.Data.DataColumn NameColumn { get { - return this.columnAlias; + return this.columnName; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn AppIdColumn { + public global::System.Data.DataColumn OrdinalColumn { get { - return this.columnAppId; + return this.columnOrdinal; } } @@ -3625,57 +3496,54 @@ public int Count { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_DnsAliasRow this[int index] { + public durados_SqlProductRow this[int index] { get { - return ((durados_DnsAliasRow)(this.Rows[index])); + return ((durados_SqlProductRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_DnsAliasRowChangeEventHandler durados_DnsAliasRowChanging; + public event durados_SqlProductRowChangeEventHandler durados_SqlProductRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_DnsAliasRowChangeEventHandler durados_DnsAliasRowChanged; + public event durados_SqlProductRowChangeEventHandler durados_SqlProductRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_DnsAliasRowChangeEventHandler durados_DnsAliasRowDeleting; + public event durados_SqlProductRowChangeEventHandler durados_SqlProductRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_DnsAliasRowChangeEventHandler durados_DnsAliasRowDeleted; + public event durados_SqlProductRowChangeEventHandler durados_SqlProductRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void Adddurados_DnsAliasRow(durados_DnsAliasRow row) { + public void Adddurados_SqlProductRow(durados_SqlProductRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_DnsAliasRow Adddurados_DnsAliasRow(string Alias, durados_AppRow parentdurados_AppRowBydurados_App_durados_DnsAlias) { - durados_DnsAliasRow rowdurados_DnsAliasRow = ((durados_DnsAliasRow)(this.NewRow())); + public durados_SqlProductRow Adddurados_SqlProductRow(string Name, int Ordinal) { + durados_SqlProductRow rowdurados_SqlProductRow = ((durados_SqlProductRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, - Alias, - null}; - if ((parentdurados_AppRowBydurados_App_durados_DnsAlias != null)) { - columnValuesArray[2] = parentdurados_AppRowBydurados_App_durados_DnsAlias[0]; - } - rowdurados_DnsAliasRow.ItemArray = columnValuesArray; - this.Rows.Add(rowdurados_DnsAliasRow); - return rowdurados_DnsAliasRow; + Name, + Ordinal}; + rowdurados_SqlProductRow.ItemArray = columnValuesArray; + this.Rows.Add(rowdurados_SqlProductRow); + return rowdurados_SqlProductRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_DnsAliasRow FindById(int Id) { - return ((durados_DnsAliasRow)(this.Rows.Find(new object[] { + public durados_SqlProductRow FindById(int Id) { + return ((durados_SqlProductRow)(this.Rows.Find(new object[] { Id}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public override global::System.Data.DataTable Clone() { - durados_DnsAliasDataTable cln = ((durados_DnsAliasDataTable)(base.Clone())); + durados_SqlProductDataTable cln = ((durados_SqlProductDataTable)(base.Clone())); cln.InitVars(); return cln; } @@ -3683,15 +3551,15 @@ public durados_DnsAliasRow FindById(int Id) { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { - return new durados_DnsAliasDataTable(); + return new durados_SqlProductDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] internal void InitVars() { this.columnId = base.Columns["Id"]; - this.columnAlias = base.Columns["Alias"]; - this.columnAppId = base.Columns["AppId"]; + this.columnName = base.Columns["Name"]; + this.columnOrdinal = base.Columns["Ordinal"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -3699,46 +3567,45 @@ internal void InitVars() { private void InitClass() { this.columnId = new global::System.Data.DataColumn("Id", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnId); - this.columnAlias = new global::System.Data.DataColumn("Alias", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnAlias); - this.columnAppId = new global::System.Data.DataColumn("AppId", typeof(int), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnAppId); + this.columnName = new global::System.Data.DataColumn("Name", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnName); + this.columnOrdinal = new global::System.Data.DataColumn("Ordinal", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnOrdinal); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnId}, true)); this.columnId.AutoIncrement = true; this.columnId.AutoIncrementSeed = -1; this.columnId.AutoIncrementStep = -1; this.columnId.AllowDBNull = false; + this.columnId.ReadOnly = true; this.columnId.Unique = true; - this.columnAlias.AllowDBNull = false; - this.columnAlias.MaxLength = 250; - this.columnAppId.AllowDBNull = false; + this.columnName.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_DnsAliasRow Newdurados_DnsAliasRow() { - return ((durados_DnsAliasRow)(this.NewRow())); + public durados_SqlProductRow Newdurados_SqlProductRow() { + return ((durados_SqlProductRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { - return new durados_DnsAliasRow(builder); + return new durados_SqlProductRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override global::System.Type GetRowType() { - return typeof(durados_DnsAliasRow); + return typeof(durados_SqlProductRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); - if ((this.durados_DnsAliasRowChanged != null)) { - this.durados_DnsAliasRowChanged(this, new durados_DnsAliasRowChangeEvent(((durados_DnsAliasRow)(e.Row)), e.Action)); + if ((this.durados_SqlProductRowChanged != null)) { + this.durados_SqlProductRowChanged(this, new durados_SqlProductRowChangeEvent(((durados_SqlProductRow)(e.Row)), e.Action)); } } @@ -3746,8 +3613,8 @@ protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); - if ((this.durados_DnsAliasRowChanging != null)) { - this.durados_DnsAliasRowChanging(this, new durados_DnsAliasRowChangeEvent(((durados_DnsAliasRow)(e.Row)), e.Action)); + if ((this.durados_SqlProductRowChanging != null)) { + this.durados_SqlProductRowChanging(this, new durados_SqlProductRowChangeEvent(((durados_SqlProductRow)(e.Row)), e.Action)); } } @@ -3755,8 +3622,8 @@ protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); - if ((this.durados_DnsAliasRowDeleted != null)) { - this.durados_DnsAliasRowDeleted(this, new durados_DnsAliasRowChangeEvent(((durados_DnsAliasRow)(e.Row)), e.Action)); + if ((this.durados_SqlProductRowDeleted != null)) { + this.durados_SqlProductRowDeleted(this, new durados_SqlProductRowChangeEvent(((durados_SqlProductRow)(e.Row)), e.Action)); } } @@ -3764,14 +3631,14 @@ protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); - if ((this.durados_DnsAliasRowDeleting != null)) { - this.durados_DnsAliasRowDeleting(this, new durados_DnsAliasRowChangeEvent(((durados_DnsAliasRow)(e.Row)), e.Action)); + if ((this.durados_SqlProductRowDeleting != null)) { + this.durados_SqlProductRowDeleting(this, new durados_SqlProductRowChangeEvent(((durados_SqlProductRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void Removedurados_DnsAliasRow(durados_DnsAliasRow row) { + public void Removedurados_SqlProductRow(durados_SqlProductRow row) { this.Rows.Remove(row); } @@ -3798,7 +3665,7 @@ public void Removedurados_DnsAliasRow(durados_DnsAliasRow row) { type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; - attribute2.FixedValue = "durados_DnsAliasDataTable"; + attribute2.FixedValue = "durados_SqlProductDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); @@ -3844,18 +3711,60 @@ public void Removedurados_DnsAliasRow(durados_DnsAliasRow row) { /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] - public partial class durados_SqlProductDataTable : global::System.Data.TypedTableBase { + public partial class backand_ActionTemplateDataTable : global::System.Data.TypedTableBase { - private global::System.Data.DataColumn columnId; + private global::System.Data.DataColumn columnid; - private global::System.Data.DataColumn columnName; + private global::System.Data.DataColumn columnname; - private global::System.Data.DataColumn columnOrdinal; + private global::System.Data.DataColumn columnshortDescription; + + private global::System.Data.DataColumn columndocumentation; + + private global::System.Data.DataColumn columncreatedDate; + + private global::System.Data.DataColumn columnupdatedDate; + + private global::System.Data.DataColumn columncreatedBy; + + private global::System.Data.DataColumn columnupdatedBy; + + private global::System.Data.DataColumn columnruleName; + + private global::System.Data.DataColumn columnobjectName; + + private global::System.Data.DataColumn columnaction; + + private global::System.Data.DataColumn columnruleType; + + private global::System.Data.DataColumn columncondition; + + private global::System.Data.DataColumn columnparameters; + + private global::System.Data.DataColumn columncode; + + private global::System.Data.DataColumn columnexecuteCommand; + + private global::System.Data.DataColumn columnexecuteMessage; + + private global::System.Data.DataColumn columnjson; + + private global::System.Data.DataColumn columnbackands; + + private global::System.Data.DataColumn columnapproved; + + private global::System.Data.DataColumn columnapprovedDate; + + private global::System.Data.DataColumn columncontributors; + + private global::System.Data.DataColumn columncategory; + + private global::System.Data.DataColumn columnordinal; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_SqlProductDataTable() { - this.TableName = "durados_SqlProduct"; + public backand_ActionTemplateDataTable() { + this.TableName = "backand_ActionTemplate"; this.BeginInit(); this.InitClass(); this.EndInit(); @@ -3863,7 +3772,7 @@ public durados_SqlProductDataTable() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal durados_SqlProductDataTable(global::System.Data.DataTable table) { + internal backand_ActionTemplateDataTable(global::System.Data.DataTable table) { this.TableName = table.TableName; if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { this.CaseSensitive = table.CaseSensitive; @@ -3880,323 +3789,200 @@ internal durados_SqlProductDataTable(global::System.Data.DataTable table) { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected durados_SqlProductDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + protected backand_ActionTemplateDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn IdColumn { + public global::System.Data.DataColumn idColumn { get { - return this.columnId; + return this.columnid; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn NameColumn { + public global::System.Data.DataColumn nameColumn { get { - return this.columnName; + return this.columnname; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn OrdinalColumn { + public global::System.Data.DataColumn shortDescriptionColumn { get { - return this.columnOrdinal; + return this.columnshortDescription; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Browsable(false)] - public int Count { + public global::System.Data.DataColumn documentationColumn { get { - return this.Rows.Count; + return this.columndocumentation; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_SqlProductRow this[int index] { + public global::System.Data.DataColumn createdDateColumn { get { - return ((durados_SqlProductRow)(this.Rows[index])); + return this.columncreatedDate; } } - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_SqlProductRowChangeEventHandler durados_SqlProductRowChanging; - - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_SqlProductRowChangeEventHandler durados_SqlProductRowChanged; - - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_SqlProductRowChangeEventHandler durados_SqlProductRowDeleting; - - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_SqlProductRowChangeEventHandler durados_SqlProductRowDeleted; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void Adddurados_SqlProductRow(durados_SqlProductRow row) { - this.Rows.Add(row); + public global::System.Data.DataColumn updatedDateColumn { + get { + return this.columnupdatedDate; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_SqlProductRow Adddurados_SqlProductRow(string Name, int Ordinal) { - durados_SqlProductRow rowdurados_SqlProductRow = ((durados_SqlProductRow)(this.NewRow())); - object[] columnValuesArray = new object[] { - null, - Name, - Ordinal}; - rowdurados_SqlProductRow.ItemArray = columnValuesArray; - this.Rows.Add(rowdurados_SqlProductRow); - return rowdurados_SqlProductRow; + public global::System.Data.DataColumn createdByColumn { + get { + return this.columncreatedBy; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_SqlProductRow FindById(int Id) { - return ((durados_SqlProductRow)(this.Rows.Find(new object[] { - Id}))); + public global::System.Data.DataColumn updatedByColumn { + get { + return this.columnupdatedBy; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public override global::System.Data.DataTable Clone() { - durados_SqlProductDataTable cln = ((durados_SqlProductDataTable)(base.Clone())); - cln.InitVars(); - return cln; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override global::System.Data.DataTable CreateInstance() { - return new durados_SqlProductDataTable(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal void InitVars() { - this.columnId = base.Columns["Id"]; - this.columnName = base.Columns["Name"]; - this.columnOrdinal = base.Columns["Ordinal"]; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private void InitClass() { - this.columnId = new global::System.Data.DataColumn("Id", typeof(int), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnId); - this.columnName = new global::System.Data.DataColumn("Name", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnName); - this.columnOrdinal = new global::System.Data.DataColumn("Ordinal", typeof(int), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnOrdinal); - this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { - this.columnId}, true)); - this.columnId.AutoIncrement = true; - this.columnId.AutoIncrementSeed = -1; - this.columnId.AutoIncrementStep = -1; - this.columnId.AllowDBNull = false; - this.columnId.ReadOnly = true; - this.columnId.Unique = true; - this.columnName.MaxLength = 50; + public global::System.Data.DataColumn ruleNameColumn { + get { + return this.columnruleName; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_SqlProductRow Newdurados_SqlProductRow() { - return ((durados_SqlProductRow)(this.NewRow())); + public global::System.Data.DataColumn objectNameColumn { + get { + return this.columnobjectName; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { - return new durados_SqlProductRow(builder); + public global::System.Data.DataColumn actionColumn { + get { + return this.columnaction; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override global::System.Type GetRowType() { - return typeof(durados_SqlProductRow); + public global::System.Data.DataColumn ruleTypeColumn { + get { + return this.columnruleType; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowChanged(e); - if ((this.durados_SqlProductRowChanged != null)) { - this.durados_SqlProductRowChanged(this, new durados_SqlProductRowChangeEvent(((durados_SqlProductRow)(e.Row)), e.Action)); + public global::System.Data.DataColumn conditionColumn { + get { + return this.columncondition; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowChanging(e); - if ((this.durados_SqlProductRowChanging != null)) { - this.durados_SqlProductRowChanging(this, new durados_SqlProductRowChangeEvent(((durados_SqlProductRow)(e.Row)), e.Action)); + public global::System.Data.DataColumn parametersColumn { + get { + return this.columnparameters; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowDeleted(e); - if ((this.durados_SqlProductRowDeleted != null)) { - this.durados_SqlProductRowDeleted(this, new durados_SqlProductRowChangeEvent(((durados_SqlProductRow)(e.Row)), e.Action)); + public global::System.Data.DataColumn codeColumn { + get { + return this.columncode; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowDeleting(e); - if ((this.durados_SqlProductRowDeleting != null)) { - this.durados_SqlProductRowDeleting(this, new durados_SqlProductRowChangeEvent(((durados_SqlProductRow)(e.Row)), e.Action)); + public global::System.Data.DataColumn executeCommandColumn { + get { + return this.columnexecuteCommand; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void Removedurados_SqlProductRow(durados_SqlProductRow row) { - this.Rows.Remove(row); + public global::System.Data.DataColumn executeMessageColumn { + get { + return this.columnexecuteMessage; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { - global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); - global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); - MapDataSet ds = new MapDataSet(); - global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); - any1.Namespace = "http://www.w3.org/2001/XMLSchema"; - any1.MinOccurs = new decimal(0); - any1.MaxOccurs = decimal.MaxValue; - any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; - sequence.Items.Add(any1); - global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); - any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; - any2.MinOccurs = new decimal(1); - any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; - sequence.Items.Add(any2); - global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); - attribute1.Name = "namespace"; - attribute1.FixedValue = ds.Namespace; - type.Attributes.Add(attribute1); - global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); - attribute2.Name = "tableTypeName"; - attribute2.FixedValue = "durados_SqlProductDataTable"; - type.Attributes.Add(attribute2); - type.Particle = sequence; - global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); - if (xs.Contains(dsSchema.TargetNamespace)) { - global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); - global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); - try { - global::System.Xml.Schema.XmlSchema schema = null; - dsSchema.Write(s1); - for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { - schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); - s2.SetLength(0); - schema.Write(s2); - if ((s1.Length == s2.Length)) { - s1.Position = 0; - s2.Position = 0; - for (; ((s1.Position != s1.Length) - && (s1.ReadByte() == s2.ReadByte())); ) { - ; - } - if ((s1.Position == s1.Length)) { - return type; - } - } - } - } - finally { - if ((s1 != null)) { - s1.Close(); - } - if ((s2 != null)) { - s2.Close(); - } - } + public global::System.Data.DataColumn jsonColumn { + get { + return this.columnjson; } - xs.Add(dsSchema); - return type; } - } - - /// - ///Represents the strongly named DataTable class. - /// - [global::System.Serializable()] - [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] - public partial class durados_ThemeDataTable : global::System.Data.TypedTableBase { - - private global::System.Data.DataColumn columnId; - - private global::System.Data.DataColumn columnName; - - private global::System.Data.DataColumn columnRelativePath; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_ThemeDataTable() { - this.TableName = "durados_Theme"; - this.BeginInit(); - this.InitClass(); - this.EndInit(); + public global::System.Data.DataColumn backandsColumn { + get { + return this.columnbackands; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal durados_ThemeDataTable(global::System.Data.DataTable table) { - this.TableName = table.TableName; - if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { - this.CaseSensitive = table.CaseSensitive; - } - if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { - this.Locale = table.Locale; - } - if ((table.Namespace != table.DataSet.Namespace)) { - this.Namespace = table.Namespace; + public global::System.Data.DataColumn approvedColumn { + get { + return this.columnapproved; } - this.Prefix = table.Prefix; - this.MinimumCapacity = table.MinimumCapacity; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected durados_ThemeDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : - base(info, context) { - this.InitVars(); + public global::System.Data.DataColumn approvedDateColumn { + get { + return this.columnapprovedDate; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn IdColumn { + public global::System.Data.DataColumn contributorsColumn { get { - return this.columnId; + return this.columncontributors; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn NameColumn { + public global::System.Data.DataColumn categoryColumn { get { - return this.columnName; + return this.columncategory; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn RelativePathColumn { + public global::System.Data.DataColumn ordinalColumn { get { - return this.columnRelativePath; + return this.columnordinal; } } @@ -4211,119 +3997,238 @@ public int Count { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_ThemeRow this[int index] { + public backand_ActionTemplateRow this[int index] { get { - return ((durados_ThemeRow)(this.Rows[index])); + return ((backand_ActionTemplateRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_ThemeRowChangeEventHandler durados_ThemeRowChanging; + public event backand_ActionTemplateRowChangeEventHandler backand_ActionTemplateRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_ThemeRowChangeEventHandler durados_ThemeRowChanged; + public event backand_ActionTemplateRowChangeEventHandler backand_ActionTemplateRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_ThemeRowChangeEventHandler durados_ThemeRowDeleting; + public event backand_ActionTemplateRowChangeEventHandler backand_ActionTemplateRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_ThemeRowChangeEventHandler durados_ThemeRowDeleted; + public event backand_ActionTemplateRowChangeEventHandler backand_ActionTemplateRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void Adddurados_ThemeRow(durados_ThemeRow row) { + public void Addbackand_ActionTemplateRow(backand_ActionTemplateRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_ThemeRow Adddurados_ThemeRow(string Name, string RelativePath) { - durados_ThemeRow rowdurados_ThemeRow = ((durados_ThemeRow)(this.NewRow())); + public backand_ActionTemplateRow Addbackand_ActionTemplateRow( + string name, + string shortDescription, + string documentation, + System.DateTime createdDate, + System.DateTime updatedDate, + string createdBy, + string updatedBy, + string ruleName, + string objectName, + string action, + string ruleType, + string condition, + string parameters, + string code, + string executeCommand, + string executeMessage, + string json, + bool backands, + bool approved, + System.DateTime approvedDate, + string contributors, + int category, + int ordinal) { + backand_ActionTemplateRow rowbackand_ActionTemplateRow = ((backand_ActionTemplateRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, - Name, - RelativePath}; - rowdurados_ThemeRow.ItemArray = columnValuesArray; - this.Rows.Add(rowdurados_ThemeRow); - return rowdurados_ThemeRow; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_ThemeRow FindById(int Id) { - return ((durados_ThemeRow)(this.Rows.Find(new object[] { - Id}))); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public override global::System.Data.DataTable Clone() { - durados_ThemeDataTable cln = ((durados_ThemeDataTable)(base.Clone())); - cln.InitVars(); - return cln; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override global::System.Data.DataTable CreateInstance() { - return new durados_ThemeDataTable(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal void InitVars() { - this.columnId = base.Columns["Id"]; - this.columnName = base.Columns["Name"]; - this.columnRelativePath = base.Columns["RelativePath"]; + name, + shortDescription, + documentation, + createdDate, + updatedDate, + createdBy, + updatedBy, + ruleName, + objectName, + action, + ruleType, + condition, + parameters, + code, + executeCommand, + executeMessage, + json, + backands, + approved, + approvedDate, + contributors, + category, + ordinal}; + rowbackand_ActionTemplateRow.ItemArray = columnValuesArray; + this.Rows.Add(rowbackand_ActionTemplateRow); + return rowbackand_ActionTemplateRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public backand_ActionTemplateRow FindByid(int id) { + return ((backand_ActionTemplateRow)(this.Rows.Find(new object[] { + id}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public override global::System.Data.DataTable Clone() { + backand_ActionTemplateDataTable cln = ((backand_ActionTemplateDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected override global::System.Data.DataTable CreateInstance() { + return new backand_ActionTemplateDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal void InitVars() { + this.columnid = base.Columns["id"]; + this.columnname = base.Columns["name"]; + this.columnshortDescription = base.Columns["shortDescription"]; + this.columndocumentation = base.Columns["documentation"]; + this.columncreatedDate = base.Columns["createdDate"]; + this.columnupdatedDate = base.Columns["updatedDate"]; + this.columncreatedBy = base.Columns["createdBy"]; + this.columnupdatedBy = base.Columns["updatedBy"]; + this.columnruleName = base.Columns["ruleName"]; + this.columnobjectName = base.Columns["objectName"]; + this.columnaction = base.Columns["action"]; + this.columnruleType = base.Columns["ruleType"]; + this.columncondition = base.Columns["condition"]; + this.columnparameters = base.Columns["parameters"]; + this.columncode = base.Columns["code"]; + this.columnexecuteCommand = base.Columns["executeCommand"]; + this.columnexecuteMessage = base.Columns["executeMessage"]; + this.columnjson = base.Columns["json"]; + this.columnbackands = base.Columns["backands"]; + this.columnapproved = base.Columns["approved"]; + this.columnapprovedDate = base.Columns["approvedDate"]; + this.columncontributors = base.Columns["contributors"]; + this.columncategory = base.Columns["category"]; + this.columnordinal = base.Columns["ordinal"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private void InitClass() { - this.columnId = new global::System.Data.DataColumn("Id", typeof(int), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnId); - this.columnName = new global::System.Data.DataColumn("Name", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnName); - this.columnRelativePath = new global::System.Data.DataColumn("RelativePath", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnRelativePath); + this.columnid = new global::System.Data.DataColumn("id", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnid); + this.columnname = new global::System.Data.DataColumn("name", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnname); + this.columnshortDescription = new global::System.Data.DataColumn("shortDescription", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnshortDescription); + this.columndocumentation = new global::System.Data.DataColumn("documentation", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columndocumentation); + this.columncreatedDate = new global::System.Data.DataColumn("createdDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columncreatedDate); + this.columnupdatedDate = new global::System.Data.DataColumn("updatedDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnupdatedDate); + this.columncreatedBy = new global::System.Data.DataColumn("createdBy", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columncreatedBy); + this.columnupdatedBy = new global::System.Data.DataColumn("updatedBy", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnupdatedBy); + this.columnruleName = new global::System.Data.DataColumn("ruleName", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnruleName); + this.columnobjectName = new global::System.Data.DataColumn("objectName", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnobjectName); + this.columnaction = new global::System.Data.DataColumn("action", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnaction); + this.columnruleType = new global::System.Data.DataColumn("ruleType", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnruleType); + this.columncondition = new global::System.Data.DataColumn("condition", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columncondition); + this.columnparameters = new global::System.Data.DataColumn("parameters", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnparameters); + this.columncode = new global::System.Data.DataColumn("code", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columncode); + this.columnexecuteCommand = new global::System.Data.DataColumn("executeCommand", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnexecuteCommand); + this.columnexecuteMessage = new global::System.Data.DataColumn("executeMessage", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnexecuteMessage); + this.columnjson = new global::System.Data.DataColumn("json", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnjson); + this.columnbackands = new global::System.Data.DataColumn("backands", typeof(bool), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnbackands); + this.columnapproved = new global::System.Data.DataColumn("approved", typeof(bool), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnapproved); + this.columnapprovedDate = new global::System.Data.DataColumn("approvedDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnapprovedDate); + this.columncontributors = new global::System.Data.DataColumn("contributors", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columncontributors); + this.columncategory = new global::System.Data.DataColumn("category", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columncategory); + this.columnordinal = new global::System.Data.DataColumn("ordinal", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnordinal); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { - this.columnId}, true)); - this.columnId.AutoIncrement = true; - this.columnId.AutoIncrementSeed = -1; - this.columnId.AutoIncrementStep = -1; - this.columnId.AllowDBNull = false; - this.columnId.ReadOnly = true; - this.columnId.Unique = true; - this.columnName.AllowDBNull = false; - this.columnName.MaxLength = 50; - this.columnRelativePath.AllowDBNull = false; - this.columnRelativePath.MaxLength = 250; + this.columnid}, true)); + this.columnid.AutoIncrement = true; + this.columnid.AutoIncrementSeed = -1; + this.columnid.AutoIncrementStep = -1; + this.columnid.AllowDBNull = false; + this.columnid.Unique = true; + this.columnname.AllowDBNull = false; + this.columnname.MaxLength = 250; + this.columnshortDescription.MaxLength = 2147483647; + this.columndocumentation.MaxLength = 2147483647; + this.columncreatedBy.MaxLength = 50; + this.columnupdatedBy.MaxLength = 50; + this.columnruleName.MaxLength = 50; + this.columnobjectName.MaxLength = 50; + this.columnaction.MaxLength = 50; + this.columnruleType.MaxLength = 50; + this.columncondition.MaxLength = 2147483647; + this.columnparameters.MaxLength = 2147483647; + this.columncode.MaxLength = 2147483647; + this.columnexecuteCommand.MaxLength = 2147483647; + this.columnexecuteMessage.MaxLength = 2147483647; + this.columnjson.MaxLength = 2147483647; + this.columncontributors.MaxLength = 2147483647; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_ThemeRow Newdurados_ThemeRow() { - return ((durados_ThemeRow)(this.NewRow())); + public backand_ActionTemplateRow Newbackand_ActionTemplateRow() { + return ((backand_ActionTemplateRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { - return new durados_ThemeRow(builder); + return new backand_ActionTemplateRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override global::System.Type GetRowType() { - return typeof(durados_ThemeRow); + return typeof(backand_ActionTemplateRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); - if ((this.durados_ThemeRowChanged != null)) { - this.durados_ThemeRowChanged(this, new durados_ThemeRowChangeEvent(((durados_ThemeRow)(e.Row)), e.Action)); + if ((this.backand_ActionTemplateRowChanged != null)) { + this.backand_ActionTemplateRowChanged(this, new backand_ActionTemplateRowChangeEvent(((backand_ActionTemplateRow)(e.Row)), e.Action)); } } @@ -4331,8 +4236,8 @@ protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); - if ((this.durados_ThemeRowChanging != null)) { - this.durados_ThemeRowChanging(this, new durados_ThemeRowChangeEvent(((durados_ThemeRow)(e.Row)), e.Action)); + if ((this.backand_ActionTemplateRowChanging != null)) { + this.backand_ActionTemplateRowChanging(this, new backand_ActionTemplateRowChangeEvent(((backand_ActionTemplateRow)(e.Row)), e.Action)); } } @@ -4340,8 +4245,8 @@ protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); - if ((this.durados_ThemeRowDeleted != null)) { - this.durados_ThemeRowDeleted(this, new durados_ThemeRowChangeEvent(((durados_ThemeRow)(e.Row)), e.Action)); + if ((this.backand_ActionTemplateRowDeleted != null)) { + this.backand_ActionTemplateRowDeleted(this, new backand_ActionTemplateRowChangeEvent(((backand_ActionTemplateRow)(e.Row)), e.Action)); } } @@ -4349,14 +4254,14 @@ protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); - if ((this.durados_ThemeRowDeleting != null)) { - this.durados_ThemeRowDeleting(this, new durados_ThemeRowChangeEvent(((durados_ThemeRow)(e.Row)), e.Action)); + if ((this.backand_ActionTemplateRowDeleting != null)) { + this.backand_ActionTemplateRowDeleting(this, new backand_ActionTemplateRowChangeEvent(((backand_ActionTemplateRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void Removedurados_ThemeRow(durados_ThemeRow row) { + public void Removebackand_ActionTemplateRow(backand_ActionTemplateRow row) { this.Rows.Remove(row); } @@ -4383,7 +4288,7 @@ public void Removedurados_ThemeRow(durados_ThemeRow row) { type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; - attribute2.FixedValue = "durados_ThemeDataTable"; + attribute2.FixedValue = "backand_ActionTemplateDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); @@ -4429,22 +4334,22 @@ public void Removedurados_ThemeRow(durados_ThemeRow row) { /// [global::System.Serializable()] [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] - public partial class durados_AppStatDataTable : global::System.Data.TypedTableBase { + public partial class durados_UserSocialDataTable : global::System.Data.TypedTableBase { - private global::System.Data.DataColumn columnId; + private global::System.Data.DataColumn columnid; - private global::System.Data.DataColumn columnAppId; + private global::System.Data.DataColumn columnUserId; - private global::System.Data.DataColumn columnName; + private global::System.Data.DataColumn columnProvider; - private global::System.Data.DataColumn columnValue; + private global::System.Data.DataColumn columnSocialId; - private global::System.Data.DataColumn columnDate; + private global::System.Data.DataColumn columnAppId; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppStatDataTable() { - this.TableName = "durados_AppStat"; + public durados_UserSocialDataTable() { + this.TableName = "durados_UserSocial"; this.BeginInit(); this.InitClass(); this.EndInit(); @@ -4452,7 +4357,7 @@ public durados_AppStatDataTable() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal durados_AppStatDataTable(global::System.Data.DataTable table) { + internal durados_UserSocialDataTable(global::System.Data.DataTable table) { this.TableName = table.TableName; if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { this.CaseSensitive = table.CaseSensitive; @@ -4469,48 +4374,48 @@ internal durados_AppStatDataTable(global::System.Data.DataTable table) { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected durados_AppStatDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + protected durados_UserSocialDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : base(info, context) { this.InitVars(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn IdColumn { + public global::System.Data.DataColumn idColumn { get { - return this.columnId; + return this.columnid; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn AppIdColumn { + public global::System.Data.DataColumn UserIdColumn { get { - return this.columnAppId; + return this.columnUserId; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn NameColumn { + public global::System.Data.DataColumn ProviderColumn { get { - return this.columnName; + return this.columnProvider; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn ValueColumn { + public global::System.Data.DataColumn SocialIdColumn { get { - return this.columnValue; + return this.columnSocialId; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn DateColumn { + public global::System.Data.DataColumn AppIdColumn { get { - return this.columnDate; + return this.columnAppId; } } @@ -4525,59 +4430,62 @@ public int Count { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppStatRow this[int index] { + public durados_UserSocialRow this[int index] { get { - return ((durados_AppStatRow)(this.Rows[index])); + return ((durados_UserSocialRow)(this.Rows[index])); } } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_AppStatRowChangeEventHandler durados_AppStatRowChanging; + public event durados_UserSocialRowChangeEventHandler durados_UserSocialRowChanging; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_AppStatRowChangeEventHandler durados_AppStatRowChanged; + public event durados_UserSocialRowChangeEventHandler durados_UserSocialRowChanged; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_AppStatRowChangeEventHandler durados_AppStatRowDeleting; + public event durados_UserSocialRowChangeEventHandler durados_UserSocialRowDeleting; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_AppStatRowChangeEventHandler durados_AppStatRowDeleted; + public event durados_UserSocialRowChangeEventHandler durados_UserSocialRowDeleted; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void Adddurados_AppStatRow(durados_AppStatRow row) { + public void Adddurados_UserSocialRow(durados_UserSocialRow row) { this.Rows.Add(row); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppStatRow Adddurados_AppStatRow(int Id, durados_AppRow parentdurados_AppRowByFK_durados_AppStat_durados_App, string Name, float Value, System.DateTime Date) { - durados_AppStatRow rowdurados_AppStatRow = ((durados_AppStatRow)(this.NewRow())); + public durados_UserSocialRow Adddurados_UserSocialRow(v_durados_UserRow parentv_durados_UserRowByv_durados_User_durados_UserSocial, string Provider, string SocialId, durados_AppRow parentdurados_AppRowBydurados_App_durados_UserSocial) { + durados_UserSocialRow rowdurados_UserSocialRow = ((durados_UserSocialRow)(this.NewRow())); object[] columnValuesArray = new object[] { - Id, null, - Name, - Value, - Date}; - if ((parentdurados_AppRowByFK_durados_AppStat_durados_App != null)) { - columnValuesArray[1] = parentdurados_AppRowByFK_durados_AppStat_durados_App[0]; + null, + Provider, + SocialId, + null}; + if ((parentv_durados_UserRowByv_durados_User_durados_UserSocial != null)) { + columnValuesArray[1] = parentv_durados_UserRowByv_durados_User_durados_UserSocial[0]; + } + if ((parentdurados_AppRowBydurados_App_durados_UserSocial != null)) { + columnValuesArray[4] = parentdurados_AppRowBydurados_App_durados_UserSocial[0]; } - rowdurados_AppStatRow.ItemArray = columnValuesArray; - this.Rows.Add(rowdurados_AppStatRow); - return rowdurados_AppStatRow; + rowdurados_UserSocialRow.ItemArray = columnValuesArray; + this.Rows.Add(rowdurados_UserSocialRow); + return rowdurados_UserSocialRow; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppStatRow FindById(int Id) { - return ((durados_AppStatRow)(this.Rows.Find(new object[] { - Id}))); + public durados_UserSocialRow FindByid(int id) { + return ((durados_UserSocialRow)(this.Rows.Find(new object[] { + id}))); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public override global::System.Data.DataTable Clone() { - durados_AppStatDataTable cln = ((durados_AppStatDataTable)(base.Clone())); + durados_UserSocialDataTable cln = ((durados_UserSocialDataTable)(base.Clone())); cln.InitVars(); return cln; } @@ -4585,63 +4493,71 @@ public durados_AppStatRow FindById(int Id) { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override global::System.Data.DataTable CreateInstance() { - return new durados_AppStatDataTable(); + return new durados_UserSocialDataTable(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] internal void InitVars() { - this.columnId = base.Columns["Id"]; + this.columnid = base.Columns["id"]; + this.columnUserId = base.Columns["UserId"]; + this.columnProvider = base.Columns["Provider"]; + this.columnSocialId = base.Columns["SocialId"]; this.columnAppId = base.Columns["AppId"]; - this.columnName = base.Columns["Name"]; - this.columnValue = base.Columns["Value"]; - this.columnDate = base.Columns["Date"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private void InitClass() { - this.columnId = new global::System.Data.DataColumn("Id", typeof(int), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnId); + this.columnid = new global::System.Data.DataColumn("id", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnid); + this.columnUserId = new global::System.Data.DataColumn("UserId", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnUserId); + this.columnProvider = new global::System.Data.DataColumn("Provider", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnProvider); + this.columnSocialId = new global::System.Data.DataColumn("SocialId", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnSocialId); this.columnAppId = new global::System.Data.DataColumn("AppId", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnAppId); - this.columnName = new global::System.Data.DataColumn("Name", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnName); - this.columnValue = new global::System.Data.DataColumn("Value", typeof(float), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnValue); - this.columnDate = new global::System.Data.DataColumn("Date", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnDate); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { - this.columnId}, true)); - this.columnId.AllowDBNull = false; - this.columnId.Unique = true; - this.columnName.MaxLength = 50; + this.columnid}, true)); + this.columnid.AutoIncrement = true; + this.columnid.AutoIncrementSeed = -1; + this.columnid.AutoIncrementStep = -1; + this.columnid.AllowDBNull = false; + this.columnid.ReadOnly = true; + this.columnid.Unique = true; + this.columnUserId.AllowDBNull = false; + this.columnProvider.AllowDBNull = false; + this.columnProvider.MaxLength = 50; + this.columnSocialId.AllowDBNull = false; + this.columnSocialId.MaxLength = 50; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppStatRow Newdurados_AppStatRow() { - return ((durados_AppStatRow)(this.NewRow())); + public durados_UserSocialRow Newdurados_UserSocialRow() { + return ((durados_UserSocialRow)(this.NewRow())); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { - return new durados_AppStatRow(builder); + return new durados_UserSocialRow(builder); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override global::System.Type GetRowType() { - return typeof(durados_AppStatRow); + return typeof(durados_UserSocialRow); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanged(e); - if ((this.durados_AppStatRowChanged != null)) { - this.durados_AppStatRowChanged(this, new durados_AppStatRowChangeEvent(((durados_AppStatRow)(e.Row)), e.Action)); + if ((this.durados_UserSocialRowChanged != null)) { + this.durados_UserSocialRowChanged(this, new durados_UserSocialRowChangeEvent(((durados_UserSocialRow)(e.Row)), e.Action)); } } @@ -4649,8 +4565,8 @@ protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { base.OnRowChanging(e); - if ((this.durados_AppStatRowChanging != null)) { - this.durados_AppStatRowChanging(this, new durados_AppStatRowChangeEvent(((durados_AppStatRow)(e.Row)), e.Action)); + if ((this.durados_UserSocialRowChanging != null)) { + this.durados_UserSocialRowChanging(this, new durados_UserSocialRowChangeEvent(((durados_UserSocialRow)(e.Row)), e.Action)); } } @@ -4658,8 +4574,8 @@ protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleted(e); - if ((this.durados_AppStatRowDeleted != null)) { - this.durados_AppStatRowDeleted(this, new durados_AppStatRowChangeEvent(((durados_AppStatRow)(e.Row)), e.Action)); + if ((this.durados_UserSocialRowDeleted != null)) { + this.durados_UserSocialRowDeleted(this, new durados_UserSocialRowChangeEvent(((durados_UserSocialRow)(e.Row)), e.Action)); } } @@ -4667,14 +4583,14 @@ protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { base.OnRowDeleting(e); - if ((this.durados_AppStatRowDeleting != null)) { - this.durados_AppStatRowDeleting(this, new durados_AppStatRowChangeEvent(((durados_AppStatRow)(e.Row)), e.Action)); + if ((this.durados_UserSocialRowDeleting != null)) { + this.durados_UserSocialRowDeleting(this, new durados_UserSocialRowChangeEvent(((durados_UserSocialRow)(e.Row)), e.Action)); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void Removedurados_AppStatRow(durados_AppStatRow row) { + public void Removedurados_UserSocialRow(durados_UserSocialRow row) { this.Rows.Remove(row); } @@ -4701,7 +4617,7 @@ public void Removedurados_AppStatRow(durados_AppStatRow row) { type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; - attribute2.FixedValue = "durados_AppStatDataTable"; + attribute2.FixedValue = "durados_UserSocialDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); @@ -4743,2157 +4659,2028 @@ public void Removedurados_AppStatRow(durados_AppStatRow row) { } /// - ///Represents the strongly named DataTable class. + ///Represents strongly named DataRow class. /// - [global::System.Serializable()] - [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] - public partial class backand_ActionTemplateDataTable : global::System.Data.TypedTableBase { - - private global::System.Data.DataColumn columnid; - - private global::System.Data.DataColumn columnname; - - private global::System.Data.DataColumn columnshortDescription; - - private global::System.Data.DataColumn columndocumentation; - - private global::System.Data.DataColumn columncreatedDate; - - private global::System.Data.DataColumn columnupdatedDate; - - private global::System.Data.DataColumn columncreatedBy; - - private global::System.Data.DataColumn columnupdatedBy; - - private global::System.Data.DataColumn columnruleName; - - private global::System.Data.DataColumn columnobjectName; - - private global::System.Data.DataColumn columnaction; - - private global::System.Data.DataColumn columnruleType; - - private global::System.Data.DataColumn columncondition; - - private global::System.Data.DataColumn columnparameters; - - private global::System.Data.DataColumn columncode; - - private global::System.Data.DataColumn columnexecuteCommand; - - private global::System.Data.DataColumn columnexecuteMessage; - - private global::System.Data.DataColumn columnjson; - - private global::System.Data.DataColumn columnbackands; - - private global::System.Data.DataColumn columnapproved; - - private global::System.Data.DataColumn columnapprovedDate; - - private global::System.Data.DataColumn columncontributors; - - private global::System.Data.DataColumn columncategory; + public partial class durados_AppRow : global::System.Data.DataRow { - private global::System.Data.DataColumn columnordinal; + private durados_AppDataTable tabledurados_App; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public backand_ActionTemplateDataTable() { - this.TableName = "backand_ActionTemplate"; - this.BeginInit(); - this.InitClass(); - this.EndInit(); + internal durados_AppRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tabledurados_App = ((durados_AppDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal backand_ActionTemplateDataTable(global::System.Data.DataTable table) { - this.TableName = table.TableName; - if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { - this.CaseSensitive = table.CaseSensitive; - } - if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { - this.Locale = table.Locale; + public int Id { + get { + return ((int)(this[this.tabledurados_App.IdColumn])); } - if ((table.Namespace != table.DataSet.Namespace)) { - this.Namespace = table.Namespace; + set { + this[this.tabledurados_App.IdColumn] = value; } - this.Prefix = table.Prefix; - this.MinimumCapacity = table.MinimumCapacity; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected backand_ActionTemplateDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : - base(info, context) { - this.InitVars(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn idColumn { + public string Name { get { - return this.columnid; + return ((string)(this[this.tabledurados_App.NameColumn])); + } + set { + this[this.tabledurados_App.NameColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn nameColumn { + public int Creator { get { - return this.columnname; + return ((int)(this[this.tabledurados_App.CreatorColumn])); + } + set { + this[this.tabledurados_App.CreatorColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn shortDescriptionColumn { + public System.DateTime CreatedDate { get { - return this.columnshortDescription; + return ((global::System.DateTime)(this[this.tabledurados_App.CreatedDateColumn])); + } + set { + this[this.tabledurados_App.CreatedDateColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn documentationColumn { + public bool ToDelete { get { - return this.columndocumentation; + return ((bool)(this[this.tabledurados_App.ToDeleteColumn])); + } + set { + this[this.tabledurados_App.ToDeleteColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn createdDateColumn { + public System.DateTime ToDeleteDate { get { - return this.columncreatedDate; + try { + return ((global::System.DateTime)(this[this.tabledurados_App.ToDeleteDateColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'ToDeleteDate\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.ToDeleteDateColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn updatedDateColumn { + public bool Deleted { get { - return this.columnupdatedDate; + return ((bool)(this[this.tabledurados_App.DeletedColumn])); + } + set { + this[this.tabledurados_App.DeletedColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn createdByColumn { + public System.DateTime DeletedDate { get { - return this.columncreatedBy; + try { + return ((global::System.DateTime)(this[this.tabledurados_App.DeletedDateColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'DeletedDate\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.DeletedDateColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn updatedByColumn { + public int DataSourceTypeId { get { - return this.columnupdatedBy; + try { + return ((int)(this[this.tabledurados_App.DataSourceTypeIdColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'DataSourceTypeId\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.DataSourceTypeIdColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn ruleNameColumn { + public int SqlConnectionId { get { - return this.columnruleName; + try { + return ((int)(this[this.tabledurados_App.SqlConnectionIdColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'SqlConnectionId\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.SqlConnectionIdColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn objectNameColumn { + public bool UsesSpecificBinary { get { - return this.columnobjectName; + try { + return ((bool)(this[this.tabledurados_App.UsesSpecificBinaryColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'UsesSpecificBinary\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.UsesSpecificBinaryColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn actionColumn { + public string Url { get { - return this.columnaction; + try { + return ((string)(this[this.tabledurados_App.UrlColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Url\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.UrlColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn ruleTypeColumn { + public string Image { get { - return this.columnruleType; + try { + return ((string)(this[this.tabledurados_App.ImageColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Image\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.ImageColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn conditionColumn { + public bool ExistingDataSource { get { - return this.columncondition; + try { + return ((bool)(this[this.tabledurados_App.ExistingDataSourceColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'ExistingDataSource\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.ExistingDataSourceColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn parametersColumn { + public int TemplateId { get { - return this.columnparameters; + try { + return ((int)(this[this.tabledurados_App.TemplateIdColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'TemplateId\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.TemplateIdColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn codeColumn { + public string ExcelFileName { get { - return this.columncode; + try { + return ((string)(this[this.tabledurados_App.ExcelFileNameColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'ExcelFileName\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.ExcelFileNameColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn executeCommandColumn { + public string SpecificDOTNET { get { - return this.columnexecuteCommand; + try { + return ((string)(this[this.tabledurados_App.SpecificDOTNETColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'SpecificDOTNET\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.SpecificDOTNETColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn executeMessageColumn { + public string SpecificJS { get { - return this.columnexecuteMessage; + try { + return ((string)(this[this.tabledurados_App.SpecificJSColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'SpecificJS\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.SpecificJSColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn jsonColumn { + public string SpecificCss { get { - return this.columnjson; + try { + return ((string)(this[this.tabledurados_App.SpecificCssColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'SpecificCss\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.SpecificCssColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn backandsColumn { + public bool UseAsTemplate { get { - return this.columnbackands; + try { + return ((bool)(this[this.tabledurados_App.UseAsTemplateColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'UseAsTemplate\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.UseAsTemplateColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn approvedColumn { + public string Description { get { - return this.columnapproved; + try { + return ((string)(this[this.tabledurados_App.DescriptionColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Description\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.DescriptionColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn approvedDateColumn { + public string TemplateFile { get { - return this.columnapprovedDate; + try { + return ((string)(this[this.tabledurados_App.TemplateFileColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'TemplateFile\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.TemplateFileColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn contributorsColumn { + public int SystemSqlConnectionId { get { - return this.columncontributors; + try { + return ((int)(this[this.tabledurados_App.SystemSqlConnectionIdColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'SystemSqlConnectionId\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.SystemSqlConnectionIdColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn categoryColumn { + public bool PrivateAuthentication { get { - return this.columncategory; + try { + return ((bool)(this[this.tabledurados_App.PrivateAuthenticationColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'PrivateAuthentication\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.PrivateAuthenticationColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn ordinalColumn { + public int SecuritySqlConnectionId { get { - return this.columnordinal; + try { + return ((int)(this[this.tabledurados_App.SecuritySqlConnectionIdColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'SecuritySqlConnectionId\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.SecuritySqlConnectionIdColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Browsable(false)] - public int Count { + public string Title { get { - return this.Rows.Count; + try { + return ((string)(this[this.tabledurados_App.TitleColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Title\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.TitleColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public backand_ActionTemplateRow this[int index] { + public bool Basic { get { - return ((backand_ActionTemplateRow)(this.Rows[index])); + try { + return ((bool)(this[this.tabledurados_App.BasicColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Basic\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.BasicColumn] = value; } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event backand_ActionTemplateRowChangeEventHandler backand_ActionTemplateRowChanging; - - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event backand_ActionTemplateRowChangeEventHandler backand_ActionTemplateRowChanged; - - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event backand_ActionTemplateRowChangeEventHandler backand_ActionTemplateRowDeleting; - - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event backand_ActionTemplateRowChangeEventHandler backand_ActionTemplateRowDeleted; + public System.Guid Guid { + get { + return ((global::System.Guid)(this[this.tabledurados_App.GuidColumn])); + } + set { + this[this.tabledurados_App.GuidColumn] = value; + } + } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void Addbackand_ActionTemplateRow(backand_ActionTemplateRow row) { - this.Rows.Add(row); + public int ThemeId { + get { + try { + return ((int)(this[this.tabledurados_App.ThemeIdColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'ThemeId\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.ThemeIdColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public backand_ActionTemplateRow Addbackand_ActionTemplateRow( - string name, - string shortDescription, - string documentation, - System.DateTime createdDate, - System.DateTime updatedDate, - string createdBy, - string updatedBy, - string ruleName, - string objectName, - string action, - string ruleType, - string condition, - string parameters, - string code, - string executeCommand, - string executeMessage, - string json, - bool backands, - bool approved, - System.DateTime approvedDate, - string contributors, - int category, - int ordinal) { - backand_ActionTemplateRow rowbackand_ActionTemplateRow = ((backand_ActionTemplateRow)(this.NewRow())); - object[] columnValuesArray = new object[] { - null, - name, - shortDescription, - documentation, - createdDate, - updatedDate, - createdBy, - updatedBy, - ruleName, - objectName, - action, - ruleType, - condition, - parameters, - code, - executeCommand, - executeMessage, - json, - backands, - approved, - approvedDate, - contributors, - category, - ordinal}; - rowbackand_ActionTemplateRow.ItemArray = columnValuesArray; - this.Rows.Add(rowbackand_ActionTemplateRow); - return rowbackand_ActionTemplateRow; + public string CustomThemePath { + get { + try { + return ((string)(this[this.tabledurados_App.CustomThemePathColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'CustomThemePath\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.CustomThemePathColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public backand_ActionTemplateRow FindByid(int id) { - return ((backand_ActionTemplateRow)(this.Rows.Find(new object[] { - id}))); + public int DatabaseStatus { + get { + try { + return ((int)(this[this.tabledurados_App.DatabaseStatusColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'DatabaseStatus\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.DatabaseStatusColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public override global::System.Data.DataTable Clone() { - backand_ActionTemplateDataTable cln = ((backand_ActionTemplateDataTable)(base.Clone())); - cln.InitVars(); - return cln; + public int TemplateStatus { + get { + try { + return ((int)(this[this.tabledurados_App.TemplateStatusColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'TemplateStatus\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.TemplateStatusColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override global::System.Data.DataTable CreateInstance() { - return new backand_ActionTemplateDataTable(); + public int CodeStatus { + get { + try { + return ((int)(this[this.tabledurados_App.CodeStatusColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'CodeStatus\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.CodeStatusColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal void InitVars() { - this.columnid = base.Columns["id"]; - this.columnname = base.Columns["name"]; - this.columnshortDescription = base.Columns["shortDescription"]; - this.columndocumentation = base.Columns["documentation"]; - this.columncreatedDate = base.Columns["createdDate"]; - this.columnupdatedDate = base.Columns["updatedDate"]; - this.columncreatedBy = base.Columns["createdBy"]; - this.columnupdatedBy = base.Columns["updatedBy"]; - this.columnruleName = base.Columns["ruleName"]; - this.columnobjectName = base.Columns["objectName"]; - this.columnaction = base.Columns["action"]; - this.columnruleType = base.Columns["ruleType"]; - this.columncondition = base.Columns["condition"]; - this.columnparameters = base.Columns["parameters"]; - this.columncode = base.Columns["code"]; - this.columnexecuteCommand = base.Columns["executeCommand"]; - this.columnexecuteMessage = base.Columns["executeMessage"]; - this.columnjson = base.Columns["json"]; - this.columnbackands = base.Columns["backands"]; - this.columnapproved = base.Columns["approved"]; - this.columnapprovedDate = base.Columns["approvedDate"]; - this.columncontributors = base.Columns["contributors"]; - this.columncategory = base.Columns["category"]; - this.columnordinal = base.Columns["ordinal"]; + public int HostingStatus { + get { + try { + return ((int)(this[this.tabledurados_App.HostingStatusColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'HostingStatus\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.HostingStatusColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private void InitClass() { - this.columnid = new global::System.Data.DataColumn("id", typeof(int), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnid); - this.columnname = new global::System.Data.DataColumn("name", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnname); - this.columnshortDescription = new global::System.Data.DataColumn("shortDescription", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnshortDescription); - this.columndocumentation = new global::System.Data.DataColumn("documentation", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columndocumentation); - this.columncreatedDate = new global::System.Data.DataColumn("createdDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columncreatedDate); - this.columnupdatedDate = new global::System.Data.DataColumn("updatedDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnupdatedDate); - this.columncreatedBy = new global::System.Data.DataColumn("createdBy", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columncreatedBy); - this.columnupdatedBy = new global::System.Data.DataColumn("updatedBy", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnupdatedBy); - this.columnruleName = new global::System.Data.DataColumn("ruleName", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnruleName); - this.columnobjectName = new global::System.Data.DataColumn("objectName", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnobjectName); - this.columnaction = new global::System.Data.DataColumn("action", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnaction); - this.columnruleType = new global::System.Data.DataColumn("ruleType", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnruleType); - this.columncondition = new global::System.Data.DataColumn("condition", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columncondition); - this.columnparameters = new global::System.Data.DataColumn("parameters", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnparameters); - this.columncode = new global::System.Data.DataColumn("code", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columncode); - this.columnexecuteCommand = new global::System.Data.DataColumn("executeCommand", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnexecuteCommand); - this.columnexecuteMessage = new global::System.Data.DataColumn("executeMessage", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnexecuteMessage); - this.columnjson = new global::System.Data.DataColumn("json", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnjson); - this.columnbackands = new global::System.Data.DataColumn("backands", typeof(bool), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnbackands); - this.columnapproved = new global::System.Data.DataColumn("approved", typeof(bool), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnapproved); - this.columnapprovedDate = new global::System.Data.DataColumn("approvedDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnapprovedDate); - this.columncontributors = new global::System.Data.DataColumn("contributors", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columncontributors); - this.columncategory = new global::System.Data.DataColumn("category", typeof(int), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columncategory); - this.columnordinal = new global::System.Data.DataColumn("ordinal", typeof(int), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnordinal); - this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { - this.columnid}, true)); - this.columnid.AutoIncrement = true; - this.columnid.AutoIncrementSeed = -1; - this.columnid.AutoIncrementStep = -1; - this.columnid.AllowDBNull = false; - this.columnid.Unique = true; - this.columnname.AllowDBNull = false; - this.columnname.MaxLength = 250; - this.columnshortDescription.MaxLength = 2147483647; - this.columndocumentation.MaxLength = 2147483647; - this.columncreatedBy.MaxLength = 50; - this.columnupdatedBy.MaxLength = 50; - this.columnruleName.MaxLength = 50; - this.columnobjectName.MaxLength = 50; - this.columnaction.MaxLength = 50; - this.columnruleType.MaxLength = 50; - this.columncondition.MaxLength = 2147483647; - this.columnparameters.MaxLength = 2147483647; - this.columncode.MaxLength = 2147483647; - this.columnexecuteCommand.MaxLength = 2147483647; - this.columnexecuteMessage.MaxLength = 2147483647; - this.columnjson.MaxLength = 2147483647; - this.columncontributors.MaxLength = 2147483647; + public System.Guid SignUpToken { + get { + try { + return ((global::System.Guid)(this[this.tabledurados_App.SignUpTokenColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'SignUpToken\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.SignUpTokenColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public backand_ActionTemplateRow Newbackand_ActionTemplateRow() { - return ((backand_ActionTemplateRow)(this.NewRow())); + public System.Guid AnonymousToken { + get { + try { + return ((global::System.Guid)(this[this.tabledurados_App.AnonymousTokenColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'AnonymousToken\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.AnonymousTokenColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { - return new backand_ActionTemplateRow(builder); + public int PaymentStatus { + get { + try { + return ((int)(this[this.tabledurados_App.PaymentStatusColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'PaymentStatus\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.PaymentStatusColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override global::System.Type GetRowType() { - return typeof(backand_ActionTemplateRow); + public bool PaymentLocked { + get { + try { + return ((bool)(this[this.tabledurados_App.PaymentLockedColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'PaymentLocked\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.PaymentLockedColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowChanged(e); - if ((this.backand_ActionTemplateRowChanged != null)) { - this.backand_ActionTemplateRowChanged(this, new backand_ActionTemplateRowChangeEvent(((backand_ActionTemplateRow)(e.Row)), e.Action)); + public bool IsAuthApp { + get { + try { + return ((bool)(this[this.tabledurados_App.IsAuthAppColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'IsAuthApp\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.IsAuthAppColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowChanging(e); - if ((this.backand_ActionTemplateRowChanging != null)) { - this.backand_ActionTemplateRowChanging(this, new backand_ActionTemplateRowChangeEvent(((backand_ActionTemplateRow)(e.Row)), e.Action)); + public string Environment { + get { + try { + return ((string)(this[this.tabledurados_App.EnvironmentColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Environment\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.EnvironmentColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowDeleted(e); - if ((this.backand_ActionTemplateRowDeleted != null)) { - this.backand_ActionTemplateRowDeleted(this, new backand_ActionTemplateRowChangeEvent(((backand_ActionTemplateRow)(e.Row)), e.Action)); + public string EnvVar { + get { + try { + return ((string)(this[this.tabledurados_App.EnvVarColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'EnvVar\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.EnvVarColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowDeleting(e); - if ((this.backand_ActionTemplateRowDeleting != null)) { - this.backand_ActionTemplateRowDeleting(this, new backand_ActionTemplateRowChangeEvent(((backand_ActionTemplateRow)(e.Row)), e.Action)); + public int ProductType { + get { + try { + return ((int)(this[this.tabledurados_App.ProductTypeColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'ProductType\' in table \'durados_App\' is DBNull.", e); + } + } + set { + this[this.tabledurados_App.ProductTypeColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void Removebackand_ActionTemplateRow(backand_ActionTemplateRow row) { - this.Rows.Remove(row); + public durados_DataSourceTypeRow durados_DataSourceTypeRow { + get { + return ((durados_DataSourceTypeRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_App_durados_DataSourceType"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_durados_App_durados_DataSourceType"]); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { - global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); - global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); - MapDataSet ds = new MapDataSet(); - global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); - any1.Namespace = "http://www.w3.org/2001/XMLSchema"; - any1.MinOccurs = new decimal(0); - any1.MaxOccurs = decimal.MaxValue; - any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; - sequence.Items.Add(any1); - global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); - any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; - any2.MinOccurs = new decimal(1); - any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; - sequence.Items.Add(any2); - global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); - attribute1.Name = "namespace"; - attribute1.FixedValue = ds.Namespace; - type.Attributes.Add(attribute1); - global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); - attribute2.Name = "tableTypeName"; - attribute2.FixedValue = "backand_ActionTemplateDataTable"; - type.Attributes.Add(attribute2); - type.Particle = sequence; - global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); - if (xs.Contains(dsSchema.TargetNamespace)) { - global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); - global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); - try { - global::System.Xml.Schema.XmlSchema schema = null; - dsSchema.Write(s1); - for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { - schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); - s2.SetLength(0); - schema.Write(s2); - if ((s1.Length == s2.Length)) { - s1.Position = 0; - s2.Position = 0; - for (; ((s1.Position != s1.Length) - && (s1.ReadByte() == s2.ReadByte())); ) { - ; - } - if ((s1.Position == s1.Length)) { - return type; - } - } - } - } - finally { - if ((s1 != null)) { - s1.Close(); - } - if ((s2 != null)) { - s2.Close(); - } - } + public durados_SqlConnectionRow durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection { + get { + return ((durados_SqlConnectionRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_App_durados_SqlConnection"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_durados_App_durados_SqlConnection"]); } - xs.Add(dsSchema); - return type; } - } - - /// - ///Represents the strongly named DataTable class. - /// - [global::System.Serializable()] - [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] - public partial class durados_UserSocialDataTable : global::System.Data.TypedTableBase { - - private global::System.Data.DataColumn columnid; - - private global::System.Data.DataColumn columnUserId; - - private global::System.Data.DataColumn columnProvider; - - private global::System.Data.DataColumn columnSocialId; - - private global::System.Data.DataColumn columnAppId; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_UserSocialDataTable() { - this.TableName = "durados_UserSocial"; - this.BeginInit(); - this.InitClass(); - this.EndInit(); + public durados_AppRow durados_AppRowParent { + get { + return ((durados_AppRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_App_durados_Template"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_durados_App_durados_Template"]); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal durados_UserSocialDataTable(global::System.Data.DataTable table) { - this.TableName = table.TableName; - if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { - this.CaseSensitive = table.CaseSensitive; - } - if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { - this.Locale = table.Locale; + public v_durados_UserRow v_durados_UserRow { + get { + return ((v_durados_UserRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_App_durados_User"]))); } - if ((table.Namespace != table.DataSet.Namespace)) { - this.Namespace = table.Namespace; + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_durados_App_durados_User"]); } - this.Prefix = table.Prefix; - this.MinimumCapacity = table.MinimumCapacity; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected durados_UserSocialDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : - base(info, context) { - this.InitVars(); + public durados_SqlConnectionRow durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection_Security { + get { + return ((durados_SqlConnectionRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_App_durados_SqlConnection_Security"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_durados_App_durados_SqlConnection_Security"]); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn idColumn { + public durados_SqlConnectionRow durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection_System { get { - return this.columnid; + return ((durados_SqlConnectionRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_App_durados_SqlConnection_System"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["FK_durados_App_durados_SqlConnection_System"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn UserIdColumn { - get { - return this.columnUserId; - } + public bool IsToDeleteDateNull() { + return this.IsNull(this.tabledurados_App.ToDeleteDateColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn ProviderColumn { - get { - return this.columnProvider; - } + public void SetToDeleteDateNull() { + this[this.tabledurados_App.ToDeleteDateColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn SocialIdColumn { - get { - return this.columnSocialId; - } + public bool IsDeletedDateNull() { + return this.IsNull(this.tabledurados_App.DeletedDateColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn AppIdColumn { - get { - return this.columnAppId; - } + public void SetDeletedDateNull() { + this[this.tabledurados_App.DeletedDateColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Browsable(false)] - public int Count { - get { - return this.Rows.Count; - } + public bool IsDataSourceTypeIdNull() { + return this.IsNull(this.tabledurados_App.DataSourceTypeIdColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_UserSocialRow this[int index] { - get { - return ((durados_UserSocialRow)(this.Rows[index])); - } + public void SetDataSourceTypeIdNull() { + this[this.tabledurados_App.DataSourceTypeIdColumn] = global::System.Convert.DBNull; } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_UserSocialRowChangeEventHandler durados_UserSocialRowChanging; + public bool IsSqlConnectionIdNull() { + return this.IsNull(this.tabledurados_App.SqlConnectionIdColumn); + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_UserSocialRowChangeEventHandler durados_UserSocialRowChanged; + public void SetSqlConnectionIdNull() { + this[this.tabledurados_App.SqlConnectionIdColumn] = global::System.Convert.DBNull; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_UserSocialRowChangeEventHandler durados_UserSocialRowDeleting; + public bool IsUsesSpecificBinaryNull() { + return this.IsNull(this.tabledurados_App.UsesSpecificBinaryColumn); + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event durados_UserSocialRowChangeEventHandler durados_UserSocialRowDeleted; + public void SetUsesSpecificBinaryNull() { + this[this.tabledurados_App.UsesSpecificBinaryColumn] = global::System.Convert.DBNull; + } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void Adddurados_UserSocialRow(durados_UserSocialRow row) { - this.Rows.Add(row); + public bool IsUrlNull() { + return this.IsNull(this.tabledurados_App.UrlColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_UserSocialRow Adddurados_UserSocialRow(v_durados_UserRow parentv_durados_UserRowByv_durados_User_durados_UserSocial, string Provider, string SocialId, durados_AppRow parentdurados_AppRowBydurados_App_durados_UserSocial) { - durados_UserSocialRow rowdurados_UserSocialRow = ((durados_UserSocialRow)(this.NewRow())); - object[] columnValuesArray = new object[] { - null, - null, - Provider, - SocialId, - null}; - if ((parentv_durados_UserRowByv_durados_User_durados_UserSocial != null)) { - columnValuesArray[1] = parentv_durados_UserRowByv_durados_User_durados_UserSocial[0]; - } - if ((parentdurados_AppRowBydurados_App_durados_UserSocial != null)) { - columnValuesArray[4] = parentdurados_AppRowBydurados_App_durados_UserSocial[0]; - } - rowdurados_UserSocialRow.ItemArray = columnValuesArray; - this.Rows.Add(rowdurados_UserSocialRow); - return rowdurados_UserSocialRow; + public void SetUrlNull() { + this[this.tabledurados_App.UrlColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_UserSocialRow FindByid(int id) { - return ((durados_UserSocialRow)(this.Rows.Find(new object[] { - id}))); + public bool IsImageNull() { + return this.IsNull(this.tabledurados_App.ImageColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public override global::System.Data.DataTable Clone() { - durados_UserSocialDataTable cln = ((durados_UserSocialDataTable)(base.Clone())); - cln.InitVars(); - return cln; + public void SetImageNull() { + this[this.tabledurados_App.ImageColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override global::System.Data.DataTable CreateInstance() { - return new durados_UserSocialDataTable(); + public bool IsExistingDataSourceNull() { + return this.IsNull(this.tabledurados_App.ExistingDataSourceColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal void InitVars() { - this.columnid = base.Columns["id"]; - this.columnUserId = base.Columns["UserId"]; - this.columnProvider = base.Columns["Provider"]; - this.columnSocialId = base.Columns["SocialId"]; - this.columnAppId = base.Columns["AppId"]; + public void SetExistingDataSourceNull() { + this[this.tabledurados_App.ExistingDataSourceColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private void InitClass() { - this.columnid = new global::System.Data.DataColumn("id", typeof(int), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnid); - this.columnUserId = new global::System.Data.DataColumn("UserId", typeof(int), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnUserId); - this.columnProvider = new global::System.Data.DataColumn("Provider", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnProvider); - this.columnSocialId = new global::System.Data.DataColumn("SocialId", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnSocialId); - this.columnAppId = new global::System.Data.DataColumn("AppId", typeof(int), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnAppId); - this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { - this.columnid}, true)); - this.columnid.AutoIncrement = true; - this.columnid.AutoIncrementSeed = -1; - this.columnid.AutoIncrementStep = -1; - this.columnid.AllowDBNull = false; - this.columnid.ReadOnly = true; - this.columnid.Unique = true; - this.columnUserId.AllowDBNull = false; - this.columnProvider.AllowDBNull = false; - this.columnProvider.MaxLength = 50; - this.columnSocialId.AllowDBNull = false; - this.columnSocialId.MaxLength = 50; + public bool IsTemplateIdNull() { + return this.IsNull(this.tabledurados_App.TemplateIdColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_UserSocialRow Newdurados_UserSocialRow() { - return ((durados_UserSocialRow)(this.NewRow())); + public void SetTemplateIdNull() { + this[this.tabledurados_App.TemplateIdColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { - return new durados_UserSocialRow(builder); + public bool IsExcelFileNameNull() { + return this.IsNull(this.tabledurados_App.ExcelFileNameColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override global::System.Type GetRowType() { - return typeof(durados_UserSocialRow); + public void SetExcelFileNameNull() { + this[this.tabledurados_App.ExcelFileNameColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowChanged(e); - if ((this.durados_UserSocialRowChanged != null)) { - this.durados_UserSocialRowChanged(this, new durados_UserSocialRowChangeEvent(((durados_UserSocialRow)(e.Row)), e.Action)); - } + public bool IsSpecificDOTNETNull() { + return this.IsNull(this.tabledurados_App.SpecificDOTNETColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowChanging(e); - if ((this.durados_UserSocialRowChanging != null)) { - this.durados_UserSocialRowChanging(this, new durados_UserSocialRowChangeEvent(((durados_UserSocialRow)(e.Row)), e.Action)); - } + public void SetSpecificDOTNETNull() { + this[this.tabledurados_App.SpecificDOTNETColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowDeleted(e); - if ((this.durados_UserSocialRowDeleted != null)) { - this.durados_UserSocialRowDeleted(this, new durados_UserSocialRowChangeEvent(((durados_UserSocialRow)(e.Row)), e.Action)); - } + public bool IsSpecificJSNull() { + return this.IsNull(this.tabledurados_App.SpecificJSColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowDeleting(e); - if ((this.durados_UserSocialRowDeleting != null)) { - this.durados_UserSocialRowDeleting(this, new durados_UserSocialRowChangeEvent(((durados_UserSocialRow)(e.Row)), e.Action)); - } + public void SetSpecificJSNull() { + this[this.tabledurados_App.SpecificJSColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void Removedurados_UserSocialRow(durados_UserSocialRow row) { - this.Rows.Remove(row); + public bool IsSpecificCssNull() { + return this.IsNull(this.tabledurados_App.SpecificCssColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { - global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); - global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); - MapDataSet ds = new MapDataSet(); - global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); - any1.Namespace = "http://www.w3.org/2001/XMLSchema"; - any1.MinOccurs = new decimal(0); - any1.MaxOccurs = decimal.MaxValue; - any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; - sequence.Items.Add(any1); - global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); - any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; - any2.MinOccurs = new decimal(1); - any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; - sequence.Items.Add(any2); - global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); - attribute1.Name = "namespace"; - attribute1.FixedValue = ds.Namespace; - type.Attributes.Add(attribute1); - global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); - attribute2.Name = "tableTypeName"; - attribute2.FixedValue = "durados_UserSocialDataTable"; - type.Attributes.Add(attribute2); - type.Particle = sequence; - global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); - if (xs.Contains(dsSchema.TargetNamespace)) { - global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); - global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); - try { - global::System.Xml.Schema.XmlSchema schema = null; - dsSchema.Write(s1); - for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { - schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); - s2.SetLength(0); - schema.Write(s2); - if ((s1.Length == s2.Length)) { - s1.Position = 0; - s2.Position = 0; - for (; ((s1.Position != s1.Length) - && (s1.ReadByte() == s2.ReadByte())); ) { - ; - } - if ((s1.Position == s1.Length)) { - return type; - } - } - } - } - finally { - if ((s1 != null)) { - s1.Close(); - } - if ((s2 != null)) { - s2.Close(); - } - } - } - xs.Add(dsSchema); - return type; + public void SetSpecificCssNull() { + this[this.tabledurados_App.SpecificCssColumn] = global::System.Convert.DBNull; } - } - - /// - ///Represents strongly named DataRow class. - /// - public partial class durados_AppRow : global::System.Data.DataRow { - private durados_AppDataTable tabledurados_App; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsUseAsTemplateNull() { + return this.IsNull(this.tabledurados_App.UseAsTemplateColumn); + } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal durados_AppRow(global::System.Data.DataRowBuilder rb) : - base(rb) { - this.tabledurados_App = ((durados_AppDataTable)(this.Table)); + public void SetUseAsTemplateNull() { + this[this.tabledurados_App.UseAsTemplateColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int Id { - get { - return ((int)(this[this.tabledurados_App.IdColumn])); - } - set { - this[this.tabledurados_App.IdColumn] = value; - } + public bool IsDescriptionNull() { + return this.IsNull(this.tabledurados_App.DescriptionColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Name { - get { - return ((string)(this[this.tabledurados_App.NameColumn])); - } - set { - this[this.tabledurados_App.NameColumn] = value; - } + public void SetDescriptionNull() { + this[this.tabledurados_App.DescriptionColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int Creator { - get { - return ((int)(this[this.tabledurados_App.CreatorColumn])); - } - set { - this[this.tabledurados_App.CreatorColumn] = value; - } + public bool IsTemplateFileNull() { + return this.IsNull(this.tabledurados_App.TemplateFileColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public System.DateTime CreatedDate { - get { - return ((global::System.DateTime)(this[this.tabledurados_App.CreatedDateColumn])); - } - set { - this[this.tabledurados_App.CreatedDateColumn] = value; - } + public void SetTemplateFileNull() { + this[this.tabledurados_App.TemplateFileColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool ToDelete { - get { - return ((bool)(this[this.tabledurados_App.ToDeleteColumn])); - } - set { - this[this.tabledurados_App.ToDeleteColumn] = value; - } + public bool IsSystemSqlConnectionIdNull() { + return this.IsNull(this.tabledurados_App.SystemSqlConnectionIdColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public System.DateTime ToDeleteDate { - get { - try { - return ((global::System.DateTime)(this[this.tabledurados_App.ToDeleteDateColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'ToDeleteDate\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.ToDeleteDateColumn] = value; - } + public void SetSystemSqlConnectionIdNull() { + this[this.tabledurados_App.SystemSqlConnectionIdColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool Deleted { - get { - return ((bool)(this[this.tabledurados_App.DeletedColumn])); - } - set { - this[this.tabledurados_App.DeletedColumn] = value; - } + public bool IsPrivateAuthenticationNull() { + return this.IsNull(this.tabledurados_App.PrivateAuthenticationColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public System.DateTime DeletedDate { - get { - try { - return ((global::System.DateTime)(this[this.tabledurados_App.DeletedDateColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'DeletedDate\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.DeletedDateColumn] = value; - } + public void SetPrivateAuthenticationNull() { + this[this.tabledurados_App.PrivateAuthenticationColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int DataSourceTypeId { - get { - try { - return ((int)(this[this.tabledurados_App.DataSourceTypeIdColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'DataSourceTypeId\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.DataSourceTypeIdColumn] = value; - } + public bool IsSecuritySqlConnectionIdNull() { + return this.IsNull(this.tabledurados_App.SecuritySqlConnectionIdColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int SqlConnectionId { - get { - try { - return ((int)(this[this.tabledurados_App.SqlConnectionIdColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'SqlConnectionId\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.SqlConnectionIdColumn] = value; - } + public void SetSecuritySqlConnectionIdNull() { + this[this.tabledurados_App.SecuritySqlConnectionIdColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool UsesSpecificBinary { - get { - try { - return ((bool)(this[this.tabledurados_App.UsesSpecificBinaryColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'UsesSpecificBinary\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.UsesSpecificBinaryColumn] = value; - } + public bool IsTitleNull() { + return this.IsNull(this.tabledurados_App.TitleColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Url { - get { - try { - return ((string)(this[this.tabledurados_App.UrlColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Url\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.UrlColumn] = value; - } + public void SetTitleNull() { + this[this.tabledurados_App.TitleColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Image { - get { - try { - return ((string)(this[this.tabledurados_App.ImageColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Image\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.ImageColumn] = value; - } + public bool IsBasicNull() { + return this.IsNull(this.tabledurados_App.BasicColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool ExistingDataSource { - get { - try { - return ((bool)(this[this.tabledurados_App.ExistingDataSourceColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'ExistingDataSource\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.ExistingDataSourceColumn] = value; - } + public void SetBasicNull() { + this[this.tabledurados_App.BasicColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int TemplateId { - get { - try { - return ((int)(this[this.tabledurados_App.TemplateIdColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'TemplateId\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.TemplateIdColumn] = value; - } + public bool IsThemeIdNull() { + return this.IsNull(this.tabledurados_App.ThemeIdColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string ExcelFileName { - get { - try { - return ((string)(this[this.tabledurados_App.ExcelFileNameColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'ExcelFileName\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.ExcelFileNameColumn] = value; - } + public void SetThemeIdNull() { + this[this.tabledurados_App.ThemeIdColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string SpecificDOTNET { - get { - try { - return ((string)(this[this.tabledurados_App.SpecificDOTNETColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'SpecificDOTNET\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.SpecificDOTNETColumn] = value; - } + public bool IsCustomThemePathNull() { + return this.IsNull(this.tabledurados_App.CustomThemePathColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string SpecificJS { - get { - try { - return ((string)(this[this.tabledurados_App.SpecificJSColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'SpecificJS\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.SpecificJSColumn] = value; - } + public void SetCustomThemePathNull() { + this[this.tabledurados_App.CustomThemePathColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string SpecificCss { - get { - try { - return ((string)(this[this.tabledurados_App.SpecificCssColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'SpecificCss\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.SpecificCssColumn] = value; - } + public bool IsDatabaseStatusNull() { + return this.IsNull(this.tabledurados_App.DatabaseStatusColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool UseAsTemplate { - get { - try { - return ((bool)(this[this.tabledurados_App.UseAsTemplateColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'UseAsTemplate\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.UseAsTemplateColumn] = value; - } + public void SetDatabaseStatusNull() { + this[this.tabledurados_App.DatabaseStatusColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Description { - get { - try { - return ((string)(this[this.tabledurados_App.DescriptionColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Description\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.DescriptionColumn] = value; - } + public bool IsTemplateStatusNull() { + return this.IsNull(this.tabledurados_App.TemplateStatusColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string TemplateFile { - get { - try { - return ((string)(this[this.tabledurados_App.TemplateFileColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'TemplateFile\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.TemplateFileColumn] = value; - } + public void SetTemplateStatusNull() { + this[this.tabledurados_App.TemplateStatusColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int SystemSqlConnectionId { - get { - try { - return ((int)(this[this.tabledurados_App.SystemSqlConnectionIdColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'SystemSqlConnectionId\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.SystemSqlConnectionIdColumn] = value; - } + public bool IsCodeStatusNull() { + return this.IsNull(this.tabledurados_App.CodeStatusColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool PrivateAuthentication { - get { - try { - return ((bool)(this[this.tabledurados_App.PrivateAuthenticationColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'PrivateAuthentication\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.PrivateAuthenticationColumn] = value; - } + public void SetCodeStatusNull() { + this[this.tabledurados_App.CodeStatusColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int SecuritySqlConnectionId { - get { - try { - return ((int)(this[this.tabledurados_App.SecuritySqlConnectionIdColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'SecuritySqlConnectionId\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.SecuritySqlConnectionIdColumn] = value; - } + public bool IsHostingStatusNull() { + return this.IsNull(this.tabledurados_App.HostingStatusColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Title { - get { - try { - return ((string)(this[this.tabledurados_App.TitleColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Title\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.TitleColumn] = value; - } + public void SetHostingStatusNull() { + this[this.tabledurados_App.HostingStatusColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool Basic { - get { - try { - return ((bool)(this[this.tabledurados_App.BasicColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Basic\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.BasicColumn] = value; - } + public bool IsSignUpTokenNull() { + return this.IsNull(this.tabledurados_App.SignUpTokenColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public System.Guid Guid { - get { - return ((global::System.Guid)(this[this.tabledurados_App.GuidColumn])); - } - set { - this[this.tabledurados_App.GuidColumn] = value; - } + public void SetSignUpTokenNull() { + this[this.tabledurados_App.SignUpTokenColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int ThemeId { - get { - try { - return ((int)(this[this.tabledurados_App.ThemeIdColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'ThemeId\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.ThemeIdColumn] = value; - } + public bool IsAnonymousTokenNull() { + return this.IsNull(this.tabledurados_App.AnonymousTokenColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string CustomThemePath { - get { - try { - return ((string)(this[this.tabledurados_App.CustomThemePathColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'CustomThemePath\' in table \'durados_App\' is DBNull.", e); - } - } - set { - this[this.tabledurados_App.CustomThemePathColumn] = value; - } + public void SetAnonymousTokenNull() { + this[this.tabledurados_App.AnonymousTokenColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int DatabaseStatus { + public bool IsPaymentStatusNull() { + return this.IsNull(this.tabledurados_App.PaymentStatusColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetPaymentStatusNull() { + this[this.tabledurados_App.PaymentStatusColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsPaymentLockedNull() { + return this.IsNull(this.tabledurados_App.PaymentLockedColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetPaymentLockedNull() { + this[this.tabledurados_App.PaymentLockedColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsIsAuthAppNull() { + return this.IsNull(this.tabledurados_App.IsAuthAppColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetIsAuthAppNull() { + this[this.tabledurados_App.IsAuthAppColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsEnvironmentNull() { + return this.IsNull(this.tabledurados_App.EnvironmentColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetEnvironmentNull() { + this[this.tabledurados_App.EnvironmentColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsEnvVarNull() { + return this.IsNull(this.tabledurados_App.EnvVarColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetEnvVarNull() { + this[this.tabledurados_App.EnvVarColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsProductTypeNull() { + return this.IsNull(this.tabledurados_App.ProductTypeColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetProductTypeNull() { + this[this.tabledurados_App.ProductTypeColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public durados_AppRow[] Getdurados_AppRows() { + if ((this.Table.ChildRelations["FK_durados_App_durados_Template"] == null)) { + return new durados_AppRow[0]; + } + else { + return ((durados_AppRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_App_durados_Template"]))); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public durados_UserAppRow[] Getdurados_UserAppRows() { + if ((this.Table.ChildRelations["FK_durados_UserApp_durados_App"] == null)) { + return new durados_UserAppRow[0]; + } + else { + return ((durados_UserAppRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_UserApp_durados_App"]))); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public durados_UserSocialRow[] Getdurados_UserSocialRows() { + if ((this.Table.ChildRelations["durados_App_durados_UserSocial"] == null)) { + return new durados_UserSocialRow[0]; + } + else { + return ((durados_UserSocialRow[])(base.GetChildRows(this.Table.ChildRelations["durados_App_durados_UserSocial"]))); + } + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class durados_SqlConnectionRow : global::System.Data.DataRow { + + private durados_SqlConnectionDataTable tabledurados_SqlConnection; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal durados_SqlConnectionRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tabledurados_SqlConnection = ((durados_SqlConnectionDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Id { get { - try { - return ((int)(this[this.tabledurados_App.DatabaseStatusColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'DatabaseStatus\' in table \'durados_App\' is DBNull.", e); - } + return ((int)(this[this.tabledurados_SqlConnection.IdColumn])); } set { - this[this.tabledurados_App.DatabaseStatusColumn] = value; + this[this.tabledurados_SqlConnection.IdColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int TemplateStatus { + public string ServerName { get { try { - return ((int)(this[this.tabledurados_App.TemplateStatusColumn])); + return ((string)(this[this.tabledurados_SqlConnection.ServerNameColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'TemplateStatus\' in table \'durados_App\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'ServerName\' in table \'durados_SqlConnection\' is DBNull.", e); } } set { - this[this.tabledurados_App.TemplateStatusColumn] = value; + this[this.tabledurados_SqlConnection.ServerNameColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int CodeStatus { + public string Catalog { get { try { - return ((int)(this[this.tabledurados_App.CodeStatusColumn])); + return ((string)(this[this.tabledurados_SqlConnection.CatalogColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'CodeStatus\' in table \'durados_App\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'Catalog\' in table \'durados_SqlConnection\' is DBNull.", e); } } set { - this[this.tabledurados_App.CodeStatusColumn] = value; + this[this.tabledurados_SqlConnection.CatalogColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int HostingStatus { + public string Username { get { try { - return ((int)(this[this.tabledurados_App.HostingStatusColumn])); + return ((string)(this[this.tabledurados_SqlConnection.UsernameColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'HostingStatus\' in table \'durados_App\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'Username\' in table \'durados_SqlConnection\' is DBNull.", e); } } set { - this[this.tabledurados_App.HostingStatusColumn] = value; + this[this.tabledurados_SqlConnection.UsernameColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public System.Guid SignUpToken { + public string Password { get { try { - return ((global::System.Guid)(this[this.tabledurados_App.SignUpTokenColumn])); + return ((string)(this[this.tabledurados_SqlConnection.PasswordColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'SignUpToken\' in table \'durados_App\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'Password\' in table \'durados_SqlConnection\' is DBNull.", e); } } set { - this[this.tabledurados_App.SignUpTokenColumn] = value; + this[this.tabledurados_SqlConnection.PasswordColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public System.Guid AnonymousToken { + public bool IntegratedSecurity { get { try { - return ((global::System.Guid)(this[this.tabledurados_App.AnonymousTokenColumn])); + return ((bool)(this[this.tabledurados_SqlConnection.IntegratedSecurityColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'AnonymousToken\' in table \'durados_App\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'IntegratedSecurity\' in table \'durados_SqlConnection\' is DBN" + + "ull.", e); } } set { - this[this.tabledurados_App.AnonymousTokenColumn] = value; + this[this.tabledurados_SqlConnection.IntegratedSecurityColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int PaymentStatus { + public int DuradosUser { get { try { - return ((int)(this[this.tabledurados_App.PaymentStatusColumn])); + return ((int)(this[this.tabledurados_SqlConnection.DuradosUserColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'PaymentStatus\' in table \'durados_App\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'DuradosUser\' in table \'durados_SqlConnection\' is DBNull.", e); } } set { - this[this.tabledurados_App.PaymentStatusColumn] = value; + this[this.tabledurados_SqlConnection.DuradosUserColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool PaymentLocked { + public int SqlProductId { get { try { - return ((bool)(this[this.tabledurados_App.PaymentLockedColumn])); + return ((int)(this[this.tabledurados_SqlConnection.SqlProductIdColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'PaymentLocked\' in table \'durados_App\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'SqlProductId\' in table \'durados_SqlConnection\' is DBNull.", e); } } set { - this[this.tabledurados_App.PaymentLockedColumn] = value; + this[this.tabledurados_SqlConnection.SqlProductIdColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsAuthApp { + public string ProductPort { get { try { - return ((bool)(this[this.tabledurados_App.IsAuthAppColumn])); + return ((string)(this[this.tabledurados_SqlConnection.ProductPortColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'IsAuthApp\' in table \'durados_App\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'ProductPort\' in table \'durados_SqlConnection\' is DBNull.", e); } } set { - this[this.tabledurados_App.IsAuthAppColumn] = value; + this[this.tabledurados_SqlConnection.ProductPortColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Environment { + public string SshRemoteHost { get { try { - return ((string)(this[this.tabledurados_App.EnvironmentColumn])); + return ((string)(this[this.tabledurados_SqlConnection.SshRemoteHostColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Environment\' in table \'durados_App\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'SshRemoteHost\' in table \'durados_SqlConnection\' is DBNull.", e); } } set { - this[this.tabledurados_App.EnvironmentColumn] = value; + this[this.tabledurados_SqlConnection.SshRemoteHostColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string EnvVar { + public int SshPort { get { try { - return ((string)(this[this.tabledurados_App.EnvVarColumn])); + return ((int)(this[this.tabledurados_SqlConnection.SshPortColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'EnvVar\' in table \'durados_App\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'SshPort\' in table \'durados_SqlConnection\' is DBNull.", e); } } set { - this[this.tabledurados_App.EnvVarColumn] = value; + this[this.tabledurados_SqlConnection.SshPortColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int ProductType { + public string SshUser { get { try { - return ((int)(this[this.tabledurados_App.ProductTypeColumn])); + return ((string)(this[this.tabledurados_SqlConnection.SshUserColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'ProductType\' in table \'durados_App\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'SshUser\' in table \'durados_SqlConnection\' is DBNull.", e); } } set { - this[this.tabledurados_App.ProductTypeColumn] = value; + this[this.tabledurados_SqlConnection.SshUserColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_DataSourceTypeRow durados_DataSourceTypeRow { + public string SshPassword { get { - return ((durados_DataSourceTypeRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_App_durados_DataSourceType"]))); + try { + return ((string)(this[this.tabledurados_SqlConnection.SshPasswordColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'SshPassword\' in table \'durados_SqlConnection\' is DBNull.", e); + } } set { - this.SetParentRow(value, this.Table.ParentRelations["FK_durados_App_durados_DataSourceType"]); + this[this.tabledurados_SqlConnection.SshPasswordColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_SqlConnectionRow durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection { + public bool SshUses { get { - return ((durados_SqlConnectionRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_App_durados_SqlConnection"]))); + try { + return ((bool)(this[this.tabledurados_SqlConnection.SshUsesColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'SshUses\' in table \'durados_SqlConnection\' is DBNull.", e); + } } set { - this.SetParentRow(value, this.Table.ParentRelations["FK_durados_App_durados_SqlConnection"]); + this[this.tabledurados_SqlConnection.SshUsesColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppRow durados_AppRowParent { + public bool SslUses { get { - return ((durados_AppRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_App_durados_Template"]))); + try { + return ((bool)(this[this.tabledurados_SqlConnection.SslUsesColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'SslUses\' in table \'durados_SqlConnection\' is DBNull.", e); + } } set { - this.SetParentRow(value, this.Table.ParentRelations["FK_durados_App_durados_Template"]); + this[this.tabledurados_SqlConnection.SslUsesColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public v_durados_UserRow v_durados_UserRow { + public string SshPrivateKey { get { - return ((v_durados_UserRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_App_durados_User"]))); + try { + return ((string)(this[this.tabledurados_SqlConnection.SshPrivateKeyColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'SshPrivateKey\' in table \'durados_SqlConnection\' is DBNull.", e); + } } set { - this.SetParentRow(value, this.Table.ParentRelations["FK_durados_App_durados_User"]); + this[this.tabledurados_SqlConnection.SshPrivateKeyColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_SqlConnectionRow durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection_Security { + public v_durados_UserRow v_durados_UserRow { get { - return ((durados_SqlConnectionRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_App_durados_SqlConnection_Security"]))); + return ((v_durados_UserRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_SqlConnection_durados_User"]))); } set { - this.SetParentRow(value, this.Table.ParentRelations["FK_durados_App_durados_SqlConnection_Security"]); + this.SetParentRow(value, this.Table.ParentRelations["FK_durados_SqlConnection_durados_User"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_SqlConnectionRow durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection_System { + public durados_SqlProductRow durados_SqlProductRow { get { - return ((durados_SqlConnectionRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_App_durados_SqlConnection_System"]))); + return ((durados_SqlProductRow)(this.GetParentRow(this.Table.ParentRelations["durados_SqlProduct_durados_SqlConnection"]))); } set { - this.SetParentRow(value, this.Table.ParentRelations["FK_durados_App_durados_SqlConnection_System"]); + this.SetParentRow(value, this.Table.ParentRelations["durados_SqlProduct_durados_SqlConnection"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_ThemeRow durados_ThemeRow { - get { - return ((durados_ThemeRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_App_durados_Theme"]))); - } - set { - this.SetParentRow(value, this.Table.ParentRelations["FK_durados_App_durados_Theme"]); - } + public bool IsServerNameNull() { + return this.IsNull(this.tabledurados_SqlConnection.ServerNameColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsToDeleteDateNull() { - return this.IsNull(this.tabledurados_App.ToDeleteDateColumn); + public void SetServerNameNull() { + this[this.tabledurados_SqlConnection.ServerNameColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetToDeleteDateNull() { - this[this.tabledurados_App.ToDeleteDateColumn] = global::System.Convert.DBNull; + public bool IsCatalogNull() { + return this.IsNull(this.tabledurados_SqlConnection.CatalogColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsDeletedDateNull() { - return this.IsNull(this.tabledurados_App.DeletedDateColumn); + public void SetCatalogNull() { + this[this.tabledurados_SqlConnection.CatalogColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetDeletedDateNull() { - this[this.tabledurados_App.DeletedDateColumn] = global::System.Convert.DBNull; + public bool IsUsernameNull() { + return this.IsNull(this.tabledurados_SqlConnection.UsernameColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsDataSourceTypeIdNull() { - return this.IsNull(this.tabledurados_App.DataSourceTypeIdColumn); + public void SetUsernameNull() { + this[this.tabledurados_SqlConnection.UsernameColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetDataSourceTypeIdNull() { - this[this.tabledurados_App.DataSourceTypeIdColumn] = global::System.Convert.DBNull; + public bool IsPasswordNull() { + return this.IsNull(this.tabledurados_SqlConnection.PasswordColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsSqlConnectionIdNull() { - return this.IsNull(this.tabledurados_App.SqlConnectionIdColumn); + public void SetPasswordNull() { + this[this.tabledurados_SqlConnection.PasswordColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetSqlConnectionIdNull() { - this[this.tabledurados_App.SqlConnectionIdColumn] = global::System.Convert.DBNull; + public bool IsIntegratedSecurityNull() { + return this.IsNull(this.tabledurados_SqlConnection.IntegratedSecurityColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsUsesSpecificBinaryNull() { - return this.IsNull(this.tabledurados_App.UsesSpecificBinaryColumn); + public void SetIntegratedSecurityNull() { + this[this.tabledurados_SqlConnection.IntegratedSecurityColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetUsesSpecificBinaryNull() { - this[this.tabledurados_App.UsesSpecificBinaryColumn] = global::System.Convert.DBNull; + public bool IsDuradosUserNull() { + return this.IsNull(this.tabledurados_SqlConnection.DuradosUserColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsUrlNull() { - return this.IsNull(this.tabledurados_App.UrlColumn); + public void SetDuradosUserNull() { + this[this.tabledurados_SqlConnection.DuradosUserColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetUrlNull() { - this[this.tabledurados_App.UrlColumn] = global::System.Convert.DBNull; + public bool IsSqlProductIdNull() { + return this.IsNull(this.tabledurados_SqlConnection.SqlProductIdColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsImageNull() { - return this.IsNull(this.tabledurados_App.ImageColumn); + public void SetSqlProductIdNull() { + this[this.tabledurados_SqlConnection.SqlProductIdColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetImageNull() { - this[this.tabledurados_App.ImageColumn] = global::System.Convert.DBNull; + public bool IsProductPortNull() { + return this.IsNull(this.tabledurados_SqlConnection.ProductPortColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsExistingDataSourceNull() { - return this.IsNull(this.tabledurados_App.ExistingDataSourceColumn); + public void SetProductPortNull() { + this[this.tabledurados_SqlConnection.ProductPortColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetExistingDataSourceNull() { - this[this.tabledurados_App.ExistingDataSourceColumn] = global::System.Convert.DBNull; + public bool IsSshRemoteHostNull() { + return this.IsNull(this.tabledurados_SqlConnection.SshRemoteHostColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsTemplateIdNull() { - return this.IsNull(this.tabledurados_App.TemplateIdColumn); + public void SetSshRemoteHostNull() { + this[this.tabledurados_SqlConnection.SshRemoteHostColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetTemplateIdNull() { - this[this.tabledurados_App.TemplateIdColumn] = global::System.Convert.DBNull; + public bool IsSshPortNull() { + return this.IsNull(this.tabledurados_SqlConnection.SshPortColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsExcelFileNameNull() { - return this.IsNull(this.tabledurados_App.ExcelFileNameColumn); + public void SetSshPortNull() { + this[this.tabledurados_SqlConnection.SshPortColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetExcelFileNameNull() { - this[this.tabledurados_App.ExcelFileNameColumn] = global::System.Convert.DBNull; + public bool IsSshUserNull() { + return this.IsNull(this.tabledurados_SqlConnection.SshUserColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsSpecificDOTNETNull() { - return this.IsNull(this.tabledurados_App.SpecificDOTNETColumn); + public void SetSshUserNull() { + this[this.tabledurados_SqlConnection.SshUserColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetSpecificDOTNETNull() { - this[this.tabledurados_App.SpecificDOTNETColumn] = global::System.Convert.DBNull; + public bool IsSshPasswordNull() { + return this.IsNull(this.tabledurados_SqlConnection.SshPasswordColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsSpecificJSNull() { - return this.IsNull(this.tabledurados_App.SpecificJSColumn); + public void SetSshPasswordNull() { + this[this.tabledurados_SqlConnection.SshPasswordColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetSpecificJSNull() { - this[this.tabledurados_App.SpecificJSColumn] = global::System.Convert.DBNull; + public bool IsSshUsesNull() { + return this.IsNull(this.tabledurados_SqlConnection.SshUsesColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsSpecificCssNull() { - return this.IsNull(this.tabledurados_App.SpecificCssColumn); + public void SetSshUsesNull() { + this[this.tabledurados_SqlConnection.SshUsesColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetSpecificCssNull() { - this[this.tabledurados_App.SpecificCssColumn] = global::System.Convert.DBNull; + public bool IsSslUsesNull() { + return this.IsNull(this.tabledurados_SqlConnection.SslUsesColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsUseAsTemplateNull() { - return this.IsNull(this.tabledurados_App.UseAsTemplateColumn); + public void SetSslUsesNull() { + this[this.tabledurados_SqlConnection.SslUsesColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetUseAsTemplateNull() { - this[this.tabledurados_App.UseAsTemplateColumn] = global::System.Convert.DBNull; + public bool IsSshPrivateKeyNull() { + return this.IsNull(this.tabledurados_SqlConnection.SshPrivateKeyColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsDescriptionNull() { - return this.IsNull(this.tabledurados_App.DescriptionColumn); + public void SetSshPrivateKeyNull() { + this[this.tabledurados_SqlConnection.SshPrivateKeyColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetDescriptionNull() { - this[this.tabledurados_App.DescriptionColumn] = global::System.Convert.DBNull; + public durados_AppRow[] Getdurados_AppRowsByFK_durados_App_durados_SqlConnection() { + if ((this.Table.ChildRelations["FK_durados_App_durados_SqlConnection"] == null)) { + return new durados_AppRow[0]; + } + else { + return ((durados_AppRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_App_durados_SqlConnection"]))); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsTemplateFileNull() { - return this.IsNull(this.tabledurados_App.TemplateFileColumn); + public durados_AppRow[] Getdurados_AppRowsByFK_durados_App_durados_SqlConnection_Security() { + if ((this.Table.ChildRelations["FK_durados_App_durados_SqlConnection_Security"] == null)) { + return new durados_AppRow[0]; + } + else { + return ((durados_AppRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_App_durados_SqlConnection_Security"]))); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetTemplateFileNull() { - this[this.tabledurados_App.TemplateFileColumn] = global::System.Convert.DBNull; + public durados_AppRow[] Getdurados_AppRowsByFK_durados_App_durados_SqlConnection_System() { + if ((this.Table.ChildRelations["FK_durados_App_durados_SqlConnection_System"] == null)) { + return new durados_AppRow[0]; + } + else { + return ((durados_AppRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_App_durados_SqlConnection_System"]))); + } } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class v_durados_UserRow : global::System.Data.DataRow { - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsSystemSqlConnectionIdNull() { - return this.IsNull(this.tabledurados_App.SystemSqlConnectionIdColumn); - } + private v_durados_UserDataTable tablev_durados_User; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetSystemSqlConnectionIdNull() { - this[this.tabledurados_App.SystemSqlConnectionIdColumn] = global::System.Convert.DBNull; + internal v_durados_UserRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tablev_durados_User = ((v_durados_UserDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsPrivateAuthenticationNull() { - return this.IsNull(this.tabledurados_App.PrivateAuthenticationColumn); + public int ID { + get { + return ((int)(this[this.tablev_durados_User.IDColumn])); + } + set { + this[this.tablev_durados_User.IDColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetPrivateAuthenticationNull() { - this[this.tabledurados_App.PrivateAuthenticationColumn] = global::System.Convert.DBNull; + public string Username { + get { + return ((string)(this[this.tablev_durados_User.UsernameColumn])); + } + set { + this[this.tablev_durados_User.UsernameColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsSecuritySqlConnectionIdNull() { - return this.IsNull(this.tabledurados_App.SecuritySqlConnectionIdColumn); + public string FirstName { + get { + return ((string)(this[this.tablev_durados_User.FirstNameColumn])); + } + set { + this[this.tablev_durados_User.FirstNameColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetSecuritySqlConnectionIdNull() { - this[this.tabledurados_App.SecuritySqlConnectionIdColumn] = global::System.Convert.DBNull; + public string LastName { + get { + return ((string)(this[this.tablev_durados_User.LastNameColumn])); + } + set { + this[this.tablev_durados_User.LastNameColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsTitleNull() { - return this.IsNull(this.tabledurados_App.TitleColumn); + public string Email { + get { + return ((string)(this[this.tablev_durados_User.EmailColumn])); + } + set { + this[this.tablev_durados_User.EmailColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetTitleNull() { - this[this.tabledurados_App.TitleColumn] = global::System.Convert.DBNull; + public string Password { + get { + try { + return ((string)(this[this.tablev_durados_User.PasswordColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Password\' in table \'v_durados_User\' is DBNull.", e); + } + } + set { + this[this.tablev_durados_User.PasswordColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsBasicNull() { - return this.IsNull(this.tabledurados_App.BasicColumn); + public string Role { + get { + return ((string)(this[this.tablev_durados_User.RoleColumn])); + } + set { + this[this.tablev_durados_User.RoleColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetBasicNull() { - this[this.tabledurados_App.BasicColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsThemeIdNull() { - return this.IsNull(this.tabledurados_App.ThemeIdColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetThemeIdNull() { - this[this.tabledurados_App.ThemeIdColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsCustomThemePathNull() { - return this.IsNull(this.tabledurados_App.CustomThemePathColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetCustomThemePathNull() { - this[this.tabledurados_App.CustomThemePathColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsDatabaseStatusNull() { - return this.IsNull(this.tabledurados_App.DatabaseStatusColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetDatabaseStatusNull() { - this[this.tabledurados_App.DatabaseStatusColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsTemplateStatusNull() { - return this.IsNull(this.tabledurados_App.TemplateStatusColumn); + public System.Guid Guid { + get { + return ((global::System.Guid)(this[this.tablev_durados_User.GuidColumn])); + } + set { + this[this.tablev_durados_User.GuidColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetTemplateStatusNull() { - this[this.tabledurados_App.TemplateStatusColumn] = global::System.Convert.DBNull; + public string Signature { + get { + try { + return ((string)(this[this.tablev_durados_User.SignatureColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Signature\' in table \'v_durados_User\' is DBNull.", e); + } + } + set { + this[this.tablev_durados_User.SignatureColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsCodeStatusNull() { - return this.IsNull(this.tabledurados_App.CodeStatusColumn); + public string SignatureHTML { + get { + try { + return ((string)(this[this.tablev_durados_User.SignatureHTMLColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'SignatureHTML\' in table \'v_durados_User\' is DBNull.", e); + } + } + set { + this[this.tablev_durados_User.SignatureHTMLColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetCodeStatusNull() { - this[this.tabledurados_App.CodeStatusColumn] = global::System.Convert.DBNull; + public bool NewUser { + get { + try { + return ((bool)(this[this.tablev_durados_User.NewUserColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'NewUser\' in table \'v_durados_User\' is DBNull.", e); + } + } + set { + this[this.tablev_durados_User.NewUserColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsHostingStatusNull() { - return this.IsNull(this.tabledurados_App.HostingStatusColumn); + public string Comments { + get { + try { + return ((string)(this[this.tablev_durados_User.CommentsColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Comments\' in table \'v_durados_User\' is DBNull.", e); + } + } + set { + this[this.tablev_durados_User.CommentsColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetHostingStatusNull() { - this[this.tabledurados_App.HostingStatusColumn] = global::System.Convert.DBNull; + public int IsApproved { + get { + try { + return ((int)(this[this.tablev_durados_User.IsApprovedColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'IsApproved\' in table \'v_durados_User\' is DBNull.", e); + } + } + set { + this[this.tablev_durados_User.IsApprovedColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsSignUpTokenNull() { - return this.IsNull(this.tabledurados_App.SignUpTokenColumn); + public string FullName { + get { + try { + return ((string)(this[this.tablev_durados_User.FullNameColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'FullName\' in table \'v_durados_User\' is DBNull.", e); + } + } + set { + this[this.tablev_durados_User.FullNameColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetSignUpTokenNull() { - this[this.tabledurados_App.SignUpTokenColumn] = global::System.Convert.DBNull; + public bool IsPasswordNull() { + return this.IsNull(this.tablev_durados_User.PasswordColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsAnonymousTokenNull() { - return this.IsNull(this.tabledurados_App.AnonymousTokenColumn); + public void SetPasswordNull() { + this[this.tablev_durados_User.PasswordColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetAnonymousTokenNull() { - this[this.tabledurados_App.AnonymousTokenColumn] = global::System.Convert.DBNull; + public bool IsSignatureNull() { + return this.IsNull(this.tablev_durados_User.SignatureColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsPaymentStatusNull() { - return this.IsNull(this.tabledurados_App.PaymentStatusColumn); + public void SetSignatureNull() { + this[this.tablev_durados_User.SignatureColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetPaymentStatusNull() { - this[this.tabledurados_App.PaymentStatusColumn] = global::System.Convert.DBNull; + public bool IsSignatureHTMLNull() { + return this.IsNull(this.tablev_durados_User.SignatureHTMLColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsPaymentLockedNull() { - return this.IsNull(this.tabledurados_App.PaymentLockedColumn); + public void SetSignatureHTMLNull() { + this[this.tablev_durados_User.SignatureHTMLColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetPaymentLockedNull() { - this[this.tabledurados_App.PaymentLockedColumn] = global::System.Convert.DBNull; + public bool IsNewUserNull() { + return this.IsNull(this.tablev_durados_User.NewUserColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsIsAuthAppNull() { - return this.IsNull(this.tabledurados_App.IsAuthAppColumn); + public void SetNewUserNull() { + this[this.tablev_durados_User.NewUserColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetIsAuthAppNull() { - this[this.tabledurados_App.IsAuthAppColumn] = global::System.Convert.DBNull; + public bool IsCommentsNull() { + return this.IsNull(this.tablev_durados_User.CommentsColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsEnvironmentNull() { - return this.IsNull(this.tabledurados_App.EnvironmentColumn); + public void SetCommentsNull() { + this[this.tablev_durados_User.CommentsColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetEnvironmentNull() { - this[this.tabledurados_App.EnvironmentColumn] = global::System.Convert.DBNull; + public bool IsIsApprovedNull() { + return this.IsNull(this.tablev_durados_User.IsApprovedColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsEnvVarNull() { - return this.IsNull(this.tabledurados_App.EnvVarColumn); + public void SetIsApprovedNull() { + this[this.tablev_durados_User.IsApprovedColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetEnvVarNull() { - this[this.tabledurados_App.EnvVarColumn] = global::System.Convert.DBNull; + public bool IsFullNameNull() { + return this.IsNull(this.tablev_durados_User.FullNameColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsProductTypeNull() { - return this.IsNull(this.tabledurados_App.ProductTypeColumn); + public void SetFullNameNull() { + this[this.tablev_durados_User.FullNameColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetProductTypeNull() { - this[this.tabledurados_App.ProductTypeColumn] = global::System.Convert.DBNull; + public durados_AppRow[] Getdurados_AppRows() { + if ((this.Table.ChildRelations["FK_durados_App_durados_User"] == null)) { + return new durados_AppRow[0]; + } + else { + return ((durados_AppRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_App_durados_User"]))); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppRow[] Getdurados_AppRows() { - if ((this.Table.ChildRelations["FK_durados_App_durados_Template"] == null)) { - return new durados_AppRow[0]; + public durados_SqlConnectionRow[] Getdurados_SqlConnectionRows() { + if ((this.Table.ChildRelations["FK_durados_SqlConnection_durados_User"] == null)) { + return new durados_SqlConnectionRow[0]; } else { - return ((durados_AppRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_App_durados_Template"]))); + return ((durados_SqlConnectionRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_SqlConnection_durados_User"]))); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_UserAppRow[] Getdurados_UserAppRows() { - if ((this.Table.ChildRelations["FK_durados_UserApp_durados_App"] == null)) { - return new durados_UserAppRow[0]; + public durados_UserAliasRow[] Getdurados_UserAliasRowsByFK_durados_UserAlias_durados_User_Main() { + if ((this.Table.ChildRelations["FK_durados_UserAlias_durados_User_Main"] == null)) { + return new durados_UserAliasRow[0]; } else { - return ((durados_UserAppRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_UserApp_durados_App"]))); + return ((durados_UserAliasRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_UserAlias_durados_User_Main"]))); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_DnsAliasRow[] Getdurados_DnsAliasRows() { - if ((this.Table.ChildRelations["durados_App_durados_DnsAlias"] == null)) { - return new durados_DnsAliasRow[0]; + public durados_UserAliasRow[] Getdurados_UserAliasRowsByFK_durados_UserAlias_durados_Usern_Alias() { + if ((this.Table.ChildRelations["FK_durados_UserAlias_durados_Usern_Alias"] == null)) { + return new durados_UserAliasRow[0]; } else { - return ((durados_DnsAliasRow[])(base.GetChildRows(this.Table.ChildRelations["durados_App_durados_DnsAlias"]))); + return ((durados_UserAliasRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_UserAlias_durados_Usern_Alias"]))); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppStatRow[] Getdurados_AppStatRows() { - if ((this.Table.ChildRelations["FK_durados_AppStat_durados_App"] == null)) { - return new durados_AppStatRow[0]; + public durados_UserAppRow[] Getdurados_UserAppRows() { + if ((this.Table.ChildRelations["FK_durados_UserApp_durados_User"] == null)) { + return new durados_UserAppRow[0]; } else { - return ((durados_AppStatRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_AppStat_durados_App"]))); + return ((durados_UserAppRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_UserApp_durados_User"]))); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public durados_UserSocialRow[] Getdurados_UserSocialRows() { - if ((this.Table.ChildRelations["durados_App_durados_UserSocial"] == null)) { + if ((this.Table.ChildRelations["v_durados_User_durados_UserSocial"] == null)) { return new durados_UserSocialRow[0]; } else { - return ((durados_UserSocialRow[])(base.GetChildRows(this.Table.ChildRelations["durados_App_durados_UserSocial"]))); + return ((durados_UserSocialRow[])(base.GetChildRows(this.Table.ChildRelations["v_durados_User_durados_UserSocial"]))); } } } @@ -6901,501 +6688,381 @@ public durados_UserSocialRow[] Getdurados_UserSocialRows() { /// ///Represents strongly named DataRow class. /// - public partial class durados_SqlConnectionRow : global::System.Data.DataRow { + public partial class durados_UserAliasRow : global::System.Data.DataRow { - private durados_SqlConnectionDataTable tabledurados_SqlConnection; + private durados_UserAliasDataTable tabledurados_UserAlias; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal durados_SqlConnectionRow(global::System.Data.DataRowBuilder rb) : + internal durados_UserAliasRow(global::System.Data.DataRowBuilder rb) : base(rb) { - this.tabledurados_SqlConnection = ((durados_SqlConnectionDataTable)(this.Table)); + this.tabledurados_UserAlias = ((durados_UserAliasDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public int Id { get { - return ((int)(this[this.tabledurados_SqlConnection.IdColumn])); + return ((int)(this[this.tabledurados_UserAlias.IdColumn])); } set { - this[this.tabledurados_SqlConnection.IdColumn] = value; + this[this.tabledurados_UserAlias.IdColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string ServerName { + public int MainUsername { get { - try { - return ((string)(this[this.tabledurados_SqlConnection.ServerNameColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'ServerName\' in table \'durados_SqlConnection\' is DBNull.", e); - } + return ((int)(this[this.tabledurados_UserAlias.MainUsernameColumn])); } set { - this[this.tabledurados_SqlConnection.ServerNameColumn] = value; + this[this.tabledurados_UserAlias.MainUsernameColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Catalog { + public int Alias { get { - try { - return ((string)(this[this.tabledurados_SqlConnection.CatalogColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Catalog\' in table \'durados_SqlConnection\' is DBNull.", e); - } + return ((int)(this[this.tabledurados_UserAlias.AliasColumn])); } set { - this[this.tabledurados_SqlConnection.CatalogColumn] = value; + this[this.tabledurados_UserAlias.AliasColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Username { + public v_durados_UserRow durados_UserRowByFK_durados_UserAlias_durados_User_Main { get { - try { - return ((string)(this[this.tabledurados_SqlConnection.UsernameColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Username\' in table \'durados_SqlConnection\' is DBNull.", e); - } + return ((v_durados_UserRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_UserAlias_durados_User_Main"]))); } set { - this[this.tabledurados_SqlConnection.UsernameColumn] = value; + this.SetParentRow(value, this.Table.ParentRelations["FK_durados_UserAlias_durados_User_Main"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Password { + public v_durados_UserRow durados_UserRowByFK_durados_UserAlias_durados_Usern_Alias { get { - try { - return ((string)(this[this.tabledurados_SqlConnection.PasswordColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Password\' in table \'durados_SqlConnection\' is DBNull.", e); - } + return ((v_durados_UserRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_UserAlias_durados_Usern_Alias"]))); } set { - this[this.tabledurados_SqlConnection.PasswordColumn] = value; + this.SetParentRow(value, this.Table.ParentRelations["FK_durados_UserAlias_durados_Usern_Alias"]); } } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class durados_UserAppRow : global::System.Data.DataRow { + + private durados_UserAppDataTable tabledurados_UserApp; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IntegratedSecurity { - get { - try { - return ((bool)(this[this.tabledurados_SqlConnection.IntegratedSecurityColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'IntegratedSecurity\' in table \'durados_SqlConnection\' is DBN" + - "ull.", e); - } - } - set { - this[this.tabledurados_SqlConnection.IntegratedSecurityColumn] = value; - } + internal durados_UserAppRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tabledurados_UserApp = ((durados_UserAppDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int DuradosUser { + public int Id { get { - try { - return ((int)(this[this.tabledurados_SqlConnection.DuradosUserColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'DuradosUser\' in table \'durados_SqlConnection\' is DBNull.", e); - } + return ((int)(this[this.tabledurados_UserApp.IdColumn])); } set { - this[this.tabledurados_SqlConnection.DuradosUserColumn] = value; + this[this.tabledurados_UserApp.IdColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int SqlProductId { + public int UserId { get { - try { - return ((int)(this[this.tabledurados_SqlConnection.SqlProductIdColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'SqlProductId\' in table \'durados_SqlConnection\' is DBNull.", e); - } + return ((int)(this[this.tabledurados_UserApp.UserIdColumn])); } set { - this[this.tabledurados_SqlConnection.SqlProductIdColumn] = value; + this[this.tabledurados_UserApp.UserIdColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string ProductPort { + public int AppId { get { - try { - return ((string)(this[this.tabledurados_SqlConnection.ProductPortColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'ProductPort\' in table \'durados_SqlConnection\' is DBNull.", e); - } + return ((int)(this[this.tabledurados_UserApp.AppIdColumn])); } set { - this[this.tabledurados_SqlConnection.ProductPortColumn] = value; + this[this.tabledurados_UserApp.AppIdColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string SshRemoteHost { + public string Category { get { try { - return ((string)(this[this.tabledurados_SqlConnection.SshRemoteHostColumn])); + return ((string)(this[this.tabledurados_UserApp.CategoryColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'SshRemoteHost\' in table \'durados_SqlConnection\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'Category\' in table \'durados_UserApp\' is DBNull.", e); } } set { - this[this.tabledurados_SqlConnection.SshRemoteHostColumn] = value; + this[this.tabledurados_UserApp.CategoryColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int SshPort { + public string Role { get { try { - return ((int)(this[this.tabledurados_SqlConnection.SshPortColumn])); + return ((string)(this[this.tabledurados_UserApp.RoleColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'SshPort\' in table \'durados_SqlConnection\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'Role\' in table \'durados_UserApp\' is DBNull.", e); } } set { - this[this.tabledurados_SqlConnection.SshPortColumn] = value; + this[this.tabledurados_UserApp.RoleColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string SshUser { + public durados_AppRow durados_AppRow { get { - try { - return ((string)(this[this.tabledurados_SqlConnection.SshUserColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'SshUser\' in table \'durados_SqlConnection\' is DBNull.", e); - } + return ((durados_AppRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_UserApp_durados_App"]))); } set { - this[this.tabledurados_SqlConnection.SshUserColumn] = value; + this.SetParentRow(value, this.Table.ParentRelations["FK_durados_UserApp_durados_App"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string SshPassword { + public v_durados_UserRow durados_UserRow { get { - try { - return ((string)(this[this.tabledurados_SqlConnection.SshPasswordColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'SshPassword\' in table \'durados_SqlConnection\' is DBNull.", e); - } + return ((v_durados_UserRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_UserApp_durados_User"]))); } set { - this[this.tabledurados_SqlConnection.SshPasswordColumn] = value; + this.SetParentRow(value, this.Table.ParentRelations["FK_durados_UserApp_durados_User"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool SshUses { - get { - try { - return ((bool)(this[this.tabledurados_SqlConnection.SshUsesColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'SshUses\' in table \'durados_SqlConnection\' is DBNull.", e); - } - } - set { - this[this.tabledurados_SqlConnection.SshUsesColumn] = value; - } + public bool IsCategoryNull() { + return this.IsNull(this.tabledurados_UserApp.CategoryColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool SslUses { + public void SetCategoryNull() { + this[this.tabledurados_UserApp.CategoryColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsRoleNull() { + return this.IsNull(this.tabledurados_UserApp.RoleColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetRoleNull() { + this[this.tabledurados_UserApp.RoleColumn] = global::System.Convert.DBNull; + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class durados_DataSourceTypeRow : global::System.Data.DataRow { + + private durados_DataSourceTypeDataTable tabledurados_DataSourceType; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal durados_DataSourceTypeRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tabledurados_DataSourceType = ((durados_DataSourceTypeDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Id { get { - try { - return ((bool)(this[this.tabledurados_SqlConnection.SslUsesColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'SslUses\' in table \'durados_SqlConnection\' is DBNull.", e); - } + return ((int)(this[this.tabledurados_DataSourceType.IdColumn])); } set { - this[this.tabledurados_SqlConnection.SslUsesColumn] = value; + this[this.tabledurados_DataSourceType.IdColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string SshPrivateKey { + public string Name { get { try { - return ((string)(this[this.tabledurados_SqlConnection.SshPrivateKeyColumn])); + return ((string)(this[this.tabledurados_DataSourceType.NameColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'SshPrivateKey\' in table \'durados_SqlConnection\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'Name\' in table \'durados_DataSourceType\' is DBNull.", e); } } set { - this[this.tabledurados_SqlConnection.SshPrivateKeyColumn] = value; + this[this.tabledurados_DataSourceType.NameColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public v_durados_UserRow v_durados_UserRow { + public int Ordinal { get { - return ((v_durados_UserRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_SqlConnection_durados_User"]))); + try { + return ((int)(this[this.tabledurados_DataSourceType.OrdinalColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Ordinal\' in table \'durados_DataSourceType\' is DBNull.", e); + } } set { - this.SetParentRow(value, this.Table.ParentRelations["FK_durados_SqlConnection_durados_User"]); + this[this.tabledurados_DataSourceType.OrdinalColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_SqlProductRow durados_SqlProductRow { - get { - return ((durados_SqlProductRow)(this.GetParentRow(this.Table.ParentRelations["durados_SqlProduct_durados_SqlConnection"]))); - } - set { - this.SetParentRow(value, this.Table.ParentRelations["durados_SqlProduct_durados_SqlConnection"]); - } + public bool IsNameNull() { + return this.IsNull(this.tabledurados_DataSourceType.NameColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsServerNameNull() { - return this.IsNull(this.tabledurados_SqlConnection.ServerNameColumn); + public void SetNameNull() { + this[this.tabledurados_DataSourceType.NameColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetServerNameNull() { - this[this.tabledurados_SqlConnection.ServerNameColumn] = global::System.Convert.DBNull; + public bool IsOrdinalNull() { + return this.IsNull(this.tabledurados_DataSourceType.OrdinalColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsCatalogNull() { - return this.IsNull(this.tabledurados_SqlConnection.CatalogColumn); + public void SetOrdinalNull() { + this[this.tabledurados_DataSourceType.OrdinalColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetCatalogNull() { - this[this.tabledurados_SqlConnection.CatalogColumn] = global::System.Convert.DBNull; + public durados_AppRow[] Getdurados_AppRows() { + if ((this.Table.ChildRelations["FK_durados_App_durados_DataSourceType"] == null)) { + return new durados_AppRow[0]; + } + else { + return ((durados_AppRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_App_durados_DataSourceType"]))); + } } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class durados_SqlProductRow : global::System.Data.DataRow { - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsUsernameNull() { - return this.IsNull(this.tabledurados_SqlConnection.UsernameColumn); - } + private durados_SqlProductDataTable tabledurados_SqlProduct; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetUsernameNull() { - this[this.tabledurados_SqlConnection.UsernameColumn] = global::System.Convert.DBNull; + internal durados_SqlProductRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tabledurados_SqlProduct = ((durados_SqlProductDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsPasswordNull() { - return this.IsNull(this.tabledurados_SqlConnection.PasswordColumn); + public int Id { + get { + return ((int)(this[this.tabledurados_SqlProduct.IdColumn])); + } + set { + this[this.tabledurados_SqlProduct.IdColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetPasswordNull() { - this[this.tabledurados_SqlConnection.PasswordColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsIntegratedSecurityNull() { - return this.IsNull(this.tabledurados_SqlConnection.IntegratedSecurityColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetIntegratedSecurityNull() { - this[this.tabledurados_SqlConnection.IntegratedSecurityColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsDuradosUserNull() { - return this.IsNull(this.tabledurados_SqlConnection.DuradosUserColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetDuradosUserNull() { - this[this.tabledurados_SqlConnection.DuradosUserColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsSqlProductIdNull() { - return this.IsNull(this.tabledurados_SqlConnection.SqlProductIdColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetSqlProductIdNull() { - this[this.tabledurados_SqlConnection.SqlProductIdColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsProductPortNull() { - return this.IsNull(this.tabledurados_SqlConnection.ProductPortColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetProductPortNull() { - this[this.tabledurados_SqlConnection.ProductPortColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsSshRemoteHostNull() { - return this.IsNull(this.tabledurados_SqlConnection.SshRemoteHostColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetSshRemoteHostNull() { - this[this.tabledurados_SqlConnection.SshRemoteHostColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsSshPortNull() { - return this.IsNull(this.tabledurados_SqlConnection.SshPortColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetSshPortNull() { - this[this.tabledurados_SqlConnection.SshPortColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsSshUserNull() { - return this.IsNull(this.tabledurados_SqlConnection.SshUserColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetSshUserNull() { - this[this.tabledurados_SqlConnection.SshUserColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsSshPasswordNull() { - return this.IsNull(this.tabledurados_SqlConnection.SshPasswordColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetSshPasswordNull() { - this[this.tabledurados_SqlConnection.SshPasswordColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsSshUsesNull() { - return this.IsNull(this.tabledurados_SqlConnection.SshUsesColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetSshUsesNull() { - this[this.tabledurados_SqlConnection.SshUsesColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsSslUsesNull() { - return this.IsNull(this.tabledurados_SqlConnection.SslUsesColumn); + public string Name { + get { + try { + return ((string)(this[this.tabledurados_SqlProduct.NameColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Name\' in table \'durados_SqlProduct\' is DBNull.", e); + } + } + set { + this[this.tabledurados_SqlProduct.NameColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetSslUsesNull() { - this[this.tabledurados_SqlConnection.SslUsesColumn] = global::System.Convert.DBNull; + public int Ordinal { + get { + try { + return ((int)(this[this.tabledurados_SqlProduct.OrdinalColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Ordinal\' in table \'durados_SqlProduct\' is DBNull.", e); + } + } + set { + this[this.tabledurados_SqlProduct.OrdinalColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsSshPrivateKeyNull() { - return this.IsNull(this.tabledurados_SqlConnection.SshPrivateKeyColumn); + public bool IsNameNull() { + return this.IsNull(this.tabledurados_SqlProduct.NameColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetSshPrivateKeyNull() { - this[this.tabledurados_SqlConnection.SshPrivateKeyColumn] = global::System.Convert.DBNull; + public void SetNameNull() { + this[this.tabledurados_SqlProduct.NameColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppRow[] Getdurados_AppRowsByFK_durados_App_durados_SqlConnection() { - if ((this.Table.ChildRelations["FK_durados_App_durados_SqlConnection"] == null)) { - return new durados_AppRow[0]; - } - else { - return ((durados_AppRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_App_durados_SqlConnection"]))); - } + public bool IsOrdinalNull() { + return this.IsNull(this.tabledurados_SqlProduct.OrdinalColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppRow[] Getdurados_AppRowsByFK_durados_App_durados_SqlConnection_Security() { - if ((this.Table.ChildRelations["FK_durados_App_durados_SqlConnection_Security"] == null)) { - return new durados_AppRow[0]; - } - else { - return ((durados_AppRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_App_durados_SqlConnection_Security"]))); - } + public void SetOrdinalNull() { + this[this.tabledurados_SqlProduct.OrdinalColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppRow[] Getdurados_AppRowsByFK_durados_App_durados_SqlConnection_System() { - if ((this.Table.ChildRelations["FK_durados_App_durados_SqlConnection_System"] == null)) { - return new durados_AppRow[0]; + public durados_SqlConnectionRow[] Getdurados_SqlConnectionRows() { + if ((this.Table.ChildRelations["durados_SqlProduct_durados_SqlConnection"] == null)) { + return new durados_SqlConnectionRow[0]; } else { - return ((durados_AppRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_App_durados_SqlConnection_System"]))); + return ((durados_SqlConnectionRow[])(base.GetChildRows(this.Table.ChildRelations["durados_SqlProduct_durados_SqlConnection"]))); } } } @@ -7403,879 +7070,715 @@ public durados_AppRow[] Getdurados_AppRowsByFK_durados_App_durados_SqlConnection /// ///Represents strongly named DataRow class. /// - public partial class v_durados_UserRow : global::System.Data.DataRow { + public partial class backand_ActionTemplateRow : global::System.Data.DataRow { - private v_durados_UserDataTable tablev_durados_User; + private backand_ActionTemplateDataTable tablebackand_ActionTemplate; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal v_durados_UserRow(global::System.Data.DataRowBuilder rb) : + internal backand_ActionTemplateRow(global::System.Data.DataRowBuilder rb) : base(rb) { - this.tablev_durados_User = ((v_durados_UserDataTable)(this.Table)); + this.tablebackand_ActionTemplate = ((backand_ActionTemplateDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int ID { + public int id { get { - return ((int)(this[this.tablev_durados_User.IDColumn])); + return ((int)(this[this.tablebackand_ActionTemplate.idColumn])); } set { - this[this.tablev_durados_User.IDColumn] = value; + this[this.tablebackand_ActionTemplate.idColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Username { + public string name { get { - return ((string)(this[this.tablev_durados_User.UsernameColumn])); + return ((string)(this[this.tablebackand_ActionTemplate.nameColumn])); } set { - this[this.tablev_durados_User.UsernameColumn] = value; + this[this.tablebackand_ActionTemplate.nameColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string FirstName { + public string shortDescription { get { - return ((string)(this[this.tablev_durados_User.FirstNameColumn])); + try { + return ((string)(this[this.tablebackand_ActionTemplate.shortDescriptionColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'shortDescription\' in table \'backand_ActionTemplate\' is DBNu" + + "ll.", e); + } } set { - this[this.tablev_durados_User.FirstNameColumn] = value; + this[this.tablebackand_ActionTemplate.shortDescriptionColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string LastName { + public string documentation { get { - return ((string)(this[this.tablev_durados_User.LastNameColumn])); + try { + return ((string)(this[this.tablebackand_ActionTemplate.documentationColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'documentation\' in table \'backand_ActionTemplate\' is DBNull." + + "", e); + } } set { - this[this.tablev_durados_User.LastNameColumn] = value; + this[this.tablebackand_ActionTemplate.documentationColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Email { + public System.DateTime createdDate { get { - return ((string)(this[this.tablev_durados_User.EmailColumn])); + try { + return ((global::System.DateTime)(this[this.tablebackand_ActionTemplate.createdDateColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'createdDate\' in table \'backand_ActionTemplate\' is DBNull.", e); + } } set { - this[this.tablev_durados_User.EmailColumn] = value; + this[this.tablebackand_ActionTemplate.createdDateColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Password { + public System.DateTime updatedDate { get { try { - return ((string)(this[this.tablev_durados_User.PasswordColumn])); + return ((global::System.DateTime)(this[this.tablebackand_ActionTemplate.updatedDateColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Password\' in table \'v_durados_User\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'updatedDate\' in table \'backand_ActionTemplate\' is DBNull.", e); } } set { - this[this.tablev_durados_User.PasswordColumn] = value; + this[this.tablebackand_ActionTemplate.updatedDateColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Role { + public string createdBy { get { - return ((string)(this[this.tablev_durados_User.RoleColumn])); + try { + return ((string)(this[this.tablebackand_ActionTemplate.createdByColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'createdBy\' in table \'backand_ActionTemplate\' is DBNull.", e); + } } set { - this[this.tablev_durados_User.RoleColumn] = value; + this[this.tablebackand_ActionTemplate.createdByColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public System.Guid Guid { + public string updatedBy { get { - return ((global::System.Guid)(this[this.tablev_durados_User.GuidColumn])); - } - set { - this[this.tablev_durados_User.GuidColumn] = value; + try { + return ((string)(this[this.tablebackand_ActionTemplate.updatedByColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'updatedBy\' in table \'backand_ActionTemplate\' is DBNull.", e); + } + } + set { + this[this.tablebackand_ActionTemplate.updatedByColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Signature { + public string ruleName { get { try { - return ((string)(this[this.tablev_durados_User.SignatureColumn])); + return ((string)(this[this.tablebackand_ActionTemplate.ruleNameColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Signature\' in table \'v_durados_User\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'ruleName\' in table \'backand_ActionTemplate\' is DBNull.", e); } } set { - this[this.tablev_durados_User.SignatureColumn] = value; + this[this.tablebackand_ActionTemplate.ruleNameColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string SignatureHTML { + public string objectName { get { try { - return ((string)(this[this.tablev_durados_User.SignatureHTMLColumn])); + return ((string)(this[this.tablebackand_ActionTemplate.objectNameColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'SignatureHTML\' in table \'v_durados_User\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'objectName\' in table \'backand_ActionTemplate\' is DBNull.", e); } } set { - this[this.tablev_durados_User.SignatureHTMLColumn] = value; + this[this.tablebackand_ActionTemplate.objectNameColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool NewUser { + public string action { get { try { - return ((bool)(this[this.tablev_durados_User.NewUserColumn])); + return ((string)(this[this.tablebackand_ActionTemplate.actionColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'NewUser\' in table \'v_durados_User\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'action\' in table \'backand_ActionTemplate\' is DBNull.", e); } } set { - this[this.tablev_durados_User.NewUserColumn] = value; + this[this.tablebackand_ActionTemplate.actionColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Comments { + public string ruleType { get { try { - return ((string)(this[this.tablev_durados_User.CommentsColumn])); + return ((string)(this[this.tablebackand_ActionTemplate.ruleTypeColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Comments\' in table \'v_durados_User\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'ruleType\' in table \'backand_ActionTemplate\' is DBNull.", e); } } set { - this[this.tablev_durados_User.CommentsColumn] = value; + this[this.tablebackand_ActionTemplate.ruleTypeColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int IsApproved { + public string condition { get { try { - return ((int)(this[this.tablev_durados_User.IsApprovedColumn])); + return ((string)(this[this.tablebackand_ActionTemplate.conditionColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'IsApproved\' in table \'v_durados_User\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'condition\' in table \'backand_ActionTemplate\' is DBNull.", e); } } set { - this[this.tablev_durados_User.IsApprovedColumn] = value; + this[this.tablebackand_ActionTemplate.conditionColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string FullName { + public string parameters { get { try { - return ((string)(this[this.tablev_durados_User.FullNameColumn])); + return ((string)(this[this.tablebackand_ActionTemplate.parametersColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'FullName\' in table \'v_durados_User\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'parameters\' in table \'backand_ActionTemplate\' is DBNull.", e); } } set { - this[this.tablev_durados_User.FullNameColumn] = value; + this[this.tablebackand_ActionTemplate.parametersColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsPasswordNull() { - return this.IsNull(this.tablev_durados_User.PasswordColumn); + public string code { + get { + try { + return ((string)(this[this.tablebackand_ActionTemplate.codeColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'code\' in table \'backand_ActionTemplate\' is DBNull.", e); + } + } + set { + this[this.tablebackand_ActionTemplate.codeColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetPasswordNull() { - this[this.tablev_durados_User.PasswordColumn] = global::System.Convert.DBNull; + public string executeCommand { + get { + try { + return ((string)(this[this.tablebackand_ActionTemplate.executeCommandColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'executeCommand\' in table \'backand_ActionTemplate\' is DBNull" + + ".", e); + } + } + set { + this[this.tablebackand_ActionTemplate.executeCommandColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsSignatureNull() { - return this.IsNull(this.tablev_durados_User.SignatureColumn); + public string executeMessage { + get { + try { + return ((string)(this[this.tablebackand_ActionTemplate.executeMessageColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'executeMessage\' in table \'backand_ActionTemplate\' is DBNull" + + ".", e); + } + } + set { + this[this.tablebackand_ActionTemplate.executeMessageColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetSignatureNull() { - this[this.tablev_durados_User.SignatureColumn] = global::System.Convert.DBNull; + public string json { + get { + try { + return ((string)(this[this.tablebackand_ActionTemplate.jsonColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'json\' in table \'backand_ActionTemplate\' is DBNull.", e); + } + } + set { + this[this.tablebackand_ActionTemplate.jsonColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsSignatureHTMLNull() { - return this.IsNull(this.tablev_durados_User.SignatureHTMLColumn); + public bool backands { + get { + try { + return ((bool)(this[this.tablebackand_ActionTemplate.backandsColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'backands\' in table \'backand_ActionTemplate\' is DBNull.", e); + } + } + set { + this[this.tablebackand_ActionTemplate.backandsColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetSignatureHTMLNull() { - this[this.tablev_durados_User.SignatureHTMLColumn] = global::System.Convert.DBNull; + public bool approved { + get { + try { + return ((bool)(this[this.tablebackand_ActionTemplate.approvedColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'approved\' in table \'backand_ActionTemplate\' is DBNull.", e); + } + } + set { + this[this.tablebackand_ActionTemplate.approvedColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsNewUserNull() { - return this.IsNull(this.tablev_durados_User.NewUserColumn); + public System.DateTime approvedDate { + get { + try { + return ((global::System.DateTime)(this[this.tablebackand_ActionTemplate.approvedDateColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'approvedDate\' in table \'backand_ActionTemplate\' is DBNull.", e); + } + } + set { + this[this.tablebackand_ActionTemplate.approvedDateColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetNewUserNull() { - this[this.tablev_durados_User.NewUserColumn] = global::System.Convert.DBNull; + public string contributors { + get { + try { + return ((string)(this[this.tablebackand_ActionTemplate.contributorsColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'contributors\' in table \'backand_ActionTemplate\' is DBNull.", e); + } + } + set { + this[this.tablebackand_ActionTemplate.contributorsColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsCommentsNull() { - return this.IsNull(this.tablev_durados_User.CommentsColumn); + public int category { + get { + try { + return ((int)(this[this.tablebackand_ActionTemplate.categoryColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'category\' in table \'backand_ActionTemplate\' is DBNull.", e); + } + } + set { + this[this.tablebackand_ActionTemplate.categoryColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetCommentsNull() { - this[this.tablev_durados_User.CommentsColumn] = global::System.Convert.DBNull; + public int ordinal { + get { + try { + return ((int)(this[this.tablebackand_ActionTemplate.ordinalColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'ordinal\' in table \'backand_ActionTemplate\' is DBNull.", e); + } + } + set { + this[this.tablebackand_ActionTemplate.ordinalColumn] = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsIsApprovedNull() { - return this.IsNull(this.tablev_durados_User.IsApprovedColumn); + public bool IsshortDescriptionNull() { + return this.IsNull(this.tablebackand_ActionTemplate.shortDescriptionColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetIsApprovedNull() { - this[this.tablev_durados_User.IsApprovedColumn] = global::System.Convert.DBNull; + public void SetshortDescriptionNull() { + this[this.tablebackand_ActionTemplate.shortDescriptionColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsFullNameNull() { - return this.IsNull(this.tablev_durados_User.FullNameColumn); + public bool IsdocumentationNull() { + return this.IsNull(this.tablebackand_ActionTemplate.documentationColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetFullNameNull() { - this[this.tablev_durados_User.FullNameColumn] = global::System.Convert.DBNull; + public void SetdocumentationNull() { + this[this.tablebackand_ActionTemplate.documentationColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppRow[] Getdurados_AppRows() { - if ((this.Table.ChildRelations["FK_durados_App_durados_User"] == null)) { - return new durados_AppRow[0]; - } - else { - return ((durados_AppRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_App_durados_User"]))); - } + public bool IscreatedDateNull() { + return this.IsNull(this.tablebackand_ActionTemplate.createdDateColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_SqlConnectionRow[] Getdurados_SqlConnectionRows() { - if ((this.Table.ChildRelations["FK_durados_SqlConnection_durados_User"] == null)) { - return new durados_SqlConnectionRow[0]; - } - else { - return ((durados_SqlConnectionRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_SqlConnection_durados_User"]))); - } + public void SetcreatedDateNull() { + this[this.tablebackand_ActionTemplate.createdDateColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_UserAliasRow[] Getdurados_UserAliasRowsByFK_durados_UserAlias_durados_User_Main() { - if ((this.Table.ChildRelations["FK_durados_UserAlias_durados_User_Main"] == null)) { - return new durados_UserAliasRow[0]; - } - else { - return ((durados_UserAliasRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_UserAlias_durados_User_Main"]))); - } + public bool IsupdatedDateNull() { + return this.IsNull(this.tablebackand_ActionTemplate.updatedDateColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_UserAliasRow[] Getdurados_UserAliasRowsByFK_durados_UserAlias_durados_Usern_Alias() { - if ((this.Table.ChildRelations["FK_durados_UserAlias_durados_Usern_Alias"] == null)) { - return new durados_UserAliasRow[0]; - } - else { - return ((durados_UserAliasRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_UserAlias_durados_Usern_Alias"]))); - } + public void SetupdatedDateNull() { + this[this.tablebackand_ActionTemplate.updatedDateColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_UserAppRow[] Getdurados_UserAppRows() { - if ((this.Table.ChildRelations["FK_durados_UserApp_durados_User"] == null)) { - return new durados_UserAppRow[0]; - } - else { - return ((durados_UserAppRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_UserApp_durados_User"]))); - } + public bool IscreatedByNull() { + return this.IsNull(this.tablebackand_ActionTemplate.createdByColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_UserSocialRow[] Getdurados_UserSocialRows() { - if ((this.Table.ChildRelations["v_durados_User_durados_UserSocial"] == null)) { - return new durados_UserSocialRow[0]; - } - else { - return ((durados_UserSocialRow[])(base.GetChildRows(this.Table.ChildRelations["v_durados_User_durados_UserSocial"]))); - } + public void SetcreatedByNull() { + this[this.tablebackand_ActionTemplate.createdByColumn] = global::System.Convert.DBNull; } - } - - /// - ///Represents strongly named DataRow class. - /// - public partial class durados_UserAliasRow : global::System.Data.DataRow { - - private durados_UserAliasDataTable tabledurados_UserAlias; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal durados_UserAliasRow(global::System.Data.DataRowBuilder rb) : - base(rb) { - this.tabledurados_UserAlias = ((durados_UserAliasDataTable)(this.Table)); + public bool IsupdatedByNull() { + return this.IsNull(this.tablebackand_ActionTemplate.updatedByColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int Id { - get { - return ((int)(this[this.tabledurados_UserAlias.IdColumn])); - } - set { - this[this.tabledurados_UserAlias.IdColumn] = value; - } + public void SetupdatedByNull() { + this[this.tablebackand_ActionTemplate.updatedByColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int MainUsername { - get { - return ((int)(this[this.tabledurados_UserAlias.MainUsernameColumn])); - } - set { - this[this.tabledurados_UserAlias.MainUsernameColumn] = value; - } + public bool IsruleNameNull() { + return this.IsNull(this.tablebackand_ActionTemplate.ruleNameColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int Alias { - get { - return ((int)(this[this.tabledurados_UserAlias.AliasColumn])); - } - set { - this[this.tabledurados_UserAlias.AliasColumn] = value; - } + public void SetruleNameNull() { + this[this.tablebackand_ActionTemplate.ruleNameColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public v_durados_UserRow durados_UserRowByFK_durados_UserAlias_durados_User_Main { - get { - return ((v_durados_UserRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_UserAlias_durados_User_Main"]))); - } - set { - this.SetParentRow(value, this.Table.ParentRelations["FK_durados_UserAlias_durados_User_Main"]); - } + public bool IsobjectNameNull() { + return this.IsNull(this.tablebackand_ActionTemplate.objectNameColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public v_durados_UserRow durados_UserRowByFK_durados_UserAlias_durados_Usern_Alias { - get { - return ((v_durados_UserRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_UserAlias_durados_Usern_Alias"]))); - } - set { - this.SetParentRow(value, this.Table.ParentRelations["FK_durados_UserAlias_durados_Usern_Alias"]); - } + public void SetobjectNameNull() { + this[this.tablebackand_ActionTemplate.objectNameColumn] = global::System.Convert.DBNull; } - } - - /// - ///Represents strongly named DataRow class. - /// - public partial class durados_UserAppRow : global::System.Data.DataRow { - - private durados_UserAppDataTable tabledurados_UserApp; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal durados_UserAppRow(global::System.Data.DataRowBuilder rb) : - base(rb) { - this.tabledurados_UserApp = ((durados_UserAppDataTable)(this.Table)); + public bool IsactionNull() { + return this.IsNull(this.tablebackand_ActionTemplate.actionColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int Id { - get { - return ((int)(this[this.tabledurados_UserApp.IdColumn])); - } - set { - this[this.tabledurados_UserApp.IdColumn] = value; - } + public void SetactionNull() { + this[this.tablebackand_ActionTemplate.actionColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int UserId { - get { - return ((int)(this[this.tabledurados_UserApp.UserIdColumn])); - } - set { - this[this.tabledurados_UserApp.UserIdColumn] = value; - } + public bool IsruleTypeNull() { + return this.IsNull(this.tablebackand_ActionTemplate.ruleTypeColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int AppId { - get { - return ((int)(this[this.tabledurados_UserApp.AppIdColumn])); - } - set { - this[this.tabledurados_UserApp.AppIdColumn] = value; - } + public void SetruleTypeNull() { + this[this.tablebackand_ActionTemplate.ruleTypeColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Category { - get { - try { - return ((string)(this[this.tabledurados_UserApp.CategoryColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Category\' in table \'durados_UserApp\' is DBNull.", e); - } - } - set { - this[this.tabledurados_UserApp.CategoryColumn] = value; - } + public bool IsconditionNull() { + return this.IsNull(this.tablebackand_ActionTemplate.conditionColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Role { - get { - try { - return ((string)(this[this.tabledurados_UserApp.RoleColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Role\' in table \'durados_UserApp\' is DBNull.", e); - } - } - set { - this[this.tabledurados_UserApp.RoleColumn] = value; - } + public void SetconditionNull() { + this[this.tablebackand_ActionTemplate.conditionColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppRow durados_AppRow { - get { - return ((durados_AppRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_UserApp_durados_App"]))); - } - set { - this.SetParentRow(value, this.Table.ParentRelations["FK_durados_UserApp_durados_App"]); - } + public bool IsparametersNull() { + return this.IsNull(this.tablebackand_ActionTemplate.parametersColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public v_durados_UserRow durados_UserRow { - get { - return ((v_durados_UserRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_UserApp_durados_User"]))); - } - set { - this.SetParentRow(value, this.Table.ParentRelations["FK_durados_UserApp_durados_User"]); - } + public void SetparametersNull() { + this[this.tablebackand_ActionTemplate.parametersColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsCategoryNull() { - return this.IsNull(this.tabledurados_UserApp.CategoryColumn); + public bool IscodeNull() { + return this.IsNull(this.tablebackand_ActionTemplate.codeColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetCategoryNull() { - this[this.tabledurados_UserApp.CategoryColumn] = global::System.Convert.DBNull; + public void SetcodeNull() { + this[this.tablebackand_ActionTemplate.codeColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsRoleNull() { - return this.IsNull(this.tabledurados_UserApp.RoleColumn); + public bool IsexecuteCommandNull() { + return this.IsNull(this.tablebackand_ActionTemplate.executeCommandColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetRoleNull() { - this[this.tabledurados_UserApp.RoleColumn] = global::System.Convert.DBNull; + public void SetexecuteCommandNull() { + this[this.tablebackand_ActionTemplate.executeCommandColumn] = global::System.Convert.DBNull; } - } - - /// - ///Represents strongly named DataRow class. - /// - public partial class durados_DataSourceTypeRow : global::System.Data.DataRow { - - private durados_DataSourceTypeDataTable tabledurados_DataSourceType; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal durados_DataSourceTypeRow(global::System.Data.DataRowBuilder rb) : - base(rb) { - this.tabledurados_DataSourceType = ((durados_DataSourceTypeDataTable)(this.Table)); + public bool IsexecuteMessageNull() { + return this.IsNull(this.tablebackand_ActionTemplate.executeMessageColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int Id { - get { - return ((int)(this[this.tabledurados_DataSourceType.IdColumn])); - } - set { - this[this.tabledurados_DataSourceType.IdColumn] = value; - } + public void SetexecuteMessageNull() { + this[this.tablebackand_ActionTemplate.executeMessageColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Name { - get { - try { - return ((string)(this[this.tabledurados_DataSourceType.NameColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Name\' in table \'durados_DataSourceType\' is DBNull.", e); - } - } - set { - this[this.tabledurados_DataSourceType.NameColumn] = value; - } + public bool IsjsonNull() { + return this.IsNull(this.tablebackand_ActionTemplate.jsonColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int Ordinal { - get { - try { - return ((int)(this[this.tabledurados_DataSourceType.OrdinalColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Ordinal\' in table \'durados_DataSourceType\' is DBNull.", e); - } - } - set { - this[this.tabledurados_DataSourceType.OrdinalColumn] = value; - } + public void SetjsonNull() { + this[this.tablebackand_ActionTemplate.jsonColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsNameNull() { - return this.IsNull(this.tabledurados_DataSourceType.NameColumn); + public bool IsbackandsNull() { + return this.IsNull(this.tablebackand_ActionTemplate.backandsColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetNameNull() { - this[this.tabledurados_DataSourceType.NameColumn] = global::System.Convert.DBNull; + public void SetbackandsNull() { + this[this.tablebackand_ActionTemplate.backandsColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsOrdinalNull() { - return this.IsNull(this.tabledurados_DataSourceType.OrdinalColumn); + public bool IsapprovedNull() { + return this.IsNull(this.tablebackand_ActionTemplate.approvedColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetOrdinalNull() { - this[this.tabledurados_DataSourceType.OrdinalColumn] = global::System.Convert.DBNull; + public void SetapprovedNull() { + this[this.tablebackand_ActionTemplate.approvedColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppRow[] Getdurados_AppRows() { - if ((this.Table.ChildRelations["FK_durados_App_durados_DataSourceType"] == null)) { - return new durados_AppRow[0]; - } - else { - return ((durados_AppRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_App_durados_DataSourceType"]))); - } + public bool IsapprovedDateNull() { + return this.IsNull(this.tablebackand_ActionTemplate.approvedDateColumn); } - } - - /// - ///Represents strongly named DataRow class. - /// - public partial class durados_DnsAliasRow : global::System.Data.DataRow { - - private durados_DnsAliasDataTable tabledurados_DnsAlias; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal durados_DnsAliasRow(global::System.Data.DataRowBuilder rb) : - base(rb) { - this.tabledurados_DnsAlias = ((durados_DnsAliasDataTable)(this.Table)); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int Id { - get { - return ((int)(this[this.tabledurados_DnsAlias.IdColumn])); - } - set { - this[this.tabledurados_DnsAlias.IdColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Alias { - get { - return ((string)(this[this.tabledurados_DnsAlias.AliasColumn])); - } - set { - this[this.tabledurados_DnsAlias.AliasColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int AppId { - get { - return ((int)(this[this.tabledurados_DnsAlias.AppIdColumn])); - } - set { - this[this.tabledurados_DnsAlias.AppIdColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppRow durados_AppRow { - get { - return ((durados_AppRow)(this.GetParentRow(this.Table.ParentRelations["durados_App_durados_DnsAlias"]))); - } - set { - this.SetParentRow(value, this.Table.ParentRelations["durados_App_durados_DnsAlias"]); - } - } - } - - /// - ///Represents strongly named DataRow class. - /// - public partial class durados_SqlProductRow : global::System.Data.DataRow { - - private durados_SqlProductDataTable tabledurados_SqlProduct; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal durados_SqlProductRow(global::System.Data.DataRowBuilder rb) : - base(rb) { - this.tabledurados_SqlProduct = ((durados_SqlProductDataTable)(this.Table)); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int Id { - get { - return ((int)(this[this.tabledurados_SqlProduct.IdColumn])); - } - set { - this[this.tabledurados_SqlProduct.IdColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Name { - get { - try { - return ((string)(this[this.tabledurados_SqlProduct.NameColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Name\' in table \'durados_SqlProduct\' is DBNull.", e); - } - } - set { - this[this.tabledurados_SqlProduct.NameColumn] = value; - } + public void SetapprovedDateNull() { + this[this.tablebackand_ActionTemplate.approvedDateColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int Ordinal { - get { - try { - return ((int)(this[this.tabledurados_SqlProduct.OrdinalColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Ordinal\' in table \'durados_SqlProduct\' is DBNull.", e); - } - } - set { - this[this.tabledurados_SqlProduct.OrdinalColumn] = value; - } + public bool IscontributorsNull() { + return this.IsNull(this.tablebackand_ActionTemplate.contributorsColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsNameNull() { - return this.IsNull(this.tabledurados_SqlProduct.NameColumn); + public void SetcontributorsNull() { + this[this.tablebackand_ActionTemplate.contributorsColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetNameNull() { - this[this.tabledurados_SqlProduct.NameColumn] = global::System.Convert.DBNull; + public bool IscategoryNull() { + return this.IsNull(this.tablebackand_ActionTemplate.categoryColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsOrdinalNull() { - return this.IsNull(this.tabledurados_SqlProduct.OrdinalColumn); + public void SetcategoryNull() { + this[this.tablebackand_ActionTemplate.categoryColumn] = global::System.Convert.DBNull; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetOrdinalNull() { - this[this.tabledurados_SqlProduct.OrdinalColumn] = global::System.Convert.DBNull; + public bool IsordinalNull() { + return this.IsNull(this.tablebackand_ActionTemplate.ordinalColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_SqlConnectionRow[] Getdurados_SqlConnectionRows() { - if ((this.Table.ChildRelations["durados_SqlProduct_durados_SqlConnection"] == null)) { - return new durados_SqlConnectionRow[0]; - } - else { - return ((durados_SqlConnectionRow[])(base.GetChildRows(this.Table.ChildRelations["durados_SqlProduct_durados_SqlConnection"]))); - } + public void SetordinalNull() { + this[this.tablebackand_ActionTemplate.ordinalColumn] = global::System.Convert.DBNull; } } /// ///Represents strongly named DataRow class. /// - public partial class durados_ThemeRow : global::System.Data.DataRow { + public partial class durados_UserSocialRow : global::System.Data.DataRow { - private durados_ThemeDataTable tabledurados_Theme; + private durados_UserSocialDataTable tabledurados_UserSocial; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal durados_ThemeRow(global::System.Data.DataRowBuilder rb) : + internal durados_UserSocialRow(global::System.Data.DataRowBuilder rb) : base(rb) { - this.tabledurados_Theme = ((durados_ThemeDataTable)(this.Table)); + this.tabledurados_UserSocial = ((durados_UserSocialDataTable)(this.Table)); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int Id { + public int id { get { - return ((int)(this[this.tabledurados_Theme.IdColumn])); + return ((int)(this[this.tabledurados_UserSocial.idColumn])); } set { - this[this.tabledurados_Theme.IdColumn] = value; + this[this.tabledurados_UserSocial.idColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Name { + public int UserId { get { - return ((string)(this[this.tabledurados_Theme.NameColumn])); + return ((int)(this[this.tabledurados_UserSocial.UserIdColumn])); } set { - this[this.tabledurados_Theme.NameColumn] = value; + this[this.tabledurados_UserSocial.UserIdColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string RelativePath { + public string Provider { get { - return ((string)(this[this.tabledurados_Theme.RelativePathColumn])); + return ((string)(this[this.tabledurados_UserSocial.ProviderColumn])); } set { - this[this.tabledurados_Theme.RelativePathColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppRow[] Getdurados_AppRows() { - if ((this.Table.ChildRelations["FK_durados_App_durados_Theme"] == null)) { - return new durados_AppRow[0]; - } - else { - return ((durados_AppRow[])(base.GetChildRows(this.Table.ChildRelations["FK_durados_App_durados_Theme"]))); + this[this.tabledurados_UserSocial.ProviderColumn] = value; } } - } - - /// - ///Represents strongly named DataRow class. - /// - public partial class durados_AppStatRow : global::System.Data.DataRow { - - private durados_AppStatDataTable tabledurados_AppStat; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal durados_AppStatRow(global::System.Data.DataRowBuilder rb) : - base(rb) { - this.tabledurados_AppStat = ((durados_AppStatDataTable)(this.Table)); - } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int Id { + public string SocialId { get { - return ((int)(this[this.tabledurados_AppStat.IdColumn])); + return ((string)(this[this.tabledurados_UserSocial.SocialIdColumn])); } set { - this[this.tabledurados_AppStat.IdColumn] = value; + this[this.tabledurados_UserSocial.SocialIdColumn] = value; } } @@ -8284,62 +7787,25 @@ public int Id { public int AppId { get { try { - return ((int)(this[this.tabledurados_AppStat.AppIdColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'AppId\' in table \'durados_AppStat\' is DBNull.", e); - } - } - set { - this[this.tabledurados_AppStat.AppIdColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Name { - get { - try { - return ((string)(this[this.tabledurados_AppStat.NameColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Name\' in table \'durados_AppStat\' is DBNull.", e); - } - } - set { - this[this.tabledurados_AppStat.NameColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public float Value { - get { - try { - return ((float)(this[this.tabledurados_AppStat.ValueColumn])); + return ((int)(this[this.tabledurados_UserSocial.AppIdColumn])); } catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Value\' in table \'durados_AppStat\' is DBNull.", e); + throw new global::System.Data.StrongTypingException("The value for column \'AppId\' in table \'durados_UserSocial\' is DBNull.", e); } } set { - this[this.tabledurados_AppStat.ValueColumn] = value; + this[this.tabledurados_UserSocial.AppIdColumn] = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public System.DateTime Date { + public v_durados_UserRow v_durados_UserRow { get { - try { - return ((global::System.DateTime)(this[this.tabledurados_AppStat.DateColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'Date\' in table \'durados_AppStat\' is DBNull.", e); - } + return ((v_durados_UserRow)(this.GetParentRow(this.Table.ParentRelations["v_durados_User_durados_UserSocial"]))); } set { - this[this.tabledurados_AppStat.DateColumn] = value; + this.SetParentRow(value, this.Table.ParentRelations["v_durados_User_durados_UserSocial"]); } } @@ -8347,2562 +7813,447 @@ public System.DateTime Date { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public durados_AppRow durados_AppRow { get { - return ((durados_AppRow)(this.GetParentRow(this.Table.ParentRelations["FK_durados_AppStat_durados_App"]))); + return ((durados_AppRow)(this.GetParentRow(this.Table.ParentRelations["durados_App_durados_UserSocial"]))); } set { - this.SetParentRow(value, this.Table.ParentRelations["FK_durados_AppStat_durados_App"]); + this.SetParentRow(value, this.Table.ParentRelations["durados_App_durados_UserSocial"]); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public bool IsAppIdNull() { - return this.IsNull(this.tabledurados_AppStat.AppIdColumn); + return this.IsNull(this.tabledurados_UserSocial.AppIdColumn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public void SetAppIdNull() { - this[this.tabledurados_AppStat.AppIdColumn] = global::System.Convert.DBNull; + this[this.tabledurados_UserSocial.AppIdColumn] = global::System.Convert.DBNull; } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public class durados_AppRowChangeEvent : global::System.EventArgs { + + private durados_AppRow eventRow; + + private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsNameNull() { - return this.IsNull(this.tabledurados_AppStat.NameColumn); + public durados_AppRowChangeEvent(durados_AppRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetNameNull() { - this[this.tabledurados_AppStat.NameColumn] = global::System.Convert.DBNull; + public durados_AppRow Row { + get { + return this.eventRow; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsValueNull() { - return this.IsNull(this.tabledurados_AppStat.ValueColumn); + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public class durados_SqlConnectionRowChangeEvent : global::System.EventArgs { + + private durados_SqlConnectionRow eventRow; + + private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetValueNull() { - this[this.tabledurados_AppStat.ValueColumn] = global::System.Convert.DBNull; + public durados_SqlConnectionRowChangeEvent(durados_SqlConnectionRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsDateNull() { - return this.IsNull(this.tabledurados_AppStat.DateColumn); + public durados_SqlConnectionRow Row { + get { + return this.eventRow; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetDateNull() { - this[this.tabledurados_AppStat.DateColumn] = global::System.Convert.DBNull; + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } } } /// - ///Represents strongly named DataRow class. + ///Row event argument class /// - public partial class backand_ActionTemplateRow : global::System.Data.DataRow { + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public class v_durados_UserRowChangeEvent : global::System.EventArgs { - private backand_ActionTemplateDataTable tablebackand_ActionTemplate; + private v_durados_UserRow eventRow; + + private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal backand_ActionTemplateRow(global::System.Data.DataRowBuilder rb) : - base(rb) { - this.tablebackand_ActionTemplate = ((backand_ActionTemplateDataTable)(this.Table)); + public v_durados_UserRowChangeEvent(v_durados_UserRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int id { + public v_durados_UserRow Row { get { - return ((int)(this[this.tablebackand_ActionTemplate.idColumn])); - } - set { - this[this.tablebackand_ActionTemplate.idColumn] = value; + return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string name { + public global::System.Data.DataRowAction Action { get { - return ((string)(this[this.tablebackand_ActionTemplate.nameColumn])); - } - set { - this[this.tablebackand_ActionTemplate.nameColumn] = value; + return this.eventAction; } } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public class durados_UserAliasRowChangeEvent : global::System.EventArgs { + + private durados_UserAliasRow eventRow; + + private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string shortDescription { - get { - try { - return ((string)(this[this.tablebackand_ActionTemplate.shortDescriptionColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'shortDescription\' in table \'backand_ActionTemplate\' is DBNu" + - "ll.", e); - } - } - set { - this[this.tablebackand_ActionTemplate.shortDescriptionColumn] = value; - } + public durados_UserAliasRowChangeEvent(durados_UserAliasRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string documentation { + public durados_UserAliasRow Row { get { - try { - return ((string)(this[this.tablebackand_ActionTemplate.documentationColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'documentation\' in table \'backand_ActionTemplate\' is DBNull." + - "", e); - } - } - set { - this[this.tablebackand_ActionTemplate.documentationColumn] = value; + return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public System.DateTime createdDate { + public global::System.Data.DataRowAction Action { get { - try { - return ((global::System.DateTime)(this[this.tablebackand_ActionTemplate.createdDateColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'createdDate\' in table \'backand_ActionTemplate\' is DBNull.", e); - } - } - set { - this[this.tablebackand_ActionTemplate.createdDateColumn] = value; + return this.eventAction; } } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public class durados_UserAppRowChangeEvent : global::System.EventArgs { + + private durados_UserAppRow eventRow; + + private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public System.DateTime updatedDate { - get { - try { - return ((global::System.DateTime)(this[this.tablebackand_ActionTemplate.updatedDateColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'updatedDate\' in table \'backand_ActionTemplate\' is DBNull.", e); - } - } - set { - this[this.tablebackand_ActionTemplate.updatedDateColumn] = value; - } + public durados_UserAppRowChangeEvent(durados_UserAppRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string createdBy { + public durados_UserAppRow Row { get { - try { - return ((string)(this[this.tablebackand_ActionTemplate.createdByColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'createdBy\' in table \'backand_ActionTemplate\' is DBNull.", e); - } - } - set { - this[this.tablebackand_ActionTemplate.createdByColumn] = value; + return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string updatedBy { + public global::System.Data.DataRowAction Action { get { - try { - return ((string)(this[this.tablebackand_ActionTemplate.updatedByColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'updatedBy\' in table \'backand_ActionTemplate\' is DBNull.", e); - } - } - set { - this[this.tablebackand_ActionTemplate.updatedByColumn] = value; + return this.eventAction; } } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public class durados_DataSourceTypeRowChangeEvent : global::System.EventArgs { + + private durados_DataSourceTypeRow eventRow; + + private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string ruleName { - get { - try { - return ((string)(this[this.tablebackand_ActionTemplate.ruleNameColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'ruleName\' in table \'backand_ActionTemplate\' is DBNull.", e); - } - } - set { - this[this.tablebackand_ActionTemplate.ruleNameColumn] = value; - } + public durados_DataSourceTypeRowChangeEvent(durados_DataSourceTypeRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string objectName { + public durados_DataSourceTypeRow Row { get { - try { - return ((string)(this[this.tablebackand_ActionTemplate.objectNameColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'objectName\' in table \'backand_ActionTemplate\' is DBNull.", e); - } - } - set { - this[this.tablebackand_ActionTemplate.objectNameColumn] = value; + return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string action { + public global::System.Data.DataRowAction Action { get { - try { - return ((string)(this[this.tablebackand_ActionTemplate.actionColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'action\' in table \'backand_ActionTemplate\' is DBNull.", e); - } - } - set { - this[this.tablebackand_ActionTemplate.actionColumn] = value; + return this.eventAction; } } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public class durados_SqlProductRowChangeEvent : global::System.EventArgs { + + private durados_SqlProductRow eventRow; + + private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string ruleType { - get { - try { - return ((string)(this[this.tablebackand_ActionTemplate.ruleTypeColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'ruleType\' in table \'backand_ActionTemplate\' is DBNull.", e); - } - } - set { - this[this.tablebackand_ActionTemplate.ruleTypeColumn] = value; - } + public durados_SqlProductRowChangeEvent(durados_SqlProductRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string condition { + public durados_SqlProductRow Row { get { - try { - return ((string)(this[this.tablebackand_ActionTemplate.conditionColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'condition\' in table \'backand_ActionTemplate\' is DBNull.", e); - } - } - set { - this[this.tablebackand_ActionTemplate.conditionColumn] = value; + return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string parameters { + public global::System.Data.DataRowAction Action { get { - try { - return ((string)(this[this.tablebackand_ActionTemplate.parametersColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'parameters\' in table \'backand_ActionTemplate\' is DBNull.", e); - } - } - set { - this[this.tablebackand_ActionTemplate.parametersColumn] = value; + return this.eventAction; } } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public class backand_ActionTemplateRowChangeEvent : global::System.EventArgs { + + private backand_ActionTemplateRow eventRow; + + private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string code { - get { - try { - return ((string)(this[this.tablebackand_ActionTemplate.codeColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'code\' in table \'backand_ActionTemplate\' is DBNull.", e); - } - } - set { - this[this.tablebackand_ActionTemplate.codeColumn] = value; - } + public backand_ActionTemplateRowChangeEvent(backand_ActionTemplateRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string executeCommand { + public backand_ActionTemplateRow Row { get { - try { - return ((string)(this[this.tablebackand_ActionTemplate.executeCommandColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'executeCommand\' in table \'backand_ActionTemplate\' is DBNull" + - ".", e); - } - } - set { - this[this.tablebackand_ActionTemplate.executeCommandColumn] = value; + return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string executeMessage { + public global::System.Data.DataRowAction Action { get { - try { - return ((string)(this[this.tablebackand_ActionTemplate.executeMessageColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'executeMessage\' in table \'backand_ActionTemplate\' is DBNull" + - ".", e); - } - } - set { - this[this.tablebackand_ActionTemplate.executeMessageColumn] = value; + return this.eventAction; } } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public class durados_UserSocialRowChangeEvent : global::System.EventArgs { - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string json { - get { - try { - return ((string)(this[this.tablebackand_ActionTemplate.jsonColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'json\' in table \'backand_ActionTemplate\' is DBNull.", e); - } - } - set { - this[this.tablebackand_ActionTemplate.jsonColumn] = value; - } - } + private durados_UserSocialRow eventRow; + + private global::System.Data.DataRowAction eventAction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool backands { - get { - try { - return ((bool)(this[this.tablebackand_ActionTemplate.backandsColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'backands\' in table \'backand_ActionTemplate\' is DBNull.", e); - } - } - set { - this[this.tablebackand_ActionTemplate.backandsColumn] = value; - } + public durados_UserSocialRowChangeEvent(durados_UserSocialRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool approved { + public durados_UserSocialRow Row { get { - try { - return ((bool)(this[this.tablebackand_ActionTemplate.approvedColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'approved\' in table \'backand_ActionTemplate\' is DBNull.", e); - } - } - set { - this[this.tablebackand_ActionTemplate.approvedColumn] = value; + return this.eventRow; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public System.DateTime approvedDate { + public global::System.Data.DataRowAction Action { get { - try { - return ((global::System.DateTime)(this[this.tablebackand_ActionTemplate.approvedDateColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'approvedDate\' in table \'backand_ActionTemplate\' is DBNull.", e); - } - } - set { - this[this.tablebackand_ActionTemplate.approvedDateColumn] = value; + return this.eventAction; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string contributors { - get { - try { - return ((string)(this[this.tablebackand_ActionTemplate.contributorsColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'contributors\' in table \'backand_ActionTemplate\' is DBNull.", e); - } + } + } +} +namespace Durados.Web.Mvc.MapDataSetTableAdapters { + + + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class durados_AppTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlClient.SqlDataAdapter _adapter; + + private global::System.Data.SqlClient.SqlConnection _connection; + + private global::System.Data.SqlClient.SqlTransaction _transaction; + + private global::System.Data.SqlClient.SqlCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public durados_AppTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); } - set { - this[this.tablebackand_ActionTemplate.contributorsColumn] = value; + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal global::System.Data.SqlClient.SqlConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); } + return this._connection; } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int category { - get { - try { - return ((int)(this[this.tablebackand_ActionTemplate.categoryColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'category\' in table \'backand_ActionTemplate\' is DBNull.", e); - } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; } - set { - this[this.tablebackand_ActionTemplate.categoryColumn] = value; + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int ordinal { - get { - try { - return ((int)(this[this.tablebackand_ActionTemplate.ordinalColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'ordinal\' in table \'backand_ActionTemplate\' is DBNull.", e); - } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; } - set { - this[this.tablebackand_ActionTemplate.ordinalColumn] = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; + } } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsshortDescriptionNull() { - return this.IsNull(this.tablebackand_ActionTemplate.shortDescriptionColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetshortDescriptionNull() { - this[this.tablebackand_ActionTemplate.shortDescriptionColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal global::System.Data.SqlClient.SqlTransaction Transaction { + get { + return this._transaction; } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsdocumentationNull() { - return this.IsNull(this.tablebackand_ActionTemplate.documentationColumn); + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetdocumentationNull() { - this[this.tablebackand_ActionTemplate.documentationColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IscreatedDateNull() { - return this.IsNull(this.tablebackand_ActionTemplate.createdDateColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetcreatedDateNull() { - this[this.tablebackand_ActionTemplate.createdDateColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsupdatedDateNull() { - return this.IsNull(this.tablebackand_ActionTemplate.updatedDateColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetupdatedDateNull() { - this[this.tablebackand_ActionTemplate.updatedDateColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IscreatedByNull() { - return this.IsNull(this.tablebackand_ActionTemplate.createdByColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetcreatedByNull() { - this[this.tablebackand_ActionTemplate.createdByColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsupdatedByNull() { - return this.IsNull(this.tablebackand_ActionTemplate.updatedByColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetupdatedByNull() { - this[this.tablebackand_ActionTemplate.updatedByColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsruleNameNull() { - return this.IsNull(this.tablebackand_ActionTemplate.ruleNameColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetruleNameNull() { - this[this.tablebackand_ActionTemplate.ruleNameColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsobjectNameNull() { - return this.IsNull(this.tablebackand_ActionTemplate.objectNameColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetobjectNameNull() { - this[this.tablebackand_ActionTemplate.objectNameColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsactionNull() { - return this.IsNull(this.tablebackand_ActionTemplate.actionColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetactionNull() { - this[this.tablebackand_ActionTemplate.actionColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsruleTypeNull() { - return this.IsNull(this.tablebackand_ActionTemplate.ruleTypeColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetruleTypeNull() { - this[this.tablebackand_ActionTemplate.ruleTypeColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsconditionNull() { - return this.IsNull(this.tablebackand_ActionTemplate.conditionColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetconditionNull() { - this[this.tablebackand_ActionTemplate.conditionColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsparametersNull() { - return this.IsNull(this.tablebackand_ActionTemplate.parametersColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetparametersNull() { - this[this.tablebackand_ActionTemplate.parametersColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IscodeNull() { - return this.IsNull(this.tablebackand_ActionTemplate.codeColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetcodeNull() { - this[this.tablebackand_ActionTemplate.codeColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsexecuteCommandNull() { - return this.IsNull(this.tablebackand_ActionTemplate.executeCommandColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetexecuteCommandNull() { - this[this.tablebackand_ActionTemplate.executeCommandColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsexecuteMessageNull() { - return this.IsNull(this.tablebackand_ActionTemplate.executeMessageColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetexecuteMessageNull() { - this[this.tablebackand_ActionTemplate.executeMessageColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsjsonNull() { - return this.IsNull(this.tablebackand_ActionTemplate.jsonColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetjsonNull() { - this[this.tablebackand_ActionTemplate.jsonColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsbackandsNull() { - return this.IsNull(this.tablebackand_ActionTemplate.backandsColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetbackandsNull() { - this[this.tablebackand_ActionTemplate.backandsColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsapprovedNull() { - return this.IsNull(this.tablebackand_ActionTemplate.approvedColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetapprovedNull() { - this[this.tablebackand_ActionTemplate.approvedColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsapprovedDateNull() { - return this.IsNull(this.tablebackand_ActionTemplate.approvedDateColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetapprovedDateNull() { - this[this.tablebackand_ActionTemplate.approvedDateColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IscontributorsNull() { - return this.IsNull(this.tablebackand_ActionTemplate.contributorsColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetcontributorsNull() { - this[this.tablebackand_ActionTemplate.contributorsColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IscategoryNull() { - return this.IsNull(this.tablebackand_ActionTemplate.categoryColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetcategoryNull() { - this[this.tablebackand_ActionTemplate.categoryColumn] = global::System.Convert.DBNull; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsordinalNull() { - return this.IsNull(this.tablebackand_ActionTemplate.ordinalColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetordinalNull() { - this[this.tablebackand_ActionTemplate.ordinalColumn] = global::System.Convert.DBNull; - } - } - - /// - ///Represents strongly named DataRow class. - /// - public partial class durados_UserSocialRow : global::System.Data.DataRow { - - private durados_UserSocialDataTable tabledurados_UserSocial; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal durados_UserSocialRow(global::System.Data.DataRowBuilder rb) : - base(rb) { - this.tabledurados_UserSocial = ((durados_UserSocialDataTable)(this.Table)); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int id { - get { - return ((int)(this[this.tabledurados_UserSocial.idColumn])); - } - set { - this[this.tabledurados_UserSocial.idColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int UserId { - get { - return ((int)(this[this.tabledurados_UserSocial.UserIdColumn])); - } - set { - this[this.tabledurados_UserSocial.UserIdColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Provider { - get { - return ((string)(this[this.tabledurados_UserSocial.ProviderColumn])); - } - set { - this[this.tabledurados_UserSocial.ProviderColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string SocialId { - get { - return ((string)(this[this.tabledurados_UserSocial.SocialIdColumn])); - } - set { - this[this.tabledurados_UserSocial.SocialIdColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public int AppId { - get { - try { - return ((int)(this[this.tabledurados_UserSocial.AppIdColumn])); - } - catch (global::System.InvalidCastException e) { - throw new global::System.Data.StrongTypingException("The value for column \'AppId\' in table \'durados_UserSocial\' is DBNull.", e); - } - } - set { - this[this.tabledurados_UserSocial.AppIdColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public v_durados_UserRow v_durados_UserRow { - get { - return ((v_durados_UserRow)(this.GetParentRow(this.Table.ParentRelations["v_durados_User_durados_UserSocial"]))); - } - set { - this.SetParentRow(value, this.Table.ParentRelations["v_durados_User_durados_UserSocial"]); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppRow durados_AppRow { - get { - return ((durados_AppRow)(this.GetParentRow(this.Table.ParentRelations["durados_App_durados_UserSocial"]))); - } - set { - this.SetParentRow(value, this.Table.ParentRelations["durados_App_durados_UserSocial"]); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool IsAppIdNull() { - return this.IsNull(this.tabledurados_UserSocial.AppIdColumn); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void SetAppIdNull() { - this[this.tabledurados_UserSocial.AppIdColumn] = global::System.Convert.DBNull; - } - } - - /// - ///Row event argument class - /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public class durados_AppRowChangeEvent : global::System.EventArgs { - - private durados_AppRow eventRow; - - private global::System.Data.DataRowAction eventAction; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppRowChangeEvent(durados_AppRow row, global::System.Data.DataRowAction action) { - this.eventRow = row; - this.eventAction = action; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppRow Row { - get { - return this.eventRow; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataRowAction Action { - get { - return this.eventAction; - } - } - } - - /// - ///Row event argument class - /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public class durados_SqlConnectionRowChangeEvent : global::System.EventArgs { - - private durados_SqlConnectionRow eventRow; - - private global::System.Data.DataRowAction eventAction; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_SqlConnectionRowChangeEvent(durados_SqlConnectionRow row, global::System.Data.DataRowAction action) { - this.eventRow = row; - this.eventAction = action; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_SqlConnectionRow Row { - get { - return this.eventRow; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataRowAction Action { - get { - return this.eventAction; - } - } - } - - /// - ///Row event argument class - /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public class v_durados_UserRowChangeEvent : global::System.EventArgs { - - private v_durados_UserRow eventRow; - - private global::System.Data.DataRowAction eventAction; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public v_durados_UserRowChangeEvent(v_durados_UserRow row, global::System.Data.DataRowAction action) { - this.eventRow = row; - this.eventAction = action; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public v_durados_UserRow Row { - get { - return this.eventRow; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataRowAction Action { - get { - return this.eventAction; - } - } - } - - /// - ///Row event argument class - /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public class durados_UserAliasRowChangeEvent : global::System.EventArgs { - - private durados_UserAliasRow eventRow; - - private global::System.Data.DataRowAction eventAction; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_UserAliasRowChangeEvent(durados_UserAliasRow row, global::System.Data.DataRowAction action) { - this.eventRow = row; - this.eventAction = action; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_UserAliasRow Row { - get { - return this.eventRow; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataRowAction Action { - get { - return this.eventAction; - } - } - } - - /// - ///Row event argument class - /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public class durados_UserAppRowChangeEvent : global::System.EventArgs { - - private durados_UserAppRow eventRow; - - private global::System.Data.DataRowAction eventAction; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_UserAppRowChangeEvent(durados_UserAppRow row, global::System.Data.DataRowAction action) { - this.eventRow = row; - this.eventAction = action; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_UserAppRow Row { - get { - return this.eventRow; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataRowAction Action { - get { - return this.eventAction; - } - } - } - - /// - ///Row event argument class - /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public class durados_DataSourceTypeRowChangeEvent : global::System.EventArgs { - - private durados_DataSourceTypeRow eventRow; - - private global::System.Data.DataRowAction eventAction; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_DataSourceTypeRowChangeEvent(durados_DataSourceTypeRow row, global::System.Data.DataRowAction action) { - this.eventRow = row; - this.eventAction = action; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_DataSourceTypeRow Row { - get { - return this.eventRow; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataRowAction Action { - get { - return this.eventAction; - } - } - } - - /// - ///Row event argument class - /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public class durados_DnsAliasRowChangeEvent : global::System.EventArgs { - - private durados_DnsAliasRow eventRow; - - private global::System.Data.DataRowAction eventAction; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_DnsAliasRowChangeEvent(durados_DnsAliasRow row, global::System.Data.DataRowAction action) { - this.eventRow = row; - this.eventAction = action; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_DnsAliasRow Row { - get { - return this.eventRow; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataRowAction Action { - get { - return this.eventAction; - } - } - } - - /// - ///Row event argument class - /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public class durados_SqlProductRowChangeEvent : global::System.EventArgs { - - private durados_SqlProductRow eventRow; - - private global::System.Data.DataRowAction eventAction; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_SqlProductRowChangeEvent(durados_SqlProductRow row, global::System.Data.DataRowAction action) { - this.eventRow = row; - this.eventAction = action; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_SqlProductRow Row { - get { - return this.eventRow; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataRowAction Action { - get { - return this.eventAction; - } - } - } - - /// - ///Row event argument class - /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public class durados_ThemeRowChangeEvent : global::System.EventArgs { - - private durados_ThemeRow eventRow; - - private global::System.Data.DataRowAction eventAction; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_ThemeRowChangeEvent(durados_ThemeRow row, global::System.Data.DataRowAction action) { - this.eventRow = row; - this.eventAction = action; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_ThemeRow Row { - get { - return this.eventRow; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataRowAction Action { - get { - return this.eventAction; - } - } - } - - /// - ///Row event argument class - /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public class durados_AppStatRowChangeEvent : global::System.EventArgs { - - private durados_AppStatRow eventRow; - - private global::System.Data.DataRowAction eventAction; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppStatRowChangeEvent(durados_AppStatRow row, global::System.Data.DataRowAction action) { - this.eventRow = row; - this.eventAction = action; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppStatRow Row { - get { - return this.eventRow; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataRowAction Action { - get { - return this.eventAction; - } - } - } - - /// - ///Row event argument class - /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public class backand_ActionTemplateRowChangeEvent : global::System.EventArgs { - - private backand_ActionTemplateRow eventRow; - - private global::System.Data.DataRowAction eventAction; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public backand_ActionTemplateRowChangeEvent(backand_ActionTemplateRow row, global::System.Data.DataRowAction action) { - this.eventRow = row; - this.eventAction = action; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public backand_ActionTemplateRow Row { - get { - return this.eventRow; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataRowAction Action { - get { - return this.eventAction; - } - } - } - - /// - ///Row event argument class - /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public class durados_UserSocialRowChangeEvent : global::System.EventArgs { - - private durados_UserSocialRow eventRow; - - private global::System.Data.DataRowAction eventAction; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_UserSocialRowChangeEvent(durados_UserSocialRow row, global::System.Data.DataRowAction action) { - this.eventRow = row; - this.eventAction = action; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_UserSocialRow Row { - get { - return this.eventRow; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataRowAction Action { - get { - return this.eventAction; - } - } - } - } -} -namespace Durados.Web.Mvc.MapDataSetTableAdapters { - - - /// - ///Represents the connection and commands used to retrieve and save data. - /// - [global::System.ComponentModel.DesignerCategoryAttribute("code")] - [global::System.ComponentModel.ToolboxItem(true)] - [global::System.ComponentModel.DataObjectAttribute(true)] - [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + - ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public partial class durados_AppTableAdapter : global::System.ComponentModel.Component { - - private global::System.Data.SqlClient.SqlDataAdapter _adapter; - - private global::System.Data.SqlClient.SqlConnection _connection; - - private global::System.Data.SqlClient.SqlTransaction _transaction; - - private global::System.Data.SqlClient.SqlCommand[] _commandCollection; - - private bool _clearBeforeFill; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppTableAdapter() { - this.ClearBeforeFill = true; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { - get { - if ((this._adapter == null)) { - this.InitAdapter(); - } - return this._adapter; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal global::System.Data.SqlClient.SqlConnection Connection { - get { - if ((this._connection == null)) { - this.InitConnection(); - } - return this._connection; - } - set { - this._connection = value; - if ((this.Adapter.InsertCommand != null)) { - this.Adapter.InsertCommand.Connection = value; - } - if ((this.Adapter.DeleteCommand != null)) { - this.Adapter.DeleteCommand.Connection = value; - } - if ((this.Adapter.UpdateCommand != null)) { - this.Adapter.UpdateCommand.Connection = value; - } - for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { - if ((this.CommandCollection[i] != null)) { - ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; - } - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal global::System.Data.SqlClient.SqlTransaction Transaction { - get { - return this._transaction; - } - set { - this._transaction = value; - for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { - this.CommandCollection[i].Transaction = this._transaction; - } - if (((this.Adapter != null) - && (this.Adapter.DeleteCommand != null))) { - this.Adapter.DeleteCommand.Transaction = this._transaction; - } - if (((this.Adapter != null) - && (this.Adapter.InsertCommand != null))) { - this.Adapter.InsertCommand.Transaction = this._transaction; - } - if (((this.Adapter != null) - && (this.Adapter.UpdateCommand != null))) { - this.Adapter.UpdateCommand.Transaction = this._transaction; - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { - get { - if ((this._commandCollection == null)) { - this.InitCommandCollection(); - } - return this._commandCollection; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool ClearBeforeFill { - get { - return this._clearBeforeFill; - } - set { - this._clearBeforeFill = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private void InitAdapter() { - this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); - global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); - tableMapping.SourceTable = "Table"; - tableMapping.DataSetTable = "durados_App"; - tableMapping.ColumnMappings.Add("Id", "Id"); - tableMapping.ColumnMappings.Add("Name", "Name"); - tableMapping.ColumnMappings.Add("Creator", "Creator"); - tableMapping.ColumnMappings.Add("CreatedDate", "CreatedDate"); - tableMapping.ColumnMappings.Add("ToDelete", "ToDelete"); - tableMapping.ColumnMappings.Add("ToDeleteDate", "ToDeleteDate"); - tableMapping.ColumnMappings.Add("Deleted", "Deleted"); - tableMapping.ColumnMappings.Add("DeletedDate", "DeletedDate"); - tableMapping.ColumnMappings.Add("DataSourceTypeId", "DataSourceTypeId"); - tableMapping.ColumnMappings.Add("SqlConnectionId", "SqlConnectionId"); - tableMapping.ColumnMappings.Add("UsesSpecificBinary", "UsesSpecificBinary"); - tableMapping.ColumnMappings.Add("Url", "Url"); - tableMapping.ColumnMappings.Add("Image", "Image"); - tableMapping.ColumnMappings.Add("ExistingDataSource", "ExistingDataSource"); - tableMapping.ColumnMappings.Add("TemplateId", "TemplateId"); - tableMapping.ColumnMappings.Add("ExcelFileName", "ExcelFileName"); - tableMapping.ColumnMappings.Add("SpecificDOTNET", "SpecificDOTNET"); - tableMapping.ColumnMappings.Add("SpecificJS", "SpecificJS"); - tableMapping.ColumnMappings.Add("SpecificCss", "SpecificCss"); - tableMapping.ColumnMappings.Add("UseAsTemplate", "UseAsTemplate"); - tableMapping.ColumnMappings.Add("Description", "Description"); - tableMapping.ColumnMappings.Add("TemplateFile", "TemplateFile"); - tableMapping.ColumnMappings.Add("SystemSqlConnectionId", "SystemSqlConnectionId"); - tableMapping.ColumnMappings.Add("PrivateAuthentication", "PrivateAuthentication"); - tableMapping.ColumnMappings.Add("SecuritySqlConnectionId", "SecuritySqlConnectionId"); - this._adapter.TableMappings.Add(tableMapping); - this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); - this._adapter.DeleteCommand.Connection = this.Connection; - this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[durados_App] WHERE (([Id] = @Original_Id) AND ([Name] = @Origi" + - "nal_Name) AND ([Creator] = @Original_Creator) AND ([CreatedDate] = @Original_Cre" + - "atedDate) AND ([ToDelete] = @Original_ToDelete) AND ((@IsNull_ToDeleteDate = 1 A" + - "ND [ToDeleteDate] IS NULL) OR ([ToDeleteDate] = @Original_ToDeleteDate)) AND ([D" + - "eleted] = @Original_Deleted) AND ((@IsNull_DeletedDate = 1 AND [DeletedDate] IS " + - "NULL) OR ([DeletedDate] = @Original_DeletedDate)) AND ((@IsNull_DataSourceTypeId" + - " = 1 AND [DataSourceTypeId] IS NULL) OR ([DataSourceTypeId] = @Original_DataSour" + - "ceTypeId)) AND ((@IsNull_SqlConnectionId = 1 AND [SqlConnectionId] IS NULL) OR (" + - "[SqlConnectionId] = @Original_SqlConnectionId)) AND ((@IsNull_UsesSpecificBinary" + - " = 1 AND [UsesSpecificBinary] IS NULL) OR ([UsesSpecificBinary] = @Original_Uses" + - "SpecificBinary)) AND ((@IsNull_Url = 1 AND [Url] IS NULL) OR ([Url] = @Original_" + - "Url)) AND ((@IsNull_Image = 1 AND [Image] IS NULL) OR ([Image] = @Original_Image" + - ")) AND ((@IsNull_ExistingDataSource = 1 AND [ExistingDataSource] IS NULL) OR ([E" + - "xistingDataSource] = @Original_ExistingDataSource)) AND ((@IsNull_TemplateId = 1" + - " AND [TemplateId] IS NULL) OR ([TemplateId] = @Original_TemplateId)) AND ((@IsNu" + - "ll_ExcelFileName = 1 AND [ExcelFileName] IS NULL) OR ([ExcelFileName] = @Origina" + - "l_ExcelFileName)) AND ((@IsNull_SpecificDOTNET = 1 AND [SpecificDOTNET] IS NULL)" + - " OR ([SpecificDOTNET] = @Original_SpecificDOTNET)) AND ((@IsNull_SpecificJS = 1 " + - "AND [SpecificJS] IS NULL) OR ([SpecificJS] = @Original_SpecificJS)) AND ((@IsNul" + - "l_SpecificCss = 1 AND [SpecificCss] IS NULL) OR ([SpecificCss] = @Original_Speci" + - "ficCss)) AND ((@IsNull_UseAsTemplate = 1 AND [UseAsTemplate] IS NULL) OR ([UseAs" + - "Template] = @Original_UseAsTemplate)) AND ((@IsNull_TemplateFile = 1 AND [Templa" + - "teFile] IS NULL) OR ([TemplateFile] = @Original_TemplateFile)) AND ((@IsNull_Sys" + - "temSqlConnectionId = 1 AND [SystemSqlConnectionId] IS NULL) OR ([SystemSqlConnec" + - "tionId] = @Original_SystemSqlConnectionId)) AND ((@IsNull_PrivateAuthentication " + - "= 1 AND [PrivateAuthentication] IS NULL) OR ([PrivateAuthentication] = @Original" + - "_PrivateAuthentication)) AND ((@IsNull_SecuritySqlConnectionId = 1 AND [Security" + - "SqlConnectionId] IS NULL) OR ([SecuritySqlConnectionId] = @Original_SecuritySqlC" + - "onnectionId)))"; - this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Creator", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Creator", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CreatedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreatedDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ToDelete", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDelete", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ToDeleteDate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDeleteDate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ToDeleteDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDeleteDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Deleted", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Deleted", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DeletedDate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DeletedDate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DeletedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DeletedDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DataSourceTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataSourceTypeId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DataSourceTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataSourceTypeId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SqlConnectionId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SqlConnectionId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_UsesSpecificBinary", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UsesSpecificBinary", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UsesSpecificBinary", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UsesSpecificBinary", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Url", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Url", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Url", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Url", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Image", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ExistingDataSource", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExistingDataSource", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ExistingDataSource", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExistingDataSource", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_TemplateId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TemplateId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ExcelFileName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExcelFileName", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ExcelFileName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExcelFileName", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SpecificDOTNET", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificDOTNET", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SpecificDOTNET", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificDOTNET", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SpecificJS", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificJS", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SpecificJS", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificJS", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SpecificCss", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificCss", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SpecificCss", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificCss", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_UseAsTemplate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UseAsTemplate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UseAsTemplate", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UseAsTemplate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_TemplateFile", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateFile", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TemplateFile", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateFile", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SystemSqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SystemSqlConnectionId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SystemSqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SystemSqlConnectionId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_PrivateAuthentication", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrivateAuthentication", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PrivateAuthentication", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrivateAuthentication", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SecuritySqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SecuritySqlConnectionId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SecuritySqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SecuritySqlConnectionId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); - this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[durados_App] ([Name], [Creator], [CreatedDate], [ToDelete], [ToDeleteDate], [Deleted], [DeletedDate], [DataSourceTypeId], [SqlConnectionId], [UsesSpecificBinary], [Url], [Image], [ExistingDataSource], [TemplateId], [ExcelFileName], [SpecificDOTNET], [SpecificJS], [SpecificCss], [UseAsTemplate], [Description], [TemplateFile], [SystemSqlConnectionId], [PrivateAuthentication], [SecuritySqlConnectionId]) VALUES (@Name, @Creator, @CreatedDate, @ToDelete, @ToDeleteDate, @Deleted, @DeletedDate, @DataSourceTypeId, @SqlConnectionId, @UsesSpecificBinary, @Url, @Image, @ExistingDataSource, @TemplateId, @ExcelFileName, @SpecificDOTNET, @SpecificJS, @SpecificCss, @UseAsTemplate, @Description, @TemplateFile, @SystemSqlConnectionId, @PrivateAuthentication, @SecuritySqlConnectionId); -SELECT Id, Name, Creator, CreatedDate, ToDelete, ToDeleteDate, Deleted, DeletedDate, DataSourceTypeId, SqlConnectionId, UsesSpecificBinary, Url, Image, ExistingDataSource, TemplateId, ExcelFileName, SpecificDOTNET, SpecificJS, SpecificCss, UseAsTemplate, Description, TemplateFile, SystemSqlConnectionId, PrivateAuthentication, SecuritySqlConnectionId FROM durados_App WHERE (Id = SCOPE_IDENTITY())"; - this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Creator", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Creator", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CreatedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreatedDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ToDelete", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDelete", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ToDeleteDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDeleteDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Deleted", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Deleted", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DeletedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DeletedDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataSourceTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataSourceTypeId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SqlConnectionId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UsesSpecificBinary", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UsesSpecificBinary", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Url", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Url", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ExistingDataSource", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExistingDataSource", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TemplateId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ExcelFileName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExcelFileName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SpecificDOTNET", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificDOTNET", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SpecificJS", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificJS", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SpecificCss", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificCss", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UseAsTemplate", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UseAsTemplate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Description", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Description", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TemplateFile", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateFile", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SystemSqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SystemSqlConnectionId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrivateAuthentication", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrivateAuthentication", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SecuritySqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SecuritySqlConnectionId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); - this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[durados_App] SET [Name] = @Name, [Creator] = @Creator, [CreatedDate" + - "] = @CreatedDate, [ToDelete] = @ToDelete, [ToDeleteDate] = @ToDeleteDate, [Delet" + - "ed] = @Deleted, [DeletedDate] = @DeletedDate, [DataSourceTypeId] = @DataSourceTy" + - "peId, [SqlConnectionId] = @SqlConnectionId, [UsesSpecificBinary] = @UsesSpecific" + - "Binary, [Url] = @Url, [Image] = @Image, [ExistingDataSource] = @ExistingDataSour" + - "ce, [TemplateId] = @TemplateId, [ExcelFileName] = @ExcelFileName, [SpecificDOTNE" + - "T] = @SpecificDOTNET, [SpecificJS] = @SpecificJS, [SpecificCss] = @SpecificCss, " + - "[UseAsTemplate] = @UseAsTemplate, [Description] = @Description, [TemplateFile] =" + - " @TemplateFile, [SystemSqlConnectionId] = @SystemSqlConnectionId, [PrivateAuthen" + - "tication] = @PrivateAuthentication, [SecuritySqlConnectionId] = @SecuritySqlConn" + - "ectionId WHERE (([Id] = @Original_Id) AND ([Name] = @Original_Name) AND ([Creato" + - "r] = @Original_Creator) AND ([CreatedDate] = @Original_CreatedDate) AND ([ToDele" + - "te] = @Original_ToDelete) AND ((@IsNull_ToDeleteDate = 1 AND [ToDeleteDate] IS N" + - "ULL) OR ([ToDeleteDate] = @Original_ToDeleteDate)) AND ([Deleted] = @Original_De" + - "leted) AND ((@IsNull_DeletedDate = 1 AND [DeletedDate] IS NULL) OR ([DeletedDate" + - "] = @Original_DeletedDate)) AND ((@IsNull_DataSourceTypeId = 1 AND [DataSourceTy" + - "peId] IS NULL) OR ([DataSourceTypeId] = @Original_DataSourceTypeId)) AND ((@IsNu" + - "ll_SqlConnectionId = 1 AND [SqlConnectionId] IS NULL) OR ([SqlConnectionId] = @O" + - "riginal_SqlConnectionId)) AND ((@IsNull_UsesSpecificBinary = 1 AND [UsesSpecific" + - "Binary] IS NULL) OR ([UsesSpecificBinary] = @Original_UsesSpecificBinary)) AND (" + - "(@IsNull_Url = 1 AND [Url] IS NULL) OR ([Url] = @Original_Url)) AND ((@IsNull_Im" + - "age = 1 AND [Image] IS NULL) OR ([Image] = @Original_Image)) AND ((@IsNull_Exist" + - "ingDataSource = 1 AND [ExistingDataSource] IS NULL) OR ([ExistingDataSource] = @" + - "Original_ExistingDataSource)) AND ((@IsNull_TemplateId = 1 AND [TemplateId] IS N" + - "ULL) OR ([TemplateId] = @Original_TemplateId)) AND ((@IsNull_ExcelFileName = 1 A" + - "ND [ExcelFileName] IS NULL) OR ([ExcelFileName] = @Original_ExcelFileName)) AND " + - "((@IsNull_SpecificDOTNET = 1 AND [SpecificDOTNET] IS NULL) OR ([SpecificDOTNET] " + - "= @Original_SpecificDOTNET)) AND ((@IsNull_SpecificJS = 1 AND [SpecificJS] IS NU" + - "LL) OR ([SpecificJS] = @Original_SpecificJS)) AND ((@IsNull_SpecificCss = 1 AND " + - "[SpecificCss] IS NULL) OR ([SpecificCss] = @Original_SpecificCss)) AND ((@IsNull" + - "_UseAsTemplate = 1 AND [UseAsTemplate] IS NULL) OR ([UseAsTemplate] = @Original_" + - "UseAsTemplate)) AND ((@IsNull_TemplateFile = 1 AND [TemplateFile] IS NULL) OR ([" + - "TemplateFile] = @Original_TemplateFile)) AND ((@IsNull_SystemSqlConnectionId = 1" + - " AND [SystemSqlConnectionId] IS NULL) OR ([SystemSqlConnectionId] = @Original_Sy" + - "stemSqlConnectionId)) AND ((@IsNull_PrivateAuthentication = 1 AND [PrivateAuthen" + - "tication] IS NULL) OR ([PrivateAuthentication] = @Original_PrivateAuthentication" + - ")) AND ((@IsNull_SecuritySqlConnectionId = 1 AND [SecuritySqlConnectionId] IS NU" + - "LL) OR ([SecuritySqlConnectionId] = @Original_SecuritySqlConnectionId)));\r\nSELEC" + - "T Id, Name, Creator, CreatedDate, ToDelete, ToDeleteDate, Deleted, DeletedDate, " + - "DataSourceTypeId, SqlConnectionId, UsesSpecificBinary, Url, Image, ExistingDataS" + - "ource, TemplateId, ExcelFileName, SpecificDOTNET, SpecificJS, SpecificCss, UseAs" + - "Template, Description, TemplateFile, SystemSqlConnectionId, PrivateAuthenticatio" + - "n, SecuritySqlConnectionId FROM durados_App WHERE (Id = @Id)"; - this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Creator", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Creator", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CreatedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreatedDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ToDelete", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDelete", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ToDeleteDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDeleteDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Deleted", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Deleted", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DeletedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DeletedDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataSourceTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataSourceTypeId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SqlConnectionId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UsesSpecificBinary", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UsesSpecificBinary", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Url", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Url", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ExistingDataSource", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExistingDataSource", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TemplateId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ExcelFileName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExcelFileName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SpecificDOTNET", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificDOTNET", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SpecificJS", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificJS", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SpecificCss", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificCss", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UseAsTemplate", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UseAsTemplate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Description", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Description", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TemplateFile", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateFile", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SystemSqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SystemSqlConnectionId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrivateAuthentication", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrivateAuthentication", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SecuritySqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SecuritySqlConnectionId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Creator", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Creator", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CreatedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreatedDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ToDelete", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDelete", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ToDeleteDate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDeleteDate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ToDeleteDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDeleteDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Deleted", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Deleted", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DeletedDate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DeletedDate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DeletedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DeletedDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DataSourceTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataSourceTypeId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DataSourceTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataSourceTypeId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SqlConnectionId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SqlConnectionId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_UsesSpecificBinary", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UsesSpecificBinary", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UsesSpecificBinary", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UsesSpecificBinary", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Url", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Url", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Url", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Url", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Image", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ExistingDataSource", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExistingDataSource", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ExistingDataSource", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExistingDataSource", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_TemplateId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TemplateId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ExcelFileName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExcelFileName", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ExcelFileName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExcelFileName", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SpecificDOTNET", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificDOTNET", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SpecificDOTNET", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificDOTNET", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SpecificJS", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificJS", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SpecificJS", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificJS", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SpecificCss", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificCss", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SpecificCss", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificCss", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_UseAsTemplate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UseAsTemplate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UseAsTemplate", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UseAsTemplate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_TemplateFile", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateFile", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TemplateFile", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateFile", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SystemSqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SystemSqlConnectionId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SystemSqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SystemSqlConnectionId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_PrivateAuthentication", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrivateAuthentication", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PrivateAuthentication", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrivateAuthentication", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SecuritySqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SecuritySqlConnectionId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SecuritySqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SecuritySqlConnectionId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private void InitConnection() { - this._connection = new global::System.Data.SqlClient.SqlConnection(); - this._connection.ConnectionString = global::Durados.Web.Mvc.Properties.Settings.Default.duradosConnectionString; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; - this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); - this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = @"SELECT Id, Name, Creator, CreatedDate, ToDelete, ToDeleteDate, Deleted, DeletedDate, DataSourceTypeId, SqlConnectionId, UsesSpecificBinary, Url, Image, ExistingDataSource, TemplateId, ExcelFileName, SpecificDOTNET, SpecificJS, SpecificCss, UseAsTemplate, Description, TemplateFile, SystemSqlConnectionId, PrivateAuthentication, SecuritySqlConnectionId FROM durados_App"; - this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] - public virtual int Fill(MapDataSet.durados_AppDataTable dataTable) { - this.Adapter.SelectCommand = this.CommandCollection[0]; - if ((this.ClearBeforeFill == true)) { - dataTable.Clear(); - } - int returnValue = this.Adapter.Fill(dataTable); - return returnValue; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] - public virtual MapDataSet.durados_AppDataTable GetData() { - this.Adapter.SelectCommand = this.CommandCollection[0]; - MapDataSet.durados_AppDataTable dataTable = new MapDataSet.durados_AppDataTable(); - this.Adapter.Fill(dataTable); - return dataTable; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(MapDataSet.durados_AppDataTable dataTable) { - return this.Adapter.Update(dataTable); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(MapDataSet dataSet) { - return this.Adapter.Update(dataSet, "durados_App"); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(global::System.Data.DataRow dataRow) { - return this.Adapter.Update(new global::System.Data.DataRow[] { - dataRow}); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(global::System.Data.DataRow[] dataRows) { - return this.Adapter.Update(dataRows); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete( - int Original_Id, - string Original_Name, - int Original_Creator, - System.DateTime Original_CreatedDate, - bool Original_ToDelete, - global::System.Nullable Original_ToDeleteDate, - bool Original_Deleted, - global::System.Nullable Original_DeletedDate, - global::System.Nullable Original_DataSourceTypeId, - global::System.Nullable Original_SqlConnectionId, - global::System.Nullable Original_UsesSpecificBinary, - string Original_Url, - string Original_Image, - global::System.Nullable Original_ExistingDataSource, - global::System.Nullable Original_TemplateId, - string Original_ExcelFileName, - string Original_SpecificDOTNET, - string Original_SpecificJS, - string Original_SpecificCss, - global::System.Nullable Original_UseAsTemplate, - string Original_TemplateFile, - global::System.Nullable Original_SystemSqlConnectionId, - global::System.Nullable Original_PrivateAuthentication, - global::System.Nullable Original_SecuritySqlConnectionId) { - this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Id)); - if ((Original_Name == null)) { - throw new global::System.ArgumentNullException("Original_Name"); - } - else { - this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name)); - } - this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_Creator)); - this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_CreatedDate)); - this.Adapter.DeleteCommand.Parameters[4].Value = ((bool)(Original_ToDelete)); - if ((Original_ToDeleteDate.HasValue == true)) { - this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[6].Value = ((System.DateTime)(Original_ToDeleteDate.Value)); - } - else { - this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; - } - this.Adapter.DeleteCommand.Parameters[7].Value = ((bool)(Original_Deleted)); - if ((Original_DeletedDate.HasValue == true)) { - this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[9].Value = ((System.DateTime)(Original_DeletedDate.Value)); - } - else { - this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[9].Value = global::System.DBNull.Value; - } - if ((Original_DataSourceTypeId.HasValue == true)) { - this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[11].Value = ((int)(Original_DataSourceTypeId.Value)); - } - else { - this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[11].Value = global::System.DBNull.Value; - } - if ((Original_SqlConnectionId.HasValue == true)) { - this.Adapter.DeleteCommand.Parameters[12].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[13].Value = ((int)(Original_SqlConnectionId.Value)); - } - else { - this.Adapter.DeleteCommand.Parameters[12].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[13].Value = global::System.DBNull.Value; - } - if ((Original_UsesSpecificBinary.HasValue == true)) { - this.Adapter.DeleteCommand.Parameters[14].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[15].Value = ((bool)(Original_UsesSpecificBinary.Value)); - } - else { - this.Adapter.DeleteCommand.Parameters[14].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[15].Value = global::System.DBNull.Value; - } - if ((Original_Url == null)) { - this.Adapter.DeleteCommand.Parameters[16].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[17].Value = global::System.DBNull.Value; - } - else { - this.Adapter.DeleteCommand.Parameters[16].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[17].Value = ((string)(Original_Url)); - } - if ((Original_Image == null)) { - this.Adapter.DeleteCommand.Parameters[18].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[19].Value = global::System.DBNull.Value; - } - else { - this.Adapter.DeleteCommand.Parameters[18].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[19].Value = ((string)(Original_Image)); - } - if ((Original_ExistingDataSource.HasValue == true)) { - this.Adapter.DeleteCommand.Parameters[20].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[21].Value = ((bool)(Original_ExistingDataSource.Value)); - } - else { - this.Adapter.DeleteCommand.Parameters[20].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[21].Value = global::System.DBNull.Value; - } - if ((Original_TemplateId.HasValue == true)) { - this.Adapter.DeleteCommand.Parameters[22].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[23].Value = ((int)(Original_TemplateId.Value)); - } - else { - this.Adapter.DeleteCommand.Parameters[22].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[23].Value = global::System.DBNull.Value; - } - if ((Original_ExcelFileName == null)) { - this.Adapter.DeleteCommand.Parameters[24].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[25].Value = global::System.DBNull.Value; - } - else { - this.Adapter.DeleteCommand.Parameters[24].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[25].Value = ((string)(Original_ExcelFileName)); - } - if ((Original_SpecificDOTNET == null)) { - this.Adapter.DeleteCommand.Parameters[26].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[27].Value = global::System.DBNull.Value; - } - else { - this.Adapter.DeleteCommand.Parameters[26].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[27].Value = ((string)(Original_SpecificDOTNET)); - } - if ((Original_SpecificJS == null)) { - this.Adapter.DeleteCommand.Parameters[28].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[29].Value = global::System.DBNull.Value; - } - else { - this.Adapter.DeleteCommand.Parameters[28].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[29].Value = ((string)(Original_SpecificJS)); - } - if ((Original_SpecificCss == null)) { - this.Adapter.DeleteCommand.Parameters[30].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[31].Value = global::System.DBNull.Value; - } - else { - this.Adapter.DeleteCommand.Parameters[30].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[31].Value = ((string)(Original_SpecificCss)); - } - if ((Original_UseAsTemplate.HasValue == true)) { - this.Adapter.DeleteCommand.Parameters[32].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[33].Value = ((bool)(Original_UseAsTemplate.Value)); - } - else { - this.Adapter.DeleteCommand.Parameters[32].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[33].Value = global::System.DBNull.Value; - } - if ((Original_TemplateFile == null)) { - this.Adapter.DeleteCommand.Parameters[34].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[35].Value = global::System.DBNull.Value; - } - else { - this.Adapter.DeleteCommand.Parameters[34].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[35].Value = ((string)(Original_TemplateFile)); - } - if ((Original_SystemSqlConnectionId.HasValue == true)) { - this.Adapter.DeleteCommand.Parameters[36].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[37].Value = ((int)(Original_SystemSqlConnectionId.Value)); - } - else { - this.Adapter.DeleteCommand.Parameters[36].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[37].Value = global::System.DBNull.Value; - } - if ((Original_PrivateAuthentication.HasValue == true)) { - this.Adapter.DeleteCommand.Parameters[38].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[39].Value = ((bool)(Original_PrivateAuthentication.Value)); - } - else { - this.Adapter.DeleteCommand.Parameters[38].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[39].Value = global::System.DBNull.Value; - } - if ((Original_SecuritySqlConnectionId.HasValue == true)) { - this.Adapter.DeleteCommand.Parameters[40].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[41].Value = ((int)(Original_SecuritySqlConnectionId.Value)); - } - else { - this.Adapter.DeleteCommand.Parameters[40].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[41].Value = global::System.DBNull.Value; - } - global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; - if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.DeleteCommand.Connection.Open(); - } - try { - int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); - return returnValue; - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.DeleteCommand.Connection.Close(); - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert( - string Name, - int Creator, - System.DateTime CreatedDate, - bool ToDelete, - global::System.Nullable ToDeleteDate, - bool Deleted, - global::System.Nullable DeletedDate, - global::System.Nullable DataSourceTypeId, - global::System.Nullable SqlConnectionId, - global::System.Nullable UsesSpecificBinary, - string Url, - string Image, - global::System.Nullable ExistingDataSource, - global::System.Nullable TemplateId, - string ExcelFileName, - string SpecificDOTNET, - string SpecificJS, - string SpecificCss, - global::System.Nullable UseAsTemplate, - string Description, - string TemplateFile, - global::System.Nullable SystemSqlConnectionId, - global::System.Nullable PrivateAuthentication, - global::System.Nullable SecuritySqlConnectionId) { - if ((Name == null)) { - throw new global::System.ArgumentNullException("Name"); - } - else { - this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name)); - } - this.Adapter.InsertCommand.Parameters[1].Value = ((int)(Creator)); - this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(CreatedDate)); - this.Adapter.InsertCommand.Parameters[3].Value = ((bool)(ToDelete)); - if ((ToDeleteDate.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(ToDeleteDate.Value)); - } - else { - this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; - } - this.Adapter.InsertCommand.Parameters[5].Value = ((bool)(Deleted)); - if ((DeletedDate.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[6].Value = ((System.DateTime)(DeletedDate.Value)); - } - else { - this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value; - } - if ((DataSourceTypeId.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[7].Value = ((int)(DataSourceTypeId.Value)); - } - else { - this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value; - } - if ((SqlConnectionId.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[8].Value = ((int)(SqlConnectionId.Value)); - } - else { - this.Adapter.InsertCommand.Parameters[8].Value = global::System.DBNull.Value; - } - if ((UsesSpecificBinary.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[9].Value = ((bool)(UsesSpecificBinary.Value)); - } - else { - this.Adapter.InsertCommand.Parameters[9].Value = global::System.DBNull.Value; - } - if ((Url == null)) { - this.Adapter.InsertCommand.Parameters[10].Value = global::System.DBNull.Value; - } - else { - this.Adapter.InsertCommand.Parameters[10].Value = ((string)(Url)); - } - if ((Image == null)) { - this.Adapter.InsertCommand.Parameters[11].Value = global::System.DBNull.Value; - } - else { - this.Adapter.InsertCommand.Parameters[11].Value = ((string)(Image)); - } - if ((ExistingDataSource.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[12].Value = ((bool)(ExistingDataSource.Value)); - } - else { - this.Adapter.InsertCommand.Parameters[12].Value = global::System.DBNull.Value; - } - if ((TemplateId.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[13].Value = ((int)(TemplateId.Value)); - } - else { - this.Adapter.InsertCommand.Parameters[13].Value = global::System.DBNull.Value; - } - if ((ExcelFileName == null)) { - this.Adapter.InsertCommand.Parameters[14].Value = global::System.DBNull.Value; - } - else { - this.Adapter.InsertCommand.Parameters[14].Value = ((string)(ExcelFileName)); - } - if ((SpecificDOTNET == null)) { - this.Adapter.InsertCommand.Parameters[15].Value = global::System.DBNull.Value; - } - else { - this.Adapter.InsertCommand.Parameters[15].Value = ((string)(SpecificDOTNET)); - } - if ((SpecificJS == null)) { - this.Adapter.InsertCommand.Parameters[16].Value = global::System.DBNull.Value; - } - else { - this.Adapter.InsertCommand.Parameters[16].Value = ((string)(SpecificJS)); - } - if ((SpecificCss == null)) { - this.Adapter.InsertCommand.Parameters[17].Value = global::System.DBNull.Value; - } - else { - this.Adapter.InsertCommand.Parameters[17].Value = ((string)(SpecificCss)); - } - if ((UseAsTemplate.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[18].Value = ((bool)(UseAsTemplate.Value)); - } - else { - this.Adapter.InsertCommand.Parameters[18].Value = global::System.DBNull.Value; - } - if ((Description == null)) { - this.Adapter.InsertCommand.Parameters[19].Value = global::System.DBNull.Value; - } - else { - this.Adapter.InsertCommand.Parameters[19].Value = ((string)(Description)); - } - if ((TemplateFile == null)) { - this.Adapter.InsertCommand.Parameters[20].Value = global::System.DBNull.Value; - } - else { - this.Adapter.InsertCommand.Parameters[20].Value = ((string)(TemplateFile)); - } - if ((SystemSqlConnectionId.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[21].Value = ((int)(SystemSqlConnectionId.Value)); - } - else { - this.Adapter.InsertCommand.Parameters[21].Value = global::System.DBNull.Value; - } - if ((PrivateAuthentication.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[22].Value = ((bool)(PrivateAuthentication.Value)); - } - else { - this.Adapter.InsertCommand.Parameters[22].Value = global::System.DBNull.Value; - } - if ((SecuritySqlConnectionId.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[23].Value = ((int)(SecuritySqlConnectionId.Value)); - } - else { - this.Adapter.InsertCommand.Parameters[23].Value = global::System.DBNull.Value; - } - global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; - if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.InsertCommand.Connection.Open(); - } - try { - int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); - return returnValue; - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.InsertCommand.Connection.Close(); - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update( - string Name, - int Creator, - System.DateTime CreatedDate, - bool ToDelete, - global::System.Nullable ToDeleteDate, - bool Deleted, - global::System.Nullable DeletedDate, - global::System.Nullable DataSourceTypeId, - global::System.Nullable SqlConnectionId, - global::System.Nullable UsesSpecificBinary, - string Url, - string Image, - global::System.Nullable ExistingDataSource, - global::System.Nullable TemplateId, - string ExcelFileName, - string SpecificDOTNET, - string SpecificJS, - string SpecificCss, - global::System.Nullable UseAsTemplate, - string Description, - string TemplateFile, - global::System.Nullable SystemSqlConnectionId, - global::System.Nullable PrivateAuthentication, - global::System.Nullable SecuritySqlConnectionId, - int Original_Id, - string Original_Name, - int Original_Creator, - System.DateTime Original_CreatedDate, - bool Original_ToDelete, - global::System.Nullable Original_ToDeleteDate, - bool Original_Deleted, - global::System.Nullable Original_DeletedDate, - global::System.Nullable Original_DataSourceTypeId, - global::System.Nullable Original_SqlConnectionId, - global::System.Nullable Original_UsesSpecificBinary, - string Original_Url, - string Original_Image, - global::System.Nullable Original_ExistingDataSource, - global::System.Nullable Original_TemplateId, - string Original_ExcelFileName, - string Original_SpecificDOTNET, - string Original_SpecificJS, - string Original_SpecificCss, - global::System.Nullable Original_UseAsTemplate, - string Original_TemplateFile, - global::System.Nullable Original_SystemSqlConnectionId, - global::System.Nullable Original_PrivateAuthentication, - global::System.Nullable Original_SecuritySqlConnectionId, - int Id) { - if ((Name == null)) { - throw new global::System.ArgumentNullException("Name"); - } - else { - this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name)); - } - this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Creator)); - this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(CreatedDate)); - this.Adapter.UpdateCommand.Parameters[3].Value = ((bool)(ToDelete)); - if ((ToDeleteDate.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(ToDeleteDate.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; - } - this.Adapter.UpdateCommand.Parameters[5].Value = ((bool)(Deleted)); - if ((DeletedDate.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(DeletedDate.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; - } - if ((DataSourceTypeId.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(DataSourceTypeId.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; - } - if ((SqlConnectionId.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(SqlConnectionId.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value; - } - if ((UsesSpecificBinary.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[9].Value = ((bool)(UsesSpecificBinary.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value; - } - if ((Url == null)) { - this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Url)); - } - if ((Image == null)) { - this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Image)); - } - if ((ExistingDataSource.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[12].Value = ((bool)(ExistingDataSource.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value; - } - if ((TemplateId.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(TemplateId.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[13].Value = global::System.DBNull.Value; - } - if ((ExcelFileName == null)) { - this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(ExcelFileName)); - } - if ((SpecificDOTNET == null)) { - this.Adapter.UpdateCommand.Parameters[15].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(SpecificDOTNET)); - } - if ((SpecificJS == null)) { - this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(SpecificJS)); - } - if ((SpecificCss == null)) { - this.Adapter.UpdateCommand.Parameters[17].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(SpecificCss)); - } - if ((UseAsTemplate.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[18].Value = ((bool)(UseAsTemplate.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value; - } - if ((Description == null)) { - this.Adapter.UpdateCommand.Parameters[19].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[19].Value = ((string)(Description)); - } - if ((TemplateFile == null)) { - this.Adapter.UpdateCommand.Parameters[20].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[20].Value = ((string)(TemplateFile)); - } - if ((SystemSqlConnectionId.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[21].Value = ((int)(SystemSqlConnectionId.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[21].Value = global::System.DBNull.Value; - } - if ((PrivateAuthentication.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[22].Value = ((bool)(PrivateAuthentication.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[22].Value = global::System.DBNull.Value; - } - if ((SecuritySqlConnectionId.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[23].Value = ((int)(SecuritySqlConnectionId.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[23].Value = global::System.DBNull.Value; - } - this.Adapter.UpdateCommand.Parameters[24].Value = ((int)(Original_Id)); - if ((Original_Name == null)) { - throw new global::System.ArgumentNullException("Original_Name"); - } - else { - this.Adapter.UpdateCommand.Parameters[25].Value = ((string)(Original_Name)); - } - this.Adapter.UpdateCommand.Parameters[26].Value = ((int)(Original_Creator)); - this.Adapter.UpdateCommand.Parameters[27].Value = ((System.DateTime)(Original_CreatedDate)); - this.Adapter.UpdateCommand.Parameters[28].Value = ((bool)(Original_ToDelete)); - if ((Original_ToDeleteDate.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[29].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[30].Value = ((System.DateTime)(Original_ToDeleteDate.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[29].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[30].Value = global::System.DBNull.Value; - } - this.Adapter.UpdateCommand.Parameters[31].Value = ((bool)(Original_Deleted)); - if ((Original_DeletedDate.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[32].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[33].Value = ((System.DateTime)(Original_DeletedDate.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[32].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[33].Value = global::System.DBNull.Value; - } - if ((Original_DataSourceTypeId.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[34].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[35].Value = ((int)(Original_DataSourceTypeId.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[34].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[35].Value = global::System.DBNull.Value; - } - if ((Original_SqlConnectionId.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[36].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[37].Value = ((int)(Original_SqlConnectionId.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[36].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[37].Value = global::System.DBNull.Value; - } - if ((Original_UsesSpecificBinary.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[38].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[39].Value = ((bool)(Original_UsesSpecificBinary.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[38].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[39].Value = global::System.DBNull.Value; - } - if ((Original_Url == null)) { - this.Adapter.UpdateCommand.Parameters[40].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[41].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[40].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[41].Value = ((string)(Original_Url)); - } - if ((Original_Image == null)) { - this.Adapter.UpdateCommand.Parameters[42].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[43].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[42].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[43].Value = ((string)(Original_Image)); - } - if ((Original_ExistingDataSource.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[44].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[45].Value = ((bool)(Original_ExistingDataSource.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[44].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[45].Value = global::System.DBNull.Value; - } - if ((Original_TemplateId.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[46].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[47].Value = ((int)(Original_TemplateId.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[46].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[47].Value = global::System.DBNull.Value; - } - if ((Original_ExcelFileName == null)) { - this.Adapter.UpdateCommand.Parameters[48].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[49].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[48].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[49].Value = ((string)(Original_ExcelFileName)); - } - if ((Original_SpecificDOTNET == null)) { - this.Adapter.UpdateCommand.Parameters[50].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[51].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[50].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[51].Value = ((string)(Original_SpecificDOTNET)); - } - if ((Original_SpecificJS == null)) { - this.Adapter.UpdateCommand.Parameters[52].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[53].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[52].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[53].Value = ((string)(Original_SpecificJS)); - } - if ((Original_SpecificCss == null)) { - this.Adapter.UpdateCommand.Parameters[54].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[55].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[54].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[55].Value = ((string)(Original_SpecificCss)); - } - if ((Original_UseAsTemplate.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[56].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[57].Value = ((bool)(Original_UseAsTemplate.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[56].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[57].Value = global::System.DBNull.Value; - } - if ((Original_TemplateFile == null)) { - this.Adapter.UpdateCommand.Parameters[58].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[59].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[58].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[59].Value = ((string)(Original_TemplateFile)); - } - if ((Original_SystemSqlConnectionId.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[60].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[61].Value = ((int)(Original_SystemSqlConnectionId.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[60].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[61].Value = global::System.DBNull.Value; - } - if ((Original_PrivateAuthentication.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[62].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[63].Value = ((bool)(Original_PrivateAuthentication.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[62].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[63].Value = global::System.DBNull.Value; - } - if ((Original_SecuritySqlConnectionId.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[64].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[65].Value = ((int)(Original_SecuritySqlConnectionId.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[64].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[65].Value = global::System.DBNull.Value; - } - this.Adapter.UpdateCommand.Parameters[66].Value = ((int)(Id)); - global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; - if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.UpdateCommand.Connection.Open(); - } - try { - int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); - return returnValue; - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.UpdateCommand.Connection.Close(); - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update( - string Name, - int Creator, - System.DateTime CreatedDate, - bool ToDelete, - global::System.Nullable ToDeleteDate, - bool Deleted, - global::System.Nullable DeletedDate, - global::System.Nullable DataSourceTypeId, - global::System.Nullable SqlConnectionId, - global::System.Nullable UsesSpecificBinary, - string Url, - string Image, - global::System.Nullable ExistingDataSource, - global::System.Nullable TemplateId, - string ExcelFileName, - string SpecificDOTNET, - string SpecificJS, - string SpecificCss, - global::System.Nullable UseAsTemplate, - string Description, - string TemplateFile, - global::System.Nullable SystemSqlConnectionId, - global::System.Nullable PrivateAuthentication, - global::System.Nullable SecuritySqlConnectionId, - int Original_Id, - string Original_Name, - int Original_Creator, - System.DateTime Original_CreatedDate, - bool Original_ToDelete, - global::System.Nullable Original_ToDeleteDate, - bool Original_Deleted, - global::System.Nullable Original_DeletedDate, - global::System.Nullable Original_DataSourceTypeId, - global::System.Nullable Original_SqlConnectionId, - global::System.Nullable Original_UsesSpecificBinary, - string Original_Url, - string Original_Image, - global::System.Nullable Original_ExistingDataSource, - global::System.Nullable Original_TemplateId, - string Original_ExcelFileName, - string Original_SpecificDOTNET, - string Original_SpecificJS, - string Original_SpecificCss, - global::System.Nullable Original_UseAsTemplate, - string Original_TemplateFile, - global::System.Nullable Original_SystemSqlConnectionId, - global::System.Nullable Original_PrivateAuthentication, - global::System.Nullable Original_SecuritySqlConnectionId) { - return this.Update(Name, Creator, CreatedDate, ToDelete, ToDeleteDate, Deleted, DeletedDate, DataSourceTypeId, SqlConnectionId, UsesSpecificBinary, Url, Image, ExistingDataSource, TemplateId, ExcelFileName, SpecificDOTNET, SpecificJS, SpecificCss, UseAsTemplate, Description, TemplateFile, SystemSqlConnectionId, PrivateAuthentication, SecuritySqlConnectionId, Original_Id, Original_Name, Original_Creator, Original_CreatedDate, Original_ToDelete, Original_ToDeleteDate, Original_Deleted, Original_DeletedDate, Original_DataSourceTypeId, Original_SqlConnectionId, Original_UsesSpecificBinary, Original_Url, Original_Image, Original_ExistingDataSource, Original_TemplateId, Original_ExcelFileName, Original_SpecificDOTNET, Original_SpecificJS, Original_SpecificCss, Original_UseAsTemplate, Original_TemplateFile, Original_SystemSqlConnectionId, Original_PrivateAuthentication, Original_SecuritySqlConnectionId, Original_Id); - } - } - - /// - ///Represents the connection and commands used to retrieve and save data. - /// - [global::System.ComponentModel.DesignerCategoryAttribute("code")] - [global::System.ComponentModel.ToolboxItem(true)] - [global::System.ComponentModel.DataObjectAttribute(true)] - [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + - ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public partial class durados_SqlConnectionTableAdapter : global::System.ComponentModel.Component { - - private global::System.Data.SqlClient.SqlDataAdapter _adapter; - - private global::System.Data.SqlClient.SqlConnection _connection; - - private global::System.Data.SqlClient.SqlTransaction _transaction; - - private global::System.Data.SqlClient.SqlCommand[] _commandCollection; - - private bool _clearBeforeFill; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_SqlConnectionTableAdapter() { - this.ClearBeforeFill = true; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { - get { - if ((this._adapter == null)) { - this.InitAdapter(); - } - return this._adapter; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal global::System.Data.SqlClient.SqlConnection Connection { - get { - if ((this._connection == null)) { - this.InitConnection(); - } - return this._connection; - } - set { - this._connection = value; - if ((this.Adapter.InsertCommand != null)) { - this.Adapter.InsertCommand.Connection = value; - } - if ((this.Adapter.DeleteCommand != null)) { - this.Adapter.DeleteCommand.Connection = value; - } - if ((this.Adapter.UpdateCommand != null)) { - this.Adapter.UpdateCommand.Connection = value; - } - for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { - if ((this.CommandCollection[i] != null)) { - ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; - } - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal global::System.Data.SqlClient.SqlTransaction Transaction { - get { - return this._transaction; - } - set { - this._transaction = value; - for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { - this.CommandCollection[i].Transaction = this._transaction; - } - if (((this.Adapter != null) - && (this.Adapter.DeleteCommand != null))) { - this.Adapter.DeleteCommand.Transaction = this._transaction; - } - if (((this.Adapter != null) - && (this.Adapter.InsertCommand != null))) { - this.Adapter.InsertCommand.Transaction = this._transaction; - } - if (((this.Adapter != null) - && (this.Adapter.UpdateCommand != null))) { - this.Adapter.UpdateCommand.Transaction = this._transaction; - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { - get { - if ((this._commandCollection == null)) { - this.InitCommandCollection(); - } - return this._commandCollection; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool ClearBeforeFill { - get { - return this._clearBeforeFill; - } - set { - this._clearBeforeFill = value; + set { + this._clearBeforeFill = value; } } @@ -10912,67 +8263,248 @@ private void InitAdapter() { this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; - tableMapping.DataSetTable = "durados_SqlConnection"; + tableMapping.DataSetTable = "durados_App"; tableMapping.ColumnMappings.Add("Id", "Id"); - tableMapping.ColumnMappings.Add("ServerName", "ServerName"); - tableMapping.ColumnMappings.Add("Catalog", "Catalog"); - tableMapping.ColumnMappings.Add("Username", "Username"); - tableMapping.ColumnMappings.Add("Password", "Password"); - tableMapping.ColumnMappings.Add("IntegratedSecurity", "IntegratedSecurity"); - tableMapping.ColumnMappings.Add("DuradosUser", "DuradosUser"); + tableMapping.ColumnMappings.Add("Name", "Name"); + tableMapping.ColumnMappings.Add("Creator", "Creator"); + tableMapping.ColumnMappings.Add("CreatedDate", "CreatedDate"); + tableMapping.ColumnMappings.Add("ToDelete", "ToDelete"); + tableMapping.ColumnMappings.Add("ToDeleteDate", "ToDeleteDate"); + tableMapping.ColumnMappings.Add("Deleted", "Deleted"); + tableMapping.ColumnMappings.Add("DeletedDate", "DeletedDate"); + tableMapping.ColumnMappings.Add("DataSourceTypeId", "DataSourceTypeId"); + tableMapping.ColumnMappings.Add("SqlConnectionId", "SqlConnectionId"); + tableMapping.ColumnMappings.Add("UsesSpecificBinary", "UsesSpecificBinary"); + tableMapping.ColumnMappings.Add("Url", "Url"); + tableMapping.ColumnMappings.Add("Image", "Image"); + tableMapping.ColumnMappings.Add("ExistingDataSource", "ExistingDataSource"); + tableMapping.ColumnMappings.Add("TemplateId", "TemplateId"); + tableMapping.ColumnMappings.Add("ExcelFileName", "ExcelFileName"); + tableMapping.ColumnMappings.Add("SpecificDOTNET", "SpecificDOTNET"); + tableMapping.ColumnMappings.Add("SpecificJS", "SpecificJS"); + tableMapping.ColumnMappings.Add("SpecificCss", "SpecificCss"); + tableMapping.ColumnMappings.Add("UseAsTemplate", "UseAsTemplate"); + tableMapping.ColumnMappings.Add("Description", "Description"); + tableMapping.ColumnMappings.Add("TemplateFile", "TemplateFile"); + tableMapping.ColumnMappings.Add("SystemSqlConnectionId", "SystemSqlConnectionId"); + tableMapping.ColumnMappings.Add("PrivateAuthentication", "PrivateAuthentication"); + tableMapping.ColumnMappings.Add("SecuritySqlConnectionId", "SecuritySqlConnectionId"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; - this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[durados_SqlConnection] WHERE (([Id] = @Original_Id) AND ((@IsNull_ServerName = 1 AND [ServerName] IS NULL) OR ([ServerName] = @Original_ServerName)) AND ((@IsNull_Catalog = 1 AND [Catalog] IS NULL) OR ([Catalog] = @Original_Catalog)) AND ((@IsNull_Username = 1 AND [Username] IS NULL) OR ([Username] = @Original_Username)) AND ((@IsNull_Password = 1 AND [Password] IS NULL) OR ([Password] = @Original_Password)) AND ((@IsNull_IntegratedSecurity = 1 AND [IntegratedSecurity] IS NULL) OR ([IntegratedSecurity] = @Original_IntegratedSecurity)) AND ((@IsNull_DuradosUser = 1 AND [DuradosUser] IS NULL) OR ([DuradosUser] = @Original_DuradosUser)))"; + this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[durados_App] WHERE (([Id] = @Original_Id) AND ([Name] = @Origi" + + "nal_Name) AND ([Creator] = @Original_Creator) AND ([CreatedDate] = @Original_Cre" + + "atedDate) AND ([ToDelete] = @Original_ToDelete) AND ((@IsNull_ToDeleteDate = 1 A" + + "ND [ToDeleteDate] IS NULL) OR ([ToDeleteDate] = @Original_ToDeleteDate)) AND ([D" + + "eleted] = @Original_Deleted) AND ((@IsNull_DeletedDate = 1 AND [DeletedDate] IS " + + "NULL) OR ([DeletedDate] = @Original_DeletedDate)) AND ((@IsNull_DataSourceTypeId" + + " = 1 AND [DataSourceTypeId] IS NULL) OR ([DataSourceTypeId] = @Original_DataSour" + + "ceTypeId)) AND ((@IsNull_SqlConnectionId = 1 AND [SqlConnectionId] IS NULL) OR (" + + "[SqlConnectionId] = @Original_SqlConnectionId)) AND ((@IsNull_UsesSpecificBinary" + + " = 1 AND [UsesSpecificBinary] IS NULL) OR ([UsesSpecificBinary] = @Original_Uses" + + "SpecificBinary)) AND ((@IsNull_Url = 1 AND [Url] IS NULL) OR ([Url] = @Original_" + + "Url)) AND ((@IsNull_Image = 1 AND [Image] IS NULL) OR ([Image] = @Original_Image" + + ")) AND ((@IsNull_ExistingDataSource = 1 AND [ExistingDataSource] IS NULL) OR ([E" + + "xistingDataSource] = @Original_ExistingDataSource)) AND ((@IsNull_TemplateId = 1" + + " AND [TemplateId] IS NULL) OR ([TemplateId] = @Original_TemplateId)) AND ((@IsNu" + + "ll_ExcelFileName = 1 AND [ExcelFileName] IS NULL) OR ([ExcelFileName] = @Origina" + + "l_ExcelFileName)) AND ((@IsNull_SpecificDOTNET = 1 AND [SpecificDOTNET] IS NULL)" + + " OR ([SpecificDOTNET] = @Original_SpecificDOTNET)) AND ((@IsNull_SpecificJS = 1 " + + "AND [SpecificJS] IS NULL) OR ([SpecificJS] = @Original_SpecificJS)) AND ((@IsNul" + + "l_SpecificCss = 1 AND [SpecificCss] IS NULL) OR ([SpecificCss] = @Original_Speci" + + "ficCss)) AND ((@IsNull_UseAsTemplate = 1 AND [UseAsTemplate] IS NULL) OR ([UseAs" + + "Template] = @Original_UseAsTemplate)) AND ((@IsNull_TemplateFile = 1 AND [Templa" + + "teFile] IS NULL) OR ([TemplateFile] = @Original_TemplateFile)) AND ((@IsNull_Sys" + + "temSqlConnectionId = 1 AND [SystemSqlConnectionId] IS NULL) OR ([SystemSqlConnec" + + "tionId] = @Original_SystemSqlConnectionId)) AND ((@IsNull_PrivateAuthentication " + + "= 1 AND [PrivateAuthentication] IS NULL) OR ([PrivateAuthentication] = @Original" + + "_PrivateAuthentication)) AND ((@IsNull_SecuritySqlConnectionId = 1 AND [Security" + + "SqlConnectionId] IS NULL) OR ([SecuritySqlConnectionId] = @Original_SecuritySqlC" + + "onnectionId)))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ServerName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ServerName", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ServerName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ServerName", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Catalog", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Catalog", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Catalog", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Catalog", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Username", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Username", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Username", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Username", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Password", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Password", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Password", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Password", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_IntegratedSecurity", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IntegratedSecurity", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IntegratedSecurity", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IntegratedSecurity", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DuradosUser", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DuradosUser", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DuradosUser", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DuradosUser", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Creator", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Creator", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CreatedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreatedDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ToDelete", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDelete", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ToDeleteDate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDeleteDate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ToDeleteDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDeleteDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Deleted", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Deleted", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DeletedDate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DeletedDate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DeletedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DeletedDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DataSourceTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataSourceTypeId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DataSourceTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataSourceTypeId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SqlConnectionId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SqlConnectionId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_UsesSpecificBinary", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UsesSpecificBinary", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UsesSpecificBinary", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UsesSpecificBinary", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Url", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Url", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Url", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Url", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Image", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ExistingDataSource", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExistingDataSource", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ExistingDataSource", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExistingDataSource", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_TemplateId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TemplateId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ExcelFileName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExcelFileName", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ExcelFileName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExcelFileName", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SpecificDOTNET", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificDOTNET", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SpecificDOTNET", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificDOTNET", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SpecificJS", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificJS", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SpecificJS", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificJS", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SpecificCss", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificCss", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SpecificCss", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificCss", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_UseAsTemplate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UseAsTemplate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UseAsTemplate", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UseAsTemplate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_TemplateFile", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateFile", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TemplateFile", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateFile", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SystemSqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SystemSqlConnectionId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SystemSqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SystemSqlConnectionId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_PrivateAuthentication", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrivateAuthentication", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PrivateAuthentication", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrivateAuthentication", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SecuritySqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SecuritySqlConnectionId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SecuritySqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SecuritySqlConnectionId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[durados_SqlConnection] ([ServerName], [Catalog], [Username], [Password], [IntegratedSecurity], [DuradosUser]) VALUES (@ServerName, @Catalog, @Username, @Password, @IntegratedSecurity, @DuradosUser); -SELECT Id, ServerName, Catalog, Username, Password, IntegratedSecurity, DuradosUser FROM durados_SqlConnection WHERE (Id = SCOPE_IDENTITY())"; + this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[durados_App] ([Name], [Creator], [CreatedDate], [ToDelete], [ToDeleteDate], [Deleted], [DeletedDate], [DataSourceTypeId], [SqlConnectionId], [UsesSpecificBinary], [Url], [Image], [ExistingDataSource], [TemplateId], [ExcelFileName], [SpecificDOTNET], [SpecificJS], [SpecificCss], [UseAsTemplate], [Description], [TemplateFile], [SystemSqlConnectionId], [PrivateAuthentication], [SecuritySqlConnectionId]) VALUES (@Name, @Creator, @CreatedDate, @ToDelete, @ToDeleteDate, @Deleted, @DeletedDate, @DataSourceTypeId, @SqlConnectionId, @UsesSpecificBinary, @Url, @Image, @ExistingDataSource, @TemplateId, @ExcelFileName, @SpecificDOTNET, @SpecificJS, @SpecificCss, @UseAsTemplate, @Description, @TemplateFile, @SystemSqlConnectionId, @PrivateAuthentication, @SecuritySqlConnectionId); +SELECT Id, Name, Creator, CreatedDate, ToDelete, ToDeleteDate, Deleted, DeletedDate, DataSourceTypeId, SqlConnectionId, UsesSpecificBinary, Url, Image, ExistingDataSource, TemplateId, ExcelFileName, SpecificDOTNET, SpecificJS, SpecificCss, UseAsTemplate, Description, TemplateFile, SystemSqlConnectionId, PrivateAuthentication, SecuritySqlConnectionId FROM durados_App WHERE (Id = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ServerName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ServerName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Catalog", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Catalog", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Username", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Username", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Password", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Password", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IntegratedSecurity", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IntegratedSecurity", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DuradosUser", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DuradosUser", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Creator", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Creator", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CreatedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreatedDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ToDelete", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDelete", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ToDeleteDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDeleteDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Deleted", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Deleted", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DeletedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DeletedDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataSourceTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataSourceTypeId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SqlConnectionId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UsesSpecificBinary", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UsesSpecificBinary", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Url", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Url", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ExistingDataSource", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExistingDataSource", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TemplateId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ExcelFileName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExcelFileName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SpecificDOTNET", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificDOTNET", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SpecificJS", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificJS", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SpecificCss", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificCss", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UseAsTemplate", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UseAsTemplate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Description", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Description", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TemplateFile", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateFile", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SystemSqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SystemSqlConnectionId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrivateAuthentication", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrivateAuthentication", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SecuritySqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SecuritySqlConnectionId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[durados_SqlConnection] SET [ServerName] = @ServerName, [Catalog] = @Catalog, [Username] = @Username, [Password] = @Password, [IntegratedSecurity] = @IntegratedSecurity, [DuradosUser] = @DuradosUser WHERE (([Id] = @Original_Id) AND ((@IsNull_ServerName = 1 AND [ServerName] IS NULL) OR ([ServerName] = @Original_ServerName)) AND ((@IsNull_Catalog = 1 AND [Catalog] IS NULL) OR ([Catalog] = @Original_Catalog)) AND ((@IsNull_Username = 1 AND [Username] IS NULL) OR ([Username] = @Original_Username)) AND ((@IsNull_Password = 1 AND [Password] IS NULL) OR ([Password] = @Original_Password)) AND ((@IsNull_IntegratedSecurity = 1 AND [IntegratedSecurity] IS NULL) OR ([IntegratedSecurity] = @Original_IntegratedSecurity)) AND ((@IsNull_DuradosUser = 1 AND [DuradosUser] IS NULL) OR ([DuradosUser] = @Original_DuradosUser))); -SELECT Id, ServerName, Catalog, Username, Password, IntegratedSecurity, DuradosUser FROM durados_SqlConnection WHERE (Id = @Id)"; + this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[durados_App] SET [Name] = @Name, [Creator] = @Creator, [CreatedDate" + + "] = @CreatedDate, [ToDelete] = @ToDelete, [ToDeleteDate] = @ToDeleteDate, [Delet" + + "ed] = @Deleted, [DeletedDate] = @DeletedDate, [DataSourceTypeId] = @DataSourceTy" + + "peId, [SqlConnectionId] = @SqlConnectionId, [UsesSpecificBinary] = @UsesSpecific" + + "Binary, [Url] = @Url, [Image] = @Image, [ExistingDataSource] = @ExistingDataSour" + + "ce, [TemplateId] = @TemplateId, [ExcelFileName] = @ExcelFileName, [SpecificDOTNE" + + "T] = @SpecificDOTNET, [SpecificJS] = @SpecificJS, [SpecificCss] = @SpecificCss, " + + "[UseAsTemplate] = @UseAsTemplate, [Description] = @Description, [TemplateFile] =" + + " @TemplateFile, [SystemSqlConnectionId] = @SystemSqlConnectionId, [PrivateAuthen" + + "tication] = @PrivateAuthentication, [SecuritySqlConnectionId] = @SecuritySqlConn" + + "ectionId WHERE (([Id] = @Original_Id) AND ([Name] = @Original_Name) AND ([Creato" + + "r] = @Original_Creator) AND ([CreatedDate] = @Original_CreatedDate) AND ([ToDele" + + "te] = @Original_ToDelete) AND ((@IsNull_ToDeleteDate = 1 AND [ToDeleteDate] IS N" + + "ULL) OR ([ToDeleteDate] = @Original_ToDeleteDate)) AND ([Deleted] = @Original_De" + + "leted) AND ((@IsNull_DeletedDate = 1 AND [DeletedDate] IS NULL) OR ([DeletedDate" + + "] = @Original_DeletedDate)) AND ((@IsNull_DataSourceTypeId = 1 AND [DataSourceTy" + + "peId] IS NULL) OR ([DataSourceTypeId] = @Original_DataSourceTypeId)) AND ((@IsNu" + + "ll_SqlConnectionId = 1 AND [SqlConnectionId] IS NULL) OR ([SqlConnectionId] = @O" + + "riginal_SqlConnectionId)) AND ((@IsNull_UsesSpecificBinary = 1 AND [UsesSpecific" + + "Binary] IS NULL) OR ([UsesSpecificBinary] = @Original_UsesSpecificBinary)) AND (" + + "(@IsNull_Url = 1 AND [Url] IS NULL) OR ([Url] = @Original_Url)) AND ((@IsNull_Im" + + "age = 1 AND [Image] IS NULL) OR ([Image] = @Original_Image)) AND ((@IsNull_Exist" + + "ingDataSource = 1 AND [ExistingDataSource] IS NULL) OR ([ExistingDataSource] = @" + + "Original_ExistingDataSource)) AND ((@IsNull_TemplateId = 1 AND [TemplateId] IS N" + + "ULL) OR ([TemplateId] = @Original_TemplateId)) AND ((@IsNull_ExcelFileName = 1 A" + + "ND [ExcelFileName] IS NULL) OR ([ExcelFileName] = @Original_ExcelFileName)) AND " + + "((@IsNull_SpecificDOTNET = 1 AND [SpecificDOTNET] IS NULL) OR ([SpecificDOTNET] " + + "= @Original_SpecificDOTNET)) AND ((@IsNull_SpecificJS = 1 AND [SpecificJS] IS NU" + + "LL) OR ([SpecificJS] = @Original_SpecificJS)) AND ((@IsNull_SpecificCss = 1 AND " + + "[SpecificCss] IS NULL) OR ([SpecificCss] = @Original_SpecificCss)) AND ((@IsNull" + + "_UseAsTemplate = 1 AND [UseAsTemplate] IS NULL) OR ([UseAsTemplate] = @Original_" + + "UseAsTemplate)) AND ((@IsNull_TemplateFile = 1 AND [TemplateFile] IS NULL) OR ([" + + "TemplateFile] = @Original_TemplateFile)) AND ((@IsNull_SystemSqlConnectionId = 1" + + " AND [SystemSqlConnectionId] IS NULL) OR ([SystemSqlConnectionId] = @Original_Sy" + + "stemSqlConnectionId)) AND ((@IsNull_PrivateAuthentication = 1 AND [PrivateAuthen" + + "tication] IS NULL) OR ([PrivateAuthentication] = @Original_PrivateAuthentication" + + ")) AND ((@IsNull_SecuritySqlConnectionId = 1 AND [SecuritySqlConnectionId] IS NU" + + "LL) OR ([SecuritySqlConnectionId] = @Original_SecuritySqlConnectionId)));\r\nSELEC" + + "T Id, Name, Creator, CreatedDate, ToDelete, ToDeleteDate, Deleted, DeletedDate, " + + "DataSourceTypeId, SqlConnectionId, UsesSpecificBinary, Url, Image, ExistingDataS" + + "ource, TemplateId, ExcelFileName, SpecificDOTNET, SpecificJS, SpecificCss, UseAs" + + "Template, Description, TemplateFile, SystemSqlConnectionId, PrivateAuthenticatio" + + "n, SecuritySqlConnectionId FROM durados_App WHERE (Id = @Id)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ServerName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ServerName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Catalog", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Catalog", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Username", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Username", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Password", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Password", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IntegratedSecurity", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IntegratedSecurity", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DuradosUser", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DuradosUser", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ServerName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ServerName", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ServerName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ServerName", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Catalog", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Catalog", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Catalog", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Catalog", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Username", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Username", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Username", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Username", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Password", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Password", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Password", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Password", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_IntegratedSecurity", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IntegratedSecurity", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IntegratedSecurity", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IntegratedSecurity", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DuradosUser", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DuradosUser", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DuradosUser", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DuradosUser", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Creator", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Creator", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@CreatedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreatedDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ToDelete", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDelete", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ToDeleteDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDeleteDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Deleted", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Deleted", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DeletedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DeletedDate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DataSourceTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataSourceTypeId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SqlConnectionId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UsesSpecificBinary", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UsesSpecificBinary", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Url", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Url", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ExistingDataSource", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExistingDataSource", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TemplateId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ExcelFileName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExcelFileName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SpecificDOTNET", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificDOTNET", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SpecificJS", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificJS", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SpecificCss", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificCss", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UseAsTemplate", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UseAsTemplate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Description", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Description", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TemplateFile", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateFile", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SystemSqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SystemSqlConnectionId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@PrivateAuthentication", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrivateAuthentication", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@SecuritySqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SecuritySqlConnectionId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Creator", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Creator", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_CreatedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "CreatedDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ToDelete", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDelete", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ToDeleteDate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDeleteDate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ToDeleteDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ToDeleteDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Deleted", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Deleted", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DeletedDate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DeletedDate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DeletedDate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DeletedDate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DataSourceTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataSourceTypeId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DataSourceTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DataSourceTypeId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SqlConnectionId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SqlConnectionId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_UsesSpecificBinary", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UsesSpecificBinary", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UsesSpecificBinary", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UsesSpecificBinary", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Url", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Url", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Url", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Url", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Image", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Image", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Image", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ExistingDataSource", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExistingDataSource", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ExistingDataSource", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExistingDataSource", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_TemplateId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TemplateId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ExcelFileName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExcelFileName", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ExcelFileName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ExcelFileName", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SpecificDOTNET", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificDOTNET", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SpecificDOTNET", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificDOTNET", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SpecificJS", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificJS", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SpecificJS", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificJS", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SpecificCss", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificCss", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SpecificCss", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SpecificCss", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_UseAsTemplate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UseAsTemplate", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UseAsTemplate", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UseAsTemplate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_TemplateFile", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateFile", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TemplateFile", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TemplateFile", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SystemSqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SystemSqlConnectionId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SystemSqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SystemSqlConnectionId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_PrivateAuthentication", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrivateAuthentication", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_PrivateAuthentication", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "PrivateAuthentication", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_SecuritySqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SecuritySqlConnectionId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_SecuritySqlConnectionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "SecuritySqlConnectionId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } @@ -10989,8 +8521,7 @@ private void InitCommandCollection() { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT Id, ServerName, Catalog, Username, Password, IntegratedSecurity, DuradosUs" + - "er FROM durados_SqlConnection"; + this._commandCollection[0].CommandText = @"SELECT Id, Name, Creator, CreatedDate, ToDelete, ToDeleteDate, Deleted, DeletedDate, DataSourceTypeId, SqlConnectionId, UsesSpecificBinary, Url, Image, ExistingDataSource, TemplateId, ExcelFileName, SpecificDOTNET, SpecificJS, SpecificCss, UseAsTemplate, Description, TemplateFile, SystemSqlConnectionId, PrivateAuthentication, SecuritySqlConnectionId FROM durados_App"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } @@ -10998,7 +8529,7 @@ private void InitCommandCollection() { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] - public virtual int Fill(MapDataSet.durados_SqlConnectionDataTable dataTable) { + public virtual int Fill(MapDataSet.durados_AppDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); @@ -11011,9 +8542,9 @@ public virtual int Fill(MapDataSet.durados_SqlConnectionDataTable dataTable) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] - public virtual MapDataSet.durados_SqlConnectionDataTable GetData() { + public virtual MapDataSet.durados_AppDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; - MapDataSet.durados_SqlConnectionDataTable dataTable = new MapDataSet.durados_SqlConnectionDataTable(); + MapDataSet.durados_AppDataTable dataTable = new MapDataSet.durados_AppDataTable(); this.Adapter.Fill(dataTable); return dataTable; } @@ -11021,7 +8552,7 @@ public virtual MapDataSet.durados_SqlConnectionDataTable GetData() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(MapDataSet.durados_SqlConnectionDataTable dataTable) { + public virtual int Update(MapDataSet.durados_AppDataTable dataTable) { return this.Adapter.Update(dataTable); } @@ -11029,7 +8560,7 @@ public virtual int Update(MapDataSet.durados_SqlConnectionDataTable dataTable) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MapDataSet dataSet) { - return this.Adapter.Update(dataSet, "durados_SqlConnection"); + return this.Adapter.Update(dataSet, "durados_App"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -11050,710 +8581,706 @@ public virtual int Update(global::System.Data.DataRow[] dataRows) { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete(int Original_Id, string Original_ServerName, string Original_Catalog, string Original_Username, string Original_Password, global::System.Nullable Original_IntegratedSecurity, global::System.Nullable Original_DuradosUser) { - this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Id)); - if ((Original_ServerName == null)) { - this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete( + int Original_Id, + string Original_Name, + int Original_Creator, + System.DateTime Original_CreatedDate, + bool Original_ToDelete, + global::System.Nullable Original_ToDeleteDate, + bool Original_Deleted, + global::System.Nullable Original_DeletedDate, + global::System.Nullable Original_DataSourceTypeId, + global::System.Nullable Original_SqlConnectionId, + global::System.Nullable Original_UsesSpecificBinary, + string Original_Url, + string Original_Image, + global::System.Nullable Original_ExistingDataSource, + global::System.Nullable Original_TemplateId, + string Original_ExcelFileName, + string Original_SpecificDOTNET, + string Original_SpecificJS, + string Original_SpecificCss, + global::System.Nullable Original_UseAsTemplate, + string Original_TemplateFile, + global::System.Nullable Original_SystemSqlConnectionId, + global::System.Nullable Original_PrivateAuthentication, + global::System.Nullable Original_SecuritySqlConnectionId) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Id)); + if ((Original_Name == null)) { + throw new global::System.ArgumentNullException("Original_Name"); + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name)); + } + this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_Creator)); + this.Adapter.DeleteCommand.Parameters[3].Value = ((System.DateTime)(Original_CreatedDate)); + this.Adapter.DeleteCommand.Parameters[4].Value = ((bool)(Original_ToDelete)); + if ((Original_ToDeleteDate.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[6].Value = ((System.DateTime)(Original_ToDeleteDate.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; + } + this.Adapter.DeleteCommand.Parameters[7].Value = ((bool)(Original_Deleted)); + if ((Original_DeletedDate.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[9].Value = ((System.DateTime)(Original_DeletedDate.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[8].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[9].Value = global::System.DBNull.Value; + } + if ((Original_DataSourceTypeId.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[11].Value = ((int)(Original_DataSourceTypeId.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[11].Value = global::System.DBNull.Value; + } + if ((Original_SqlConnectionId.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[12].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[13].Value = ((int)(Original_SqlConnectionId.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[12].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[13].Value = global::System.DBNull.Value; + } + if ((Original_UsesSpecificBinary.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[14].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[15].Value = ((bool)(Original_UsesSpecificBinary.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[14].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[15].Value = global::System.DBNull.Value; + } + if ((Original_Url == null)) { + this.Adapter.DeleteCommand.Parameters[16].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[17].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[16].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[17].Value = ((string)(Original_Url)); + } + if ((Original_Image == null)) { + this.Adapter.DeleteCommand.Parameters[18].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[19].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[18].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[19].Value = ((string)(Original_Image)); + } + if ((Original_ExistingDataSource.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[20].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[21].Value = ((bool)(Original_ExistingDataSource.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[20].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[21].Value = global::System.DBNull.Value; + } + if ((Original_TemplateId.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[22].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[23].Value = ((int)(Original_TemplateId.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[22].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[23].Value = global::System.DBNull.Value; + } + if ((Original_ExcelFileName == null)) { + this.Adapter.DeleteCommand.Parameters[24].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[25].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[24].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[25].Value = ((string)(Original_ExcelFileName)); + } + if ((Original_SpecificDOTNET == null)) { + this.Adapter.DeleteCommand.Parameters[26].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[27].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[26].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[27].Value = ((string)(Original_SpecificDOTNET)); + } + if ((Original_SpecificJS == null)) { + this.Adapter.DeleteCommand.Parameters[28].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[29].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[28].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[29].Value = ((string)(Original_SpecificJS)); + } + if ((Original_SpecificCss == null)) { + this.Adapter.DeleteCommand.Parameters[30].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[31].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[30].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[31].Value = ((string)(Original_SpecificCss)); + } + if ((Original_UseAsTemplate.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[32].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[33].Value = ((bool)(Original_UseAsTemplate.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[32].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[33].Value = global::System.DBNull.Value; + } + if ((Original_TemplateFile == null)) { + this.Adapter.DeleteCommand.Parameters[34].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[35].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[34].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[35].Value = ((string)(Original_TemplateFile)); + } + if ((Original_SystemSqlConnectionId.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[36].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[37].Value = ((int)(Original_SystemSqlConnectionId.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[36].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[37].Value = global::System.DBNull.Value; + } + if ((Original_PrivateAuthentication.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[38].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[39].Value = ((bool)(Original_PrivateAuthentication.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[38].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[39].Value = global::System.DBNull.Value; + } + if ((Original_SecuritySqlConnectionId.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[40].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[41].Value = ((int)(Original_SecuritySqlConnectionId.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[40].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[41].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert( + string Name, + int Creator, + System.DateTime CreatedDate, + bool ToDelete, + global::System.Nullable ToDeleteDate, + bool Deleted, + global::System.Nullable DeletedDate, + global::System.Nullable DataSourceTypeId, + global::System.Nullable SqlConnectionId, + global::System.Nullable UsesSpecificBinary, + string Url, + string Image, + global::System.Nullable ExistingDataSource, + global::System.Nullable TemplateId, + string ExcelFileName, + string SpecificDOTNET, + string SpecificJS, + string SpecificCss, + global::System.Nullable UseAsTemplate, + string Description, + string TemplateFile, + global::System.Nullable SystemSqlConnectionId, + global::System.Nullable PrivateAuthentication, + global::System.Nullable SecuritySqlConnectionId) { + if ((Name == null)) { + throw new global::System.ArgumentNullException("Name"); } else { - this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_ServerName)); + this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name)); } - if ((Original_Catalog == null)) { - this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; + this.Adapter.InsertCommand.Parameters[1].Value = ((int)(Creator)); + this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(CreatedDate)); + this.Adapter.InsertCommand.Parameters[3].Value = ((bool)(ToDelete)); + if ((ToDeleteDate.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(ToDeleteDate.Value)); } else { - this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_Catalog)); + this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; } - if ((Original_Username == null)) { - this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; + this.Adapter.InsertCommand.Parameters[5].Value = ((bool)(Deleted)); + if ((DeletedDate.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[6].Value = ((System.DateTime)(DeletedDate.Value)); } else { - this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_Username)); + this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value; } - if ((Original_Password == null)) { - this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value; + if ((DataSourceTypeId.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[7].Value = ((int)(DataSourceTypeId.Value)); } else { - this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(Original_Password)); + this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value; } - if ((Original_IntegratedSecurity.HasValue == true)) { - this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[10].Value = ((bool)(Original_IntegratedSecurity.Value)); + if ((SqlConnectionId.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[8].Value = ((int)(SqlConnectionId.Value)); } else { - this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value; + this.Adapter.InsertCommand.Parameters[8].Value = global::System.DBNull.Value; } - if ((Original_DuradosUser.HasValue == true)) { - this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[12].Value = ((int)(Original_DuradosUser.Value)); + if ((UsesSpecificBinary.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[9].Value = ((bool)(UsesSpecificBinary.Value)); } else { - this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value; + this.Adapter.InsertCommand.Parameters[9].Value = global::System.DBNull.Value; } - global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; - if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + if ((Url == null)) { + this.Adapter.InsertCommand.Parameters[10].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[10].Value = ((string)(Url)); + } + if ((Image == null)) { + this.Adapter.InsertCommand.Parameters[11].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[11].Value = ((string)(Image)); + } + if ((ExistingDataSource.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[12].Value = ((bool)(ExistingDataSource.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[12].Value = global::System.DBNull.Value; + } + if ((TemplateId.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[13].Value = ((int)(TemplateId.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[13].Value = global::System.DBNull.Value; + } + if ((ExcelFileName == null)) { + this.Adapter.InsertCommand.Parameters[14].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[14].Value = ((string)(ExcelFileName)); + } + if ((SpecificDOTNET == null)) { + this.Adapter.InsertCommand.Parameters[15].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[15].Value = ((string)(SpecificDOTNET)); + } + if ((SpecificJS == null)) { + this.Adapter.InsertCommand.Parameters[16].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[16].Value = ((string)(SpecificJS)); + } + if ((SpecificCss == null)) { + this.Adapter.InsertCommand.Parameters[17].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[17].Value = ((string)(SpecificCss)); + } + if ((UseAsTemplate.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[18].Value = ((bool)(UseAsTemplate.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[18].Value = global::System.DBNull.Value; + } + if ((Description == null)) { + this.Adapter.InsertCommand.Parameters[19].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[19].Value = ((string)(Description)); + } + if ((TemplateFile == null)) { + this.Adapter.InsertCommand.Parameters[20].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[20].Value = ((string)(TemplateFile)); + } + if ((SystemSqlConnectionId.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[21].Value = ((int)(SystemSqlConnectionId.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[21].Value = global::System.DBNull.Value; + } + if ((PrivateAuthentication.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[22].Value = ((bool)(PrivateAuthentication.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[22].Value = global::System.DBNull.Value; + } + if ((SecuritySqlConnectionId.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[23].Value = ((int)(SecuritySqlConnectionId.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[23].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { - this.Adapter.DeleteCommand.Connection.Open(); + this.Adapter.InsertCommand.Connection.Open(); } try { - int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); return returnValue; } finally { if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.DeleteCommand.Connection.Close(); + this.Adapter.InsertCommand.Connection.Close(); } } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(string ServerName, string Catalog, string Username, string Password, global::System.Nullable IntegratedSecurity, global::System.Nullable DuradosUser) { - if ((ServerName == null)) { - this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update( + string Name, + int Creator, + System.DateTime CreatedDate, + bool ToDelete, + global::System.Nullable ToDeleteDate, + bool Deleted, + global::System.Nullable DeletedDate, + global::System.Nullable DataSourceTypeId, + global::System.Nullable SqlConnectionId, + global::System.Nullable UsesSpecificBinary, + string Url, + string Image, + global::System.Nullable ExistingDataSource, + global::System.Nullable TemplateId, + string ExcelFileName, + string SpecificDOTNET, + string SpecificJS, + string SpecificCss, + global::System.Nullable UseAsTemplate, + string Description, + string TemplateFile, + global::System.Nullable SystemSqlConnectionId, + global::System.Nullable PrivateAuthentication, + global::System.Nullable SecuritySqlConnectionId, + int Original_Id, + string Original_Name, + int Original_Creator, + System.DateTime Original_CreatedDate, + bool Original_ToDelete, + global::System.Nullable Original_ToDeleteDate, + bool Original_Deleted, + global::System.Nullable Original_DeletedDate, + global::System.Nullable Original_DataSourceTypeId, + global::System.Nullable Original_SqlConnectionId, + global::System.Nullable Original_UsesSpecificBinary, + string Original_Url, + string Original_Image, + global::System.Nullable Original_ExistingDataSource, + global::System.Nullable Original_TemplateId, + string Original_ExcelFileName, + string Original_SpecificDOTNET, + string Original_SpecificJS, + string Original_SpecificCss, + global::System.Nullable Original_UseAsTemplate, + string Original_TemplateFile, + global::System.Nullable Original_SystemSqlConnectionId, + global::System.Nullable Original_PrivateAuthentication, + global::System.Nullable Original_SecuritySqlConnectionId, + int Id) { + if ((Name == null)) { + throw new global::System.ArgumentNullException("Name"); + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name)); + } + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Creator)); + this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(CreatedDate)); + this.Adapter.UpdateCommand.Parameters[3].Value = ((bool)(ToDelete)); + if ((ToDeleteDate.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(ToDeleteDate.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + this.Adapter.UpdateCommand.Parameters[5].Value = ((bool)(Deleted)); + if ((DeletedDate.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[6].Value = ((System.DateTime)(DeletedDate.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; + } + if ((DataSourceTypeId.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(DataSourceTypeId.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; + } + if ((SqlConnectionId.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(SqlConnectionId.Value)); } else { - this.Adapter.InsertCommand.Parameters[0].Value = ((string)(ServerName)); + this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value; } - if ((Catalog == null)) { - this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + if ((UsesSpecificBinary.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[9].Value = ((bool)(UsesSpecificBinary.Value)); } else { - this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Catalog)); + this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value; } - if ((Username == null)) { - this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; + if ((Url == null)) { + this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value; } else { - this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Username)); + this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Url)); } - if ((Password == null)) { - this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; + if ((Image == null)) { + this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; } else { - this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Password)); + this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Image)); } - if ((IntegratedSecurity.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[4].Value = ((bool)(IntegratedSecurity.Value)); + if ((ExistingDataSource.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[12].Value = ((bool)(ExistingDataSource.Value)); } else { - this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value; } - if ((DuradosUser.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[5].Value = ((int)(DuradosUser.Value)); + if ((TemplateId.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(TemplateId.Value)); } else { - this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[13].Value = global::System.DBNull.Value; } - global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; - if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.InsertCommand.Connection.Open(); + if ((ExcelFileName == null)) { + this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value; } - try { - int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); - return returnValue; + else { + this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(ExcelFileName)); } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.InsertCommand.Connection.Close(); - } + if ((SpecificDOTNET == null)) { + this.Adapter.UpdateCommand.Parameters[15].Value = global::System.DBNull.Value; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(string ServerName, string Catalog, string Username, string Password, global::System.Nullable IntegratedSecurity, global::System.Nullable DuradosUser, int Original_Id, string Original_ServerName, string Original_Catalog, string Original_Username, string Original_Password, global::System.Nullable Original_IntegratedSecurity, global::System.Nullable Original_DuradosUser, int Id) { - if ((ServerName == null)) { - this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value; + else { + this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(SpecificDOTNET)); + } + if ((SpecificJS == null)) { + this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(ServerName)); + this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(SpecificJS)); } - if ((Catalog == null)) { - this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; + if ((SpecificCss == null)) { + this.Adapter.UpdateCommand.Parameters[17].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Catalog)); + this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(SpecificCss)); } - if ((Username == null)) { - this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; + if ((UseAsTemplate.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[18].Value = ((bool)(UseAsTemplate.Value)); } else { - this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Username)); + this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value; } - if ((Password == null)) { - this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + if ((Description == null)) { + this.Adapter.UpdateCommand.Parameters[19].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Password)); + this.Adapter.UpdateCommand.Parameters[19].Value = ((string)(Description)); } - if ((IntegratedSecurity.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[4].Value = ((bool)(IntegratedSecurity.Value)); + if ((TemplateFile == null)) { + this.Adapter.UpdateCommand.Parameters[20].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[20].Value = ((string)(TemplateFile)); } - if ((DuradosUser.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(DuradosUser.Value)); + if ((SystemSqlConnectionId.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[21].Value = ((int)(SystemSqlConnectionId.Value)); } else { - this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[21].Value = global::System.DBNull.Value; } - this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_Id)); - if ((Original_ServerName == null)) { - this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value; + if ((PrivateAuthentication.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[22].Value = ((bool)(PrivateAuthentication.Value)); } else { - this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_ServerName)); + this.Adapter.UpdateCommand.Parameters[22].Value = global::System.DBNull.Value; } - if ((Original_Catalog == null)) { - this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value; + if ((SecuritySqlConnectionId.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[23].Value = ((int)(SecuritySqlConnectionId.Value)); } else { - this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_Catalog)); + this.Adapter.UpdateCommand.Parameters[23].Value = global::System.DBNull.Value; } - if ((Original_Username == null)) { - this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[24].Value = ((int)(Original_Id)); + if ((Original_Name == null)) { + throw new global::System.ArgumentNullException("Original_Name"); } else { - this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_Username)); + this.Adapter.UpdateCommand.Parameters[25].Value = ((string)(Original_Name)); } - if ((Original_Password == null)) { - this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[26].Value = ((int)(Original_Creator)); + this.Adapter.UpdateCommand.Parameters[27].Value = ((System.DateTime)(Original_CreatedDate)); + this.Adapter.UpdateCommand.Parameters[28].Value = ((bool)(Original_ToDelete)); + if ((Original_ToDeleteDate.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[29].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[30].Value = ((System.DateTime)(Original_ToDeleteDate.Value)); } else { - this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_Password)); + this.Adapter.UpdateCommand.Parameters[29].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[30].Value = global::System.DBNull.Value; } - if ((Original_IntegratedSecurity.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[16].Value = ((bool)(Original_IntegratedSecurity.Value)); + this.Adapter.UpdateCommand.Parameters[31].Value = ((bool)(Original_Deleted)); + if ((Original_DeletedDate.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[32].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[33].Value = ((System.DateTime)(Original_DeletedDate.Value)); } else { - this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[32].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[33].Value = global::System.DBNull.Value; } - if ((Original_DuradosUser.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(Original_DuradosUser.Value)); + if ((Original_DataSourceTypeId.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[34].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[35].Value = ((int)(Original_DataSourceTypeId.Value)); } else { - this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[34].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[35].Value = global::System.DBNull.Value; } - this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(Id)); - global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; - if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.UpdateCommand.Connection.Open(); + if ((Original_SqlConnectionId.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[36].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[37].Value = ((int)(Original_SqlConnectionId.Value)); } - try { - int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); - return returnValue; + else { + this.Adapter.UpdateCommand.Parameters[36].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[37].Value = global::System.DBNull.Value; } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.UpdateCommand.Connection.Close(); - } + if ((Original_UsesSpecificBinary.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[38].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[39].Value = ((bool)(Original_UsesSpecificBinary.Value)); } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(string ServerName, string Catalog, string Username, string Password, global::System.Nullable IntegratedSecurity, global::System.Nullable DuradosUser, int Original_Id, string Original_ServerName, string Original_Catalog, string Original_Username, string Original_Password, global::System.Nullable Original_IntegratedSecurity, global::System.Nullable Original_DuradosUser) { - return this.Update(ServerName, Catalog, Username, Password, IntegratedSecurity, DuradosUser, Original_Id, Original_ServerName, Original_Catalog, Original_Username, Original_Password, Original_IntegratedSecurity, Original_DuradosUser, Original_Id); - } - } - - /// - ///Represents the connection and commands used to retrieve and save data. - /// - [global::System.ComponentModel.DesignerCategoryAttribute("code")] - [global::System.ComponentModel.ToolboxItem(true)] - [global::System.ComponentModel.DataObjectAttribute(true)] - [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + - ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public partial class v_durados_UserTableAdapter : global::System.ComponentModel.Component { - - private global::System.Data.SqlClient.SqlDataAdapter _adapter; - - private global::System.Data.SqlClient.SqlConnection _connection; - - private global::System.Data.SqlClient.SqlTransaction _transaction; - - private global::System.Data.SqlClient.SqlCommand[] _commandCollection; - - private bool _clearBeforeFill; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public v_durados_UserTableAdapter() { - this.ClearBeforeFill = true; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { - get { - if ((this._adapter == null)) { - this.InitAdapter(); - } - return this._adapter; + else { + this.Adapter.UpdateCommand.Parameters[38].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[39].Value = global::System.DBNull.Value; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal global::System.Data.SqlClient.SqlConnection Connection { - get { - if ((this._connection == null)) { - this.InitConnection(); - } - return this._connection; + if ((Original_Url == null)) { + this.Adapter.UpdateCommand.Parameters[40].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[41].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[40].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[41].Value = ((string)(Original_Url)); } - set { - this._connection = value; - if ((this.Adapter.InsertCommand != null)) { - this.Adapter.InsertCommand.Connection = value; - } - if ((this.Adapter.DeleteCommand != null)) { - this.Adapter.DeleteCommand.Connection = value; - } - if ((this.Adapter.UpdateCommand != null)) { - this.Adapter.UpdateCommand.Connection = value; - } - for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { - if ((this.CommandCollection[i] != null)) { - ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; - } - } + if ((Original_Image == null)) { + this.Adapter.UpdateCommand.Parameters[42].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[43].Value = global::System.DBNull.Value; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal global::System.Data.SqlClient.SqlTransaction Transaction { - get { - return this._transaction; + else { + this.Adapter.UpdateCommand.Parameters[42].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[43].Value = ((string)(Original_Image)); } - set { - this._transaction = value; - for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { - this.CommandCollection[i].Transaction = this._transaction; - } - if (((this.Adapter != null) - && (this.Adapter.DeleteCommand != null))) { - this.Adapter.DeleteCommand.Transaction = this._transaction; - } - if (((this.Adapter != null) - && (this.Adapter.InsertCommand != null))) { - this.Adapter.InsertCommand.Transaction = this._transaction; - } - if (((this.Adapter != null) - && (this.Adapter.UpdateCommand != null))) { - this.Adapter.UpdateCommand.Transaction = this._transaction; - } + if ((Original_ExistingDataSource.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[44].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[45].Value = ((bool)(Original_ExistingDataSource.Value)); } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { - get { - if ((this._commandCollection == null)) { - this.InitCommandCollection(); - } - return this._commandCollection; + else { + this.Adapter.UpdateCommand.Parameters[44].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[45].Value = global::System.DBNull.Value; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool ClearBeforeFill { - get { - return this._clearBeforeFill; + if ((Original_TemplateId.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[46].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[47].Value = ((int)(Original_TemplateId.Value)); } - set { - this._clearBeforeFill = value; + else { + this.Adapter.UpdateCommand.Parameters[46].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[47].Value = global::System.DBNull.Value; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private void InitAdapter() { - this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); - global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); - tableMapping.SourceTable = "Table"; - tableMapping.DataSetTable = "v_durados_User"; - tableMapping.ColumnMappings.Add("ID", "ID"); - tableMapping.ColumnMappings.Add("Username", "Username"); - tableMapping.ColumnMappings.Add("FirstName", "FirstName"); - tableMapping.ColumnMappings.Add("LastName", "LastName"); - tableMapping.ColumnMappings.Add("Email", "Email"); - tableMapping.ColumnMappings.Add("Password", "Password"); - tableMapping.ColumnMappings.Add("Role", "Role"); - tableMapping.ColumnMappings.Add("Guid", "Guid"); - tableMapping.ColumnMappings.Add("Signature", "Signature"); - tableMapping.ColumnMappings.Add("SignatureHTML", "SignatureHTML"); - tableMapping.ColumnMappings.Add("NewUser", "NewUser"); - tableMapping.ColumnMappings.Add("Comments", "Comments"); - tableMapping.ColumnMappings.Add("IsApproved", "IsApproved"); - tableMapping.ColumnMappings.Add("FullName", "FullName"); - this._adapter.TableMappings.Add(tableMapping); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private void InitConnection() { - this._connection = new global::System.Data.SqlClient.SqlConnection(); - this._connection.ConnectionString = global::Durados.Web.Mvc.Properties.Settings.Default.duradosConnectionString; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; - this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); - this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT ID, Username, FirstName, LastName, Email, Password, Role, Guid, Signature," + - " SignatureHTML, IsApproved, NewUser, Comments, FullName\r\nFROM v_durados_User" + - ""; - this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] - public virtual int Fill(MapDataSet.v_durados_UserDataTable dataTable) { - this.Adapter.SelectCommand = this.CommandCollection[0]; - if ((this.ClearBeforeFill == true)) { - dataTable.Clear(); + if ((Original_ExcelFileName == null)) { + this.Adapter.UpdateCommand.Parameters[48].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[49].Value = global::System.DBNull.Value; } - int returnValue = this.Adapter.Fill(dataTable); - return returnValue; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] - public virtual MapDataSet.v_durados_UserDataTable GetData() { - this.Adapter.SelectCommand = this.CommandCollection[0]; - MapDataSet.v_durados_UserDataTable dataTable = new MapDataSet.v_durados_UserDataTable(); - this.Adapter.Fill(dataTable); - return dataTable; - } - } - - /// - ///Represents the connection and commands used to retrieve and save data. - /// - [global::System.ComponentModel.DesignerCategoryAttribute("code")] - [global::System.ComponentModel.ToolboxItem(true)] - [global::System.ComponentModel.DataObjectAttribute(true)] - [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + - ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public partial class durados_UserAliasTableAdapter : global::System.ComponentModel.Component { - - private global::System.Data.SqlClient.SqlDataAdapter _adapter; - - private global::System.Data.SqlClient.SqlConnection _connection; - - private global::System.Data.SqlClient.SqlTransaction _transaction; - - private global::System.Data.SqlClient.SqlCommand[] _commandCollection; - - private bool _clearBeforeFill; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_UserAliasTableAdapter() { - this.ClearBeforeFill = true; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter { - get { - if ((this._adapter == null)) { - this.InitAdapter(); - } - return this._adapter; + else { + this.Adapter.UpdateCommand.Parameters[48].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[49].Value = ((string)(Original_ExcelFileName)); } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal global::System.Data.SqlClient.SqlConnection Connection { - get { - if ((this._connection == null)) { - this.InitConnection(); - } - return this._connection; + if ((Original_SpecificDOTNET == null)) { + this.Adapter.UpdateCommand.Parameters[50].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[51].Value = global::System.DBNull.Value; } - set { - this._connection = value; - if ((this.Adapter.InsertCommand != null)) { - this.Adapter.InsertCommand.Connection = value; - } - if ((this.Adapter.DeleteCommand != null)) { - this.Adapter.DeleteCommand.Connection = value; - } - if ((this.Adapter.UpdateCommand != null)) { - this.Adapter.UpdateCommand.Connection = value; - } - for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { - if ((this.CommandCollection[i] != null)) { - ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value; - } - } + else { + this.Adapter.UpdateCommand.Parameters[50].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[51].Value = ((string)(Original_SpecificDOTNET)); } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal global::System.Data.SqlClient.SqlTransaction Transaction { - get { - return this._transaction; + if ((Original_SpecificJS == null)) { + this.Adapter.UpdateCommand.Parameters[52].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[53].Value = global::System.DBNull.Value; } - set { - this._transaction = value; - for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { - this.CommandCollection[i].Transaction = this._transaction; - } - if (((this.Adapter != null) - && (this.Adapter.DeleteCommand != null))) { - this.Adapter.DeleteCommand.Transaction = this._transaction; - } - if (((this.Adapter != null) - && (this.Adapter.InsertCommand != null))) { - this.Adapter.InsertCommand.Transaction = this._transaction; - } - if (((this.Adapter != null) - && (this.Adapter.UpdateCommand != null))) { - this.Adapter.UpdateCommand.Transaction = this._transaction; - } + else { + this.Adapter.UpdateCommand.Parameters[52].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[53].Value = ((string)(Original_SpecificJS)); + } + if ((Original_SpecificCss == null)) { + this.Adapter.UpdateCommand.Parameters[54].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[55].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[54].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[55].Value = ((string)(Original_SpecificCss)); } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected global::System.Data.SqlClient.SqlCommand[] CommandCollection { - get { - if ((this._commandCollection == null)) { - this.InitCommandCollection(); - } - return this._commandCollection; + if ((Original_UseAsTemplate.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[56].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[57].Value = ((bool)(Original_UseAsTemplate.Value)); } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public bool ClearBeforeFill { - get { - return this._clearBeforeFill; + else { + this.Adapter.UpdateCommand.Parameters[56].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[57].Value = global::System.DBNull.Value; } - set { - this._clearBeforeFill = value; + if ((Original_TemplateFile == null)) { + this.Adapter.UpdateCommand.Parameters[58].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[59].Value = global::System.DBNull.Value; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private void InitAdapter() { - this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); - global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); - tableMapping.SourceTable = "Table"; - tableMapping.DataSetTable = "durados_UserAlias"; - tableMapping.ColumnMappings.Add("Id", "Id"); - tableMapping.ColumnMappings.Add("MainUsername", "MainUsername"); - tableMapping.ColumnMappings.Add("Alias", "Alias"); - this._adapter.TableMappings.Add(tableMapping); - this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); - this._adapter.DeleteCommand.Connection = this.Connection; - this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[durados_UserAlias] WHERE (([Id] = @Original_Id) AND ([MainUser" + - "name] = @Original_MainUsername) AND ([Alias] = @Original_Alias))"; - this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MainUsername", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MainUsername", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Alias", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Alias", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); - this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[durados_UserAlias] ([MainUsername], [Alias]) VALUES (@MainUser" + - "name, @Alias);\r\nSELECT Id, MainUsername, Alias FROM durados_UserAlias WHERE (Id " + - "= SCOPE_IDENTITY())"; - this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MainUsername", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MainUsername", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Alias", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Alias", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); - this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[durados_UserAlias] SET [MainUsername] = @MainUsername, [Alias] = @Alias WHERE (([Id] = @Original_Id) AND ([MainUsername] = @Original_MainUsername) AND ([Alias] = @Original_Alias)); -SELECT Id, MainUsername, Alias FROM durados_UserAlias WHERE (Id = @Id)"; - this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MainUsername", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MainUsername", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Alias", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Alias", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MainUsername", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MainUsername", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Alias", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Alias", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private void InitConnection() { - this._connection = new global::System.Data.SqlClient.SqlConnection(); - this._connection.ConnectionString = global::Durados.Web.Mvc.Properties.Settings.Default.duradosConnectionString; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; - this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); - this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT Id, MainUsername, Alias FROM dbo.durados_UserAlias"; - this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] - public virtual int Fill(MapDataSet.durados_UserAliasDataTable dataTable) { - this.Adapter.SelectCommand = this.CommandCollection[0]; - if ((this.ClearBeforeFill == true)) { - dataTable.Clear(); + else { + this.Adapter.UpdateCommand.Parameters[58].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[59].Value = ((string)(Original_TemplateFile)); } - int returnValue = this.Adapter.Fill(dataTable); - return returnValue; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] - public virtual MapDataSet.durados_UserAliasDataTable GetData() { - this.Adapter.SelectCommand = this.CommandCollection[0]; - MapDataSet.durados_UserAliasDataTable dataTable = new MapDataSet.durados_UserAliasDataTable(); - this.Adapter.Fill(dataTable); - return dataTable; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(MapDataSet.durados_UserAliasDataTable dataTable) { - return this.Adapter.Update(dataTable); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(MapDataSet dataSet) { - return this.Adapter.Update(dataSet, "durados_UserAlias"); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(global::System.Data.DataRow dataRow) { - return this.Adapter.Update(new global::System.Data.DataRow[] { - dataRow}); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(global::System.Data.DataRow[] dataRows) { - return this.Adapter.Update(dataRows); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete(int Original_Id, int Original_MainUsername, int Original_Alias) { - this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Id)); - this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_MainUsername)); - this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_Alias)); - global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; - if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.DeleteCommand.Connection.Open(); + if ((Original_SystemSqlConnectionId.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[60].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[61].Value = ((int)(Original_SystemSqlConnectionId.Value)); } - try { - int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); - return returnValue; + else { + this.Adapter.UpdateCommand.Parameters[60].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[61].Value = global::System.DBNull.Value; } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.DeleteCommand.Connection.Close(); - } + if ((Original_PrivateAuthentication.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[62].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[63].Value = ((bool)(Original_PrivateAuthentication.Value)); } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(int MainUsername, int Alias) { - this.Adapter.InsertCommand.Parameters[0].Value = ((int)(MainUsername)); - this.Adapter.InsertCommand.Parameters[1].Value = ((int)(Alias)); - global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; - if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.InsertCommand.Connection.Open(); + else { + this.Adapter.UpdateCommand.Parameters[62].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[63].Value = global::System.DBNull.Value; } - try { - int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); - return returnValue; + if ((Original_SecuritySqlConnectionId.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[64].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[65].Value = ((int)(Original_SecuritySqlConnectionId.Value)); } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.InsertCommand.Connection.Close(); - } + else { + this.Adapter.UpdateCommand.Parameters[64].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[65].Value = global::System.DBNull.Value; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(int MainUsername, int Alias, int Original_Id, int Original_MainUsername, int Original_Alias, int Id) { - this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(MainUsername)); - this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Alias)); - this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_Id)); - this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_MainUsername)); - this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_Alias)); - this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Id)); + this.Adapter.UpdateCommand.Parameters[66].Value = ((int)(Id)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -11774,8 +9301,56 @@ public virtual int Update(int MainUsername, int Alias, int Original_Id, int Orig [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(int MainUsername, int Alias, int Original_Id, int Original_MainUsername, int Original_Alias) { - return this.Update(MainUsername, Alias, Original_Id, Original_MainUsername, Original_Alias, Original_Id); + public virtual int Update( + string Name, + int Creator, + System.DateTime CreatedDate, + bool ToDelete, + global::System.Nullable ToDeleteDate, + bool Deleted, + global::System.Nullable DeletedDate, + global::System.Nullable DataSourceTypeId, + global::System.Nullable SqlConnectionId, + global::System.Nullable UsesSpecificBinary, + string Url, + string Image, + global::System.Nullable ExistingDataSource, + global::System.Nullable TemplateId, + string ExcelFileName, + string SpecificDOTNET, + string SpecificJS, + string SpecificCss, + global::System.Nullable UseAsTemplate, + string Description, + string TemplateFile, + global::System.Nullable SystemSqlConnectionId, + global::System.Nullable PrivateAuthentication, + global::System.Nullable SecuritySqlConnectionId, + int Original_Id, + string Original_Name, + int Original_Creator, + System.DateTime Original_CreatedDate, + bool Original_ToDelete, + global::System.Nullable Original_ToDeleteDate, + bool Original_Deleted, + global::System.Nullable Original_DeletedDate, + global::System.Nullable Original_DataSourceTypeId, + global::System.Nullable Original_SqlConnectionId, + global::System.Nullable Original_UsesSpecificBinary, + string Original_Url, + string Original_Image, + global::System.Nullable Original_ExistingDataSource, + global::System.Nullable Original_TemplateId, + string Original_ExcelFileName, + string Original_SpecificDOTNET, + string Original_SpecificJS, + string Original_SpecificCss, + global::System.Nullable Original_UseAsTemplate, + string Original_TemplateFile, + global::System.Nullable Original_SystemSqlConnectionId, + global::System.Nullable Original_PrivateAuthentication, + global::System.Nullable Original_SecuritySqlConnectionId) { + return this.Update(Name, Creator, CreatedDate, ToDelete, ToDeleteDate, Deleted, DeletedDate, DataSourceTypeId, SqlConnectionId, UsesSpecificBinary, Url, Image, ExistingDataSource, TemplateId, ExcelFileName, SpecificDOTNET, SpecificJS, SpecificCss, UseAsTemplate, Description, TemplateFile, SystemSqlConnectionId, PrivateAuthentication, SecuritySqlConnectionId, Original_Id, Original_Name, Original_Creator, Original_CreatedDate, Original_ToDelete, Original_ToDeleteDate, Original_Deleted, Original_DeletedDate, Original_DataSourceTypeId, Original_SqlConnectionId, Original_UsesSpecificBinary, Original_Url, Original_Image, Original_ExistingDataSource, Original_TemplateId, Original_ExcelFileName, Original_SpecificDOTNET, Original_SpecificJS, Original_SpecificCss, Original_UseAsTemplate, Original_TemplateFile, Original_SystemSqlConnectionId, Original_PrivateAuthentication, Original_SecuritySqlConnectionId, Original_Id); } } @@ -11788,7 +9363,7 @@ public virtual int Update(int MainUsername, int Alias, int Original_Id, int Orig [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public partial class durados_UserAppTableAdapter : global::System.ComponentModel.Component { + public partial class durados_SqlConnectionTableAdapter : global::System.ComponentModel.Component { private global::System.Data.SqlClient.SqlDataAdapter _adapter; @@ -11802,7 +9377,7 @@ public partial class durados_UserAppTableAdapter : global::System.ComponentModel [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_UserAppTableAdapter() { + public durados_SqlConnectionTableAdapter() { this.ClearBeforeFill = true; } @@ -11899,45 +9474,67 @@ private void InitAdapter() { this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; - tableMapping.DataSetTable = "durados_UserApp"; + tableMapping.DataSetTable = "durados_SqlConnection"; tableMapping.ColumnMappings.Add("Id", "Id"); - tableMapping.ColumnMappings.Add("UserId", "UserId"); - tableMapping.ColumnMappings.Add("AppId", "AppId"); - tableMapping.ColumnMappings.Add("Category", "Category"); + tableMapping.ColumnMappings.Add("ServerName", "ServerName"); + tableMapping.ColumnMappings.Add("Catalog", "Catalog"); + tableMapping.ColumnMappings.Add("Username", "Username"); + tableMapping.ColumnMappings.Add("Password", "Password"); + tableMapping.ColumnMappings.Add("IntegratedSecurity", "IntegratedSecurity"); + tableMapping.ColumnMappings.Add("DuradosUser", "DuradosUser"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; - this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[durados_UserApp] WHERE (([Id] = @Original_Id) AND ([UserId] = " + - "@Original_UserId) AND ([AppId] = @Original_AppId) AND ((@IsNull_Category = 1 AND" + - " [Category] IS NULL) OR ([Category] = @Original_Category)))"; + this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[durados_SqlConnection] WHERE (([Id] = @Original_Id) AND ((@IsNull_ServerName = 1 AND [ServerName] IS NULL) OR ([ServerName] = @Original_ServerName)) AND ((@IsNull_Catalog = 1 AND [Catalog] IS NULL) OR ([Catalog] = @Original_Catalog)) AND ((@IsNull_Username = 1 AND [Username] IS NULL) OR ([Username] = @Original_Username)) AND ((@IsNull_Password = 1 AND [Password] IS NULL) OR ([Password] = @Original_Password)) AND ((@IsNull_IntegratedSecurity = 1 AND [IntegratedSecurity] IS NULL) OR ([IntegratedSecurity] = @Original_IntegratedSecurity)) AND ((@IsNull_DuradosUser = 1 AND [DuradosUser] IS NULL) OR ([DuradosUser] = @Original_DuradosUser)))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UserId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UserId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AppId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AppId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Category", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Category", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Category", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Category", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ServerName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ServerName", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ServerName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ServerName", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Catalog", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Catalog", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Catalog", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Catalog", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Username", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Username", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Username", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Username", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Password", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Password", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Password", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Password", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_IntegratedSecurity", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IntegratedSecurity", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IntegratedSecurity", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IntegratedSecurity", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DuradosUser", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DuradosUser", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DuradosUser", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DuradosUser", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[durados_UserApp] ([UserId], [AppId], [Category]) VALUES (@User" + - "Id, @AppId, @Category);\r\nSELECT Id, UserId, AppId, Category FROM durados_UserApp" + - " WHERE (Id = SCOPE_IDENTITY())"; + this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[durados_SqlConnection] ([ServerName], [Catalog], [Username], [Password], [IntegratedSecurity], [DuradosUser]) VALUES (@ServerName, @Catalog, @Username, @Password, @IntegratedSecurity, @DuradosUser); +SELECT Id, ServerName, Catalog, Username, Password, IntegratedSecurity, DuradosUser FROM durados_SqlConnection WHERE (Id = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UserId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UserId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AppId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AppId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Category", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Category", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ServerName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ServerName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Catalog", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Catalog", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Username", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Username", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Password", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Password", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IntegratedSecurity", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IntegratedSecurity", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DuradosUser", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DuradosUser", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[durados_UserApp] SET [UserId] = @UserId, [AppId] = @AppId, [Category] = @Category WHERE (([Id] = @Original_Id) AND ([UserId] = @Original_UserId) AND ([AppId] = @Original_AppId) AND ((@IsNull_Category = 1 AND [Category] IS NULL) OR ([Category] = @Original_Category))); -SELECT Id, UserId, AppId, Category FROM durados_UserApp WHERE (Id = @Id)"; + this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[durados_SqlConnection] SET [ServerName] = @ServerName, [Catalog] = @Catalog, [Username] = @Username, [Password] = @Password, [IntegratedSecurity] = @IntegratedSecurity, [DuradosUser] = @DuradosUser WHERE (([Id] = @Original_Id) AND ((@IsNull_ServerName = 1 AND [ServerName] IS NULL) OR ([ServerName] = @Original_ServerName)) AND ((@IsNull_Catalog = 1 AND [Catalog] IS NULL) OR ([Catalog] = @Original_Catalog)) AND ((@IsNull_Username = 1 AND [Username] IS NULL) OR ([Username] = @Original_Username)) AND ((@IsNull_Password = 1 AND [Password] IS NULL) OR ([Password] = @Original_Password)) AND ((@IsNull_IntegratedSecurity = 1 AND [IntegratedSecurity] IS NULL) OR ([IntegratedSecurity] = @Original_IntegratedSecurity)) AND ((@IsNull_DuradosUser = 1 AND [DuradosUser] IS NULL) OR ([DuradosUser] = @Original_DuradosUser))); +SELECT Id, ServerName, Catalog, Username, Password, IntegratedSecurity, DuradosUser FROM durados_SqlConnection WHERE (Id = @Id)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UserId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UserId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AppId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AppId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Category", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Category", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ServerName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ServerName", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Catalog", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Catalog", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Username", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Username", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Password", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Password", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IntegratedSecurity", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IntegratedSecurity", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@DuradosUser", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DuradosUser", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UserId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UserId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AppId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AppId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Category", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Category", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Category", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Category", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ServerName", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ServerName", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ServerName", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ServerName", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Catalog", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Catalog", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Catalog", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Catalog", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Username", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Username", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Username", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Username", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Password", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Password", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Password", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Password", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_IntegratedSecurity", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IntegratedSecurity", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_IntegratedSecurity", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "IntegratedSecurity", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_DuradosUser", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DuradosUser", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_DuradosUser", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "DuradosUser", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } @@ -11954,7 +9551,8 @@ private void InitCommandCollection() { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT Id, UserId, AppId, Category FROM dbo.durados_UserApp"; + this._commandCollection[0].CommandText = "SELECT Id, ServerName, Catalog, Username, Password, IntegratedSecurity, DuradosUs" + + "er FROM durados_SqlConnection"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } @@ -11962,7 +9560,7 @@ private void InitCommandCollection() { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] - public virtual int Fill(MapDataSet.durados_UserAppDataTable dataTable) { + public virtual int Fill(MapDataSet.durados_SqlConnectionDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); @@ -11975,9 +9573,9 @@ public virtual int Fill(MapDataSet.durados_UserAppDataTable dataTable) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] - public virtual MapDataSet.durados_UserAppDataTable GetData() { + public virtual MapDataSet.durados_SqlConnectionDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; - MapDataSet.durados_UserAppDataTable dataTable = new MapDataSet.durados_UserAppDataTable(); + MapDataSet.durados_SqlConnectionDataTable dataTable = new MapDataSet.durados_SqlConnectionDataTable(); this.Adapter.Fill(dataTable); return dataTable; } @@ -11985,7 +9583,7 @@ public virtual MapDataSet.durados_UserAppDataTable GetData() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(MapDataSet.durados_UserAppDataTable dataTable) { + public virtual int Update(MapDataSet.durados_SqlConnectionDataTable dataTable) { return this.Adapter.Update(dataTable); } @@ -11993,7 +9591,7 @@ public virtual int Update(MapDataSet.durados_UserAppDataTable dataTable) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MapDataSet dataSet) { - return this.Adapter.Update(dataSet, "durados_UserApp"); + return this.Adapter.Update(dataSet, "durados_SqlConnection"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -12015,17 +9613,55 @@ public virtual int Update(global::System.Data.DataRow[] dataRows) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete(int Original_Id, int Original_UserId, int Original_AppId, string Original_Category) { + public virtual int Delete(int Original_Id, string Original_ServerName, string Original_Catalog, string Original_Username, string Original_Password, global::System.Nullable Original_IntegratedSecurity, global::System.Nullable Original_DuradosUser) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Id)); - this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_UserId)); - this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_AppId)); - if ((Original_Category == null)) { + if ((Original_ServerName == null)) { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_ServerName)); + } + if ((Original_Catalog == null)) { this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; } else { this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_Category)); + this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_Catalog)); + } + if ((Original_Username == null)) { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_Username)); + } + if ((Original_Password == null)) { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(Original_Password)); + } + if ((Original_IntegratedSecurity.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[10].Value = ((bool)(Original_IntegratedSecurity.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value; + } + if ((Original_DuradosUser.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[12].Value = ((int)(Original_DuradosUser.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value; } global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) @@ -12047,14 +9683,42 @@ public virtual int Delete(int Original_Id, int Original_UserId, int Original_App [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(int UserId, int AppId, string Category) { - this.Adapter.InsertCommand.Parameters[0].Value = ((int)(UserId)); - this.Adapter.InsertCommand.Parameters[1].Value = ((int)(AppId)); - if ((Category == null)) { + public virtual int Insert(string ServerName, string Catalog, string Username, string Password, global::System.Nullable IntegratedSecurity, global::System.Nullable DuradosUser) { + if ((ServerName == null)) { + this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = ((string)(ServerName)); + } + if ((Catalog == null)) { + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Catalog)); + } + if ((Username == null)) { this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; } else { - this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Category)); + this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Username)); + } + if ((Password == null)) { + this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Password)); + } + if ((IntegratedSecurity.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[4].Value = ((bool)(IntegratedSecurity.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((DuradosUser.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[5].Value = ((int)(DuradosUser.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; } global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) @@ -12076,27 +9740,93 @@ public virtual int Insert(int UserId, int AppId, string Category) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(int UserId, int AppId, string Category, int Original_Id, int Original_UserId, int Original_AppId, string Original_Category, int Id) { - this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(UserId)); - this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(AppId)); - if ((Category == null)) { + public virtual int Update(string ServerName, string Catalog, string Username, string Password, global::System.Nullable IntegratedSecurity, global::System.Nullable DuradosUser, int Original_Id, string Original_ServerName, string Original_Catalog, string Original_Username, string Original_Password, global::System.Nullable Original_IntegratedSecurity, global::System.Nullable Original_DuradosUser, int Id) { + if ((ServerName == null)) { + this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(ServerName)); + } + if ((Catalog == null)) { + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Catalog)); + } + if ((Username == null)) { this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Category)); + this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Username)); + } + if ((Password == null)) { + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Password)); + } + if ((IntegratedSecurity.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[4].Value = ((bool)(IntegratedSecurity.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((DuradosUser.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(DuradosUser.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; + } + this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_Id)); + if ((Original_ServerName == null)) { + this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_ServerName)); + } + if ((Original_Catalog == null)) { + this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_Catalog)); + } + if ((Original_Username == null)) { + this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_Username)); + } + if ((Original_Password == null)) { + this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_Password)); + } + if ((Original_IntegratedSecurity.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[16].Value = ((bool)(Original_IntegratedSecurity.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value; } - this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_Id)); - this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_UserId)); - this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_AppId)); - if ((Original_Category == null)) { - this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; + if ((Original_DuradosUser.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[18].Value = ((int)(Original_DuradosUser.Value)); } else { - this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_Category)); + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value; } - this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Id)); + this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(Id)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -12117,8 +9847,8 @@ public virtual int Update(int UserId, int AppId, string Category, int Original_I [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(int UserId, int AppId, string Category, int Original_Id, int Original_UserId, int Original_AppId, string Original_Category) { - return this.Update(UserId, AppId, Category, Original_Id, Original_UserId, Original_AppId, Original_Category, Original_Id); + public virtual int Update(string ServerName, string Catalog, string Username, string Password, global::System.Nullable IntegratedSecurity, global::System.Nullable DuradosUser, int Original_Id, string Original_ServerName, string Original_Catalog, string Original_Username, string Original_Password, global::System.Nullable Original_IntegratedSecurity, global::System.Nullable Original_DuradosUser) { + return this.Update(ServerName, Catalog, Username, Password, IntegratedSecurity, DuradosUser, Original_Id, Original_ServerName, Original_Catalog, Original_Username, Original_Password, Original_IntegratedSecurity, Original_DuradosUser, Original_Id); } } @@ -12131,7 +9861,7 @@ public virtual int Update(int UserId, int AppId, string Category, int Original_I [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public partial class durados_DataSourceTypeTableAdapter : global::System.ComponentModel.Component { + public partial class v_durados_UserTableAdapter : global::System.ComponentModel.Component { private global::System.Data.SqlClient.SqlDataAdapter _adapter; @@ -12145,7 +9875,7 @@ public partial class durados_DataSourceTypeTableAdapter : global::System.Compone [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_DataSourceTypeTableAdapter() { + public v_durados_UserTableAdapter() { this.ClearBeforeFill = true; } @@ -12242,44 +9972,22 @@ private void InitAdapter() { this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; - tableMapping.DataSetTable = "durados_DataSourceType"; - tableMapping.ColumnMappings.Add("Id", "Id"); - tableMapping.ColumnMappings.Add("Name", "Name"); - tableMapping.ColumnMappings.Add("Ordinal", "Ordinal"); + tableMapping.DataSetTable = "v_durados_User"; + tableMapping.ColumnMappings.Add("ID", "ID"); + tableMapping.ColumnMappings.Add("Username", "Username"); + tableMapping.ColumnMappings.Add("FirstName", "FirstName"); + tableMapping.ColumnMappings.Add("LastName", "LastName"); + tableMapping.ColumnMappings.Add("Email", "Email"); + tableMapping.ColumnMappings.Add("Password", "Password"); + tableMapping.ColumnMappings.Add("Role", "Role"); + tableMapping.ColumnMappings.Add("Guid", "Guid"); + tableMapping.ColumnMappings.Add("Signature", "Signature"); + tableMapping.ColumnMappings.Add("SignatureHTML", "SignatureHTML"); + tableMapping.ColumnMappings.Add("NewUser", "NewUser"); + tableMapping.ColumnMappings.Add("Comments", "Comments"); + tableMapping.ColumnMappings.Add("IsApproved", "IsApproved"); + tableMapping.ColumnMappings.Add("FullName", "FullName"); this._adapter.TableMappings.Add(tableMapping); - this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); - this._adapter.DeleteCommand.Connection = this.Connection; - this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[durados_DataSourceType] WHERE (([Id] = @Original_Id) AND ((@Is" + - "Null_Name = 1 AND [Name] IS NULL) OR ([Name] = @Original_Name)) AND ((@IsNull_Or" + - "dinal = 1 AND [Ordinal] IS NULL) OR ([Ordinal] = @Original_Ordinal)))"; - this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); - this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[durados_DataSourceType] ([Id], [Name], [Ordinal]) VALUES (@Id," + - " @Name, @Ordinal);\r\nSELECT Id, Name, Ordinal FROM durados_DataSourceType WHERE (" + - "Id = @Id)"; - this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); - this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[durados_DataSourceType] SET [Id] = @Id, [Name] = @Name, [Ordinal] = @Ordinal WHERE (([Id] = @Original_Id) AND ((@IsNull_Name = 1 AND [Name] IS NULL) OR ([Name] = @Original_Name)) AND ((@IsNull_Ordinal = 1 AND [Ordinal] IS NULL) OR ([Ordinal] = @Original_Ordinal))); -SELECT Id, Name, Ordinal FROM durados_DataSourceType WHERE (Id = @Id)"; - this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -12295,7 +10003,9 @@ private void InitCommandCollection() { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT Id, Name, Ordinal FROM dbo.durados_DataSourceType"; + this._commandCollection[0].CommandText = "SELECT ID, Username, FirstName, LastName, Email, Password, Role, Guid, Signature," + + " SignatureHTML, IsApproved, NewUser, Comments, FullName\r\nFROM v_durados_User" + + ""; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } @@ -12303,7 +10013,7 @@ private void InitCommandCollection() { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] - public virtual int Fill(MapDataSet.durados_DataSourceTypeDataTable dataTable) { + public virtual int Fill(MapDataSet.v_durados_UserDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); @@ -12316,171 +10026,11 @@ public virtual int Fill(MapDataSet.durados_DataSourceTypeDataTable dataTable) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] - public virtual MapDataSet.durados_DataSourceTypeDataTable GetData() { + public virtual MapDataSet.v_durados_UserDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; - MapDataSet.durados_DataSourceTypeDataTable dataTable = new MapDataSet.durados_DataSourceTypeDataTable(); + MapDataSet.v_durados_UserDataTable dataTable = new MapDataSet.v_durados_UserDataTable(); this.Adapter.Fill(dataTable); - return dataTable; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(MapDataSet.durados_DataSourceTypeDataTable dataTable) { - return this.Adapter.Update(dataTable); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(MapDataSet dataSet) { - return this.Adapter.Update(dataSet, "durados_DataSourceType"); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(global::System.Data.DataRow dataRow) { - return this.Adapter.Update(new global::System.Data.DataRow[] { - dataRow}); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(global::System.Data.DataRow[] dataRows) { - return this.Adapter.Update(dataRows); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete(int Original_Id, string Original_Name, global::System.Nullable Original_Ordinal) { - this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Id)); - if ((Original_Name == null)) { - this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; - } - else { - this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Name)); - } - if ((Original_Ordinal.HasValue == true)) { - this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_Ordinal.Value)); - } - else { - this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; - } - global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; - if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.DeleteCommand.Connection.Open(); - } - try { - int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); - return returnValue; - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.DeleteCommand.Connection.Close(); - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(int Id, string Name, global::System.Nullable Ordinal) { - this.Adapter.InsertCommand.Parameters[0].Value = ((int)(Id)); - if ((Name == null)) { - this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; - } - else { - this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Name)); - } - if ((Ordinal.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[2].Value = ((int)(Ordinal.Value)); - } - else { - this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; - } - global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; - if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.InsertCommand.Connection.Open(); - } - try { - int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); - return returnValue; - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.InsertCommand.Connection.Close(); - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(int Id, string Name, global::System.Nullable Ordinal, int Original_Id, string Original_Name, global::System.Nullable Original_Ordinal) { - this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(Id)); - if ((Name == null)) { - this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Name)); - } - if ((Ordinal.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Ordinal.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; - } - this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_Id)); - if ((Original_Name == null)) { - this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_Name)); - } - if ((Original_Ordinal.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_Ordinal.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; - } - global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; - if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) - != global::System.Data.ConnectionState.Open)) { - this.Adapter.UpdateCommand.Connection.Open(); - } - try { - int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); - return returnValue; - } - finally { - if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { - this.Adapter.UpdateCommand.Connection.Close(); - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(string Name, global::System.Nullable Ordinal, int Original_Id, string Original_Name, global::System.Nullable Original_Ordinal) { - return this.Update(Original_Id, Name, Ordinal, Original_Id, Original_Name, Original_Ordinal); + return dataTable; } } @@ -12493,7 +10043,7 @@ public virtual int Update(string Name, global::System.Nullable Ordinal, int [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public partial class durados_DnsAliasTableAdapter : global::System.ComponentModel.Component { + public partial class durados_UserAliasTableAdapter : global::System.ComponentModel.Component { private global::System.Data.SqlClient.SqlDataAdapter _adapter; @@ -12507,7 +10057,7 @@ public partial class durados_DnsAliasTableAdapter : global::System.ComponentMode [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_DnsAliasTableAdapter() { + public durados_UserAliasTableAdapter() { this.ClearBeforeFill = true; } @@ -12604,40 +10154,38 @@ private void InitAdapter() { this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; - tableMapping.DataSetTable = "durados_DnsAlias"; + tableMapping.DataSetTable = "durados_UserAlias"; tableMapping.ColumnMappings.Add("Id", "Id"); + tableMapping.ColumnMappings.Add("MainUsername", "MainUsername"); tableMapping.ColumnMappings.Add("Alias", "Alias"); - tableMapping.ColumnMappings.Add("AppId", "AppId"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; - this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[durados_DnsAlias] WHERE (([Id] = @Original_Id) AND ([Alias] = " + - "@Original_Alias) AND ([AppId] = @Original_AppId))"; + this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[durados_UserAlias] WHERE (([Id] = @Original_Id) AND ([MainUser" + + "name] = @Original_MainUsername) AND ([Alias] = @Original_Alias))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Alias", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Alias", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AppId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AppId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MainUsername", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MainUsername", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Alias", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Alias", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[durados_DnsAlias] ([Id], [Alias], [AppId]) VALUES (@Id, @Alias" + - ", @AppId);\r\nSELECT Id, Alias, AppId FROM durados_DnsAlias WHERE (Id = @Id)"; + this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[durados_UserAlias] ([MainUsername], [Alias]) VALUES (@MainUser" + + "name, @Alias);\r\nSELECT Id, MainUsername, Alias FROM durados_UserAlias WHERE (Id " + + "= SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Alias", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Alias", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AppId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AppId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MainUsername", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MainUsername", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Alias", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Alias", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[durados_DnsAlias] SET [Id] = @Id, [Alias] = @Alias, [AppId] = @AppI" + - "d WHERE (([Id] = @Original_Id) AND ([Alias] = @Original_Alias) AND ([AppId] = @O" + - "riginal_AppId));\r\nSELECT Id, Alias, AppId FROM durados_DnsAlias WHERE (Id = @Id)" + - ""; + this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[durados_UserAlias] SET [MainUsername] = @MainUsername, [Alias] = @Alias WHERE (([Id] = @Original_Id) AND ([MainUsername] = @Original_MainUsername) AND ([Alias] = @Original_Alias)); +SELECT Id, MainUsername, Alias FROM durados_UserAlias WHERE (Id = @Id)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Alias", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Alias", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AppId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AppId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MainUsername", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MainUsername", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Alias", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Alias", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Alias", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Alias", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AppId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AppId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MainUsername", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MainUsername", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Alias", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Alias", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -12653,7 +10201,7 @@ private void InitCommandCollection() { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT Id, Alias, AppId FROM dbo.durados_DnsAlias"; + this._commandCollection[0].CommandText = "SELECT Id, MainUsername, Alias FROM dbo.durados_UserAlias"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } @@ -12661,7 +10209,7 @@ private void InitCommandCollection() { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] - public virtual int Fill(MapDataSet.durados_DnsAliasDataTable dataTable) { + public virtual int Fill(MapDataSet.durados_UserAliasDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); @@ -12674,9 +10222,9 @@ public virtual int Fill(MapDataSet.durados_DnsAliasDataTable dataTable) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] - public virtual MapDataSet.durados_DnsAliasDataTable GetData() { + public virtual MapDataSet.durados_UserAliasDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; - MapDataSet.durados_DnsAliasDataTable dataTable = new MapDataSet.durados_DnsAliasDataTable(); + MapDataSet.durados_UserAliasDataTable dataTable = new MapDataSet.durados_UserAliasDataTable(); this.Adapter.Fill(dataTable); return dataTable; } @@ -12684,7 +10232,7 @@ public virtual MapDataSet.durados_DnsAliasDataTable GetData() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(MapDataSet.durados_DnsAliasDataTable dataTable) { + public virtual int Update(MapDataSet.durados_UserAliasDataTable dataTable) { return this.Adapter.Update(dataTable); } @@ -12692,7 +10240,7 @@ public virtual int Update(MapDataSet.durados_DnsAliasDataTable dataTable) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MapDataSet dataSet) { - return this.Adapter.Update(dataSet, "durados_DnsAlias"); + return this.Adapter.Update(dataSet, "durados_UserAlias"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -12714,15 +10262,10 @@ public virtual int Update(global::System.Data.DataRow[] dataRows) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete(int Original_Id, string Original_Alias, int Original_AppId) { + public virtual int Delete(int Original_Id, int Original_MainUsername, int Original_Alias) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Id)); - if ((Original_Alias == null)) { - throw new global::System.ArgumentNullException("Original_Alias"); - } - else { - this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Alias)); - } - this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_AppId)); + this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_MainUsername)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_Alias)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -12743,15 +10286,9 @@ public virtual int Delete(int Original_Id, string Original_Alias, int Original_A [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(int Id, string Alias, int AppId) { - this.Adapter.InsertCommand.Parameters[0].Value = ((int)(Id)); - if ((Alias == null)) { - throw new global::System.ArgumentNullException("Alias"); - } - else { - this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Alias)); - } - this.Adapter.InsertCommand.Parameters[2].Value = ((int)(AppId)); + public virtual int Insert(int MainUsername, int Alias) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(MainUsername)); + this.Adapter.InsertCommand.Parameters[1].Value = ((int)(Alias)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -12772,23 +10309,13 @@ public virtual int Insert(int Id, string Alias, int AppId) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(int Id, string Alias, int AppId, int Original_Id, string Original_Alias, int Original_AppId) { - this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(Id)); - if ((Alias == null)) { - throw new global::System.ArgumentNullException("Alias"); - } - else { - this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Alias)); - } - this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(AppId)); - this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_Id)); - if ((Original_Alias == null)) { - throw new global::System.ArgumentNullException("Original_Alias"); - } - else { - this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_Alias)); - } - this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_AppId)); + public virtual int Update(int MainUsername, int Alias, int Original_Id, int Original_MainUsername, int Original_Alias, int Id) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(MainUsername)); + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Alias)); + this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_Id)); + this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_MainUsername)); + this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_Alias)); + this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Id)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -12809,8 +10336,8 @@ public virtual int Update(int Id, string Alias, int AppId, int Original_Id, stri [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(string Alias, int AppId, int Original_Id, string Original_Alias, int Original_AppId) { - return this.Update(Original_Id, Alias, AppId, Original_Id, Original_Alias, Original_AppId); + public virtual int Update(int MainUsername, int Alias, int Original_Id, int Original_MainUsername, int Original_Alias) { + return this.Update(MainUsername, Alias, Original_Id, Original_MainUsername, Original_Alias, Original_Id); } } @@ -12823,7 +10350,7 @@ public virtual int Update(string Alias, int AppId, int Original_Id, string Origi [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public partial class durados_SqlProductTableAdapter : global::System.ComponentModel.Component { + public partial class durados_UserAppTableAdapter : global::System.ComponentModel.Component { private global::System.Data.SqlClient.SqlDataAdapter _adapter; @@ -12837,7 +10364,7 @@ public partial class durados_SqlProductTableAdapter : global::System.ComponentMo [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_SqlProductTableAdapter() { + public durados_UserAppTableAdapter() { this.ClearBeforeFill = true; } @@ -12934,41 +10461,45 @@ private void InitAdapter() { this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; - tableMapping.DataSetTable = "durados_SqlProduct"; + tableMapping.DataSetTable = "durados_UserApp"; tableMapping.ColumnMappings.Add("Id", "Id"); - tableMapping.ColumnMappings.Add("Name", "Name"); - tableMapping.ColumnMappings.Add("Ordinal", "Ordinal"); + tableMapping.ColumnMappings.Add("UserId", "UserId"); + tableMapping.ColumnMappings.Add("AppId", "AppId"); + tableMapping.ColumnMappings.Add("Category", "Category"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; - this._adapter.DeleteCommand.CommandText = "DELETE FROM [durados_SqlProduct] WHERE (([Id] = @Original_Id) AND ((@IsNull_Name " + - "= 1 AND [Name] IS NULL) OR ([Name] = @Original_Name)) AND ((@IsNull_Ordinal = 1 " + - "AND [Ordinal] IS NULL) OR ([Ordinal] = @Original_Ordinal)))"; + this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[durados_UserApp] WHERE (([Id] = @Original_Id) AND ([UserId] = " + + "@Original_UserId) AND ([AppId] = @Original_AppId) AND ((@IsNull_Category = 1 AND" + + " [Category] IS NULL) OR ([Category] = @Original_Category)))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UserId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UserId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AppId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AppId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Category", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Category", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Category", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Category", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = "INSERT INTO [durados_SqlProduct] ([Name], [Ordinal]) VALUES (@Name, @Ordinal);\r\nS" + - "ELECT Id, Name, Ordinal FROM durados_SqlProduct WHERE (Id = SCOPE_IDENTITY())"; + this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[durados_UserApp] ([UserId], [AppId], [Category]) VALUES (@User" + + "Id, @AppId, @Category);\r\nSELECT Id, UserId, AppId, Category FROM durados_UserApp" + + " WHERE (Id = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UserId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UserId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AppId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AppId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Category", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Category", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = @"UPDATE [durados_SqlProduct] SET [Name] = @Name, [Ordinal] = @Ordinal WHERE (([Id] = @Original_Id) AND ((@IsNull_Name = 1 AND [Name] IS NULL) OR ([Name] = @Original_Name)) AND ((@IsNull_Ordinal = 1 AND [Ordinal] IS NULL) OR ([Ordinal] = @Original_Ordinal))); -SELECT Id, Name, Ordinal FROM durados_SqlProduct WHERE (Id = @Id)"; + this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[durados_UserApp] SET [UserId] = @UserId, [AppId] = @AppId, [Category] = @Category WHERE (([Id] = @Original_Id) AND ([UserId] = @Original_UserId) AND ([AppId] = @Original_AppId) AND ((@IsNull_Category = 1 AND [Category] IS NULL) OR ([Category] = @Original_Category))); +SELECT Id, UserId, AppId, Category FROM durados_UserApp WHERE (Id = @Id)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@UserId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UserId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AppId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AppId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Category", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Category", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_UserId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "UserId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AppId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AppId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Category", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Category", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Category", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Category", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } @@ -12985,7 +10516,7 @@ private void InitCommandCollection() { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT durados_SqlProduct.*\r\nFROM durados_SqlProduct"; + this._commandCollection[0].CommandText = "SELECT Id, UserId, AppId, Category FROM dbo.durados_UserApp"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } @@ -12993,7 +10524,7 @@ private void InitCommandCollection() { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] - public virtual int Fill(MapDataSet.durados_SqlProductDataTable dataTable) { + public virtual int Fill(MapDataSet.durados_UserAppDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); @@ -13006,9 +10537,9 @@ public virtual int Fill(MapDataSet.durados_SqlProductDataTable dataTable) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] - public virtual MapDataSet.durados_SqlProductDataTable GetData() { + public virtual MapDataSet.durados_UserAppDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; - MapDataSet.durados_SqlProductDataTable dataTable = new MapDataSet.durados_SqlProductDataTable(); + MapDataSet.durados_UserAppDataTable dataTable = new MapDataSet.durados_UserAppDataTable(); this.Adapter.Fill(dataTable); return dataTable; } @@ -13016,7 +10547,7 @@ public virtual MapDataSet.durados_SqlProductDataTable GetData() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(MapDataSet.durados_SqlProductDataTable dataTable) { + public virtual int Update(MapDataSet.durados_UserAppDataTable dataTable) { return this.Adapter.Update(dataTable); } @@ -13024,7 +10555,7 @@ public virtual int Update(MapDataSet.durados_SqlProductDataTable dataTable) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MapDataSet dataSet) { - return this.Adapter.Update(dataSet, "durados_SqlProduct"); + return this.Adapter.Update(dataSet, "durados_UserApp"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -13046,23 +10577,17 @@ public virtual int Update(global::System.Data.DataRow[] dataRows) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete(int Original_Id, string Original_Name, global::System.Nullable Original_Ordinal) { + public virtual int Delete(int Original_Id, int Original_UserId, int Original_AppId, string Original_Category) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Id)); - if ((Original_Name == null)) { - this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_UserId)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_AppId)); + if ((Original_Category == null)) { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; } else { - this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Name)); - } - if ((Original_Ordinal.HasValue == true)) { this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_Ordinal.Value)); - } - else { - this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; + this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_Category)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) @@ -13084,18 +10609,14 @@ public virtual int Delete(int Original_Id, string Original_Name, global::System. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(string Name, global::System.Nullable Ordinal) { - if ((Name == null)) { - this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value; - } - else { - this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name)); - } - if ((Ordinal.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[1].Value = ((int)(Ordinal.Value)); + public virtual int Insert(int UserId, int AppId, string Category) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(UserId)); + this.Adapter.InsertCommand.Parameters[1].Value = ((int)(AppId)); + if ((Category == null)) { + this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; } else { - this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Category)); } global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) @@ -13117,37 +10638,27 @@ public virtual int Insert(string Name, global::System.Nullable Ordinal) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(string Name, global::System.Nullable Ordinal, int Original_Id, string Original_Name, global::System.Nullable Original_Ordinal, int Id) { - if ((Name == null)) { - this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name)); - } - if ((Ordinal.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Ordinal.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; - } - this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_Id)); - if ((Original_Name == null)) { - this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + public virtual int Update(int UserId, int AppId, string Category, int Original_Id, int Original_UserId, int Original_AppId, string Original_Category, int Id) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(UserId)); + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(AppId)); + if ((Category == null)) { + this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_Name)); + this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Category)); } - if ((Original_Ordinal.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[5].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_Ordinal.Value)); + this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_Id)); + this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_UserId)); + this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_AppId)); + if ((Original_Category == null)) { + this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[5].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_Category)); } - this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Id)); + this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Id)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -13168,8 +10679,8 @@ public virtual int Update(string Name, global::System.Nullable Ordinal, int [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(string Name, global::System.Nullable Ordinal, int Original_Id, string Original_Name, global::System.Nullable Original_Ordinal) { - return this.Update(Name, Ordinal, Original_Id, Original_Name, Original_Ordinal, Original_Id); + public virtual int Update(int UserId, int AppId, string Category, int Original_Id, int Original_UserId, int Original_AppId, string Original_Category) { + return this.Update(UserId, AppId, Category, Original_Id, Original_UserId, Original_AppId, Original_Category, Original_Id); } } @@ -13182,7 +10693,7 @@ public virtual int Update(string Name, global::System.Nullable Ordinal, int [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public partial class durados_ThemeTableAdapter : global::System.ComponentModel.Component { + public partial class durados_DataSourceTypeTableAdapter : global::System.ComponentModel.Component { private global::System.Data.SqlClient.SqlDataAdapter _adapter; @@ -13196,7 +10707,7 @@ public partial class durados_ThemeTableAdapter : global::System.ComponentModel.C [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_ThemeTableAdapter() { + public durados_DataSourceTypeTableAdapter() { this.ClearBeforeFill = true; } @@ -13293,40 +10804,44 @@ private void InitAdapter() { this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; - tableMapping.DataSetTable = "durados_Theme"; + tableMapping.DataSetTable = "durados_DataSourceType"; tableMapping.ColumnMappings.Add("Id", "Id"); tableMapping.ColumnMappings.Add("Name", "Name"); - tableMapping.ColumnMappings.Add("RelativePath", "RelativePath"); + tableMapping.ColumnMappings.Add("Ordinal", "Ordinal"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; - this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[durados_Theme] WHERE (([Id] = @Original_Id) AND ([Name] = @Ori" + - "ginal_Name) AND ([RelativePath] = @Original_RelativePath))"; + this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[durados_DataSourceType] WHERE (([Id] = @Original_Id) AND ((@Is" + + "Null_Name = 1 AND [Name] IS NULL) OR ([Name] = @Original_Name)) AND ((@IsNull_Or" + + "dinal = 1 AND [Ordinal] IS NULL) OR ([Ordinal] = @Original_Ordinal)))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_RelativePath", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RelativePath", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[durados_Theme] ([Name], [RelativePath]) VALUES (@Name, @Relati" + - "vePath);\r\nSELECT Id, Name, RelativePath FROM durados_Theme WHERE (Id = SCOPE_IDE" + - "NTITY())"; + this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[durados_DataSourceType] ([Id], [Name], [Ordinal]) VALUES (@Id," + + " @Name, @Ordinal);\r\nSELECT Id, Name, Ordinal FROM durados_DataSourceType WHERE (" + + "Id = @Id)"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RelativePath", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RelativePath", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[durados_Theme] SET [Name] = @Name, [RelativePath] = @RelativePath W" + - "HERE (([Id] = @Original_Id) AND ([Name] = @Original_Name) AND ([RelativePath] = " + - "@Original_RelativePath));\r\nSELECT Id, Name, RelativePath FROM durados_Theme WHER" + - "E (Id = @Id)"; + this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[durados_DataSourceType] SET [Id] = @Id, [Name] = @Name, [Ordinal] = @Ordinal WHERE (([Id] = @Original_Id) AND ((@IsNull_Name = 1 AND [Name] IS NULL) OR ([Name] = @Original_Name)) AND ((@IsNull_Ordinal = 1 AND [Ordinal] IS NULL) OR ([Ordinal] = @Original_Ordinal))); +SELECT Id, Name, Ordinal FROM durados_DataSourceType WHERE (Id = @Id)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RelativePath", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RelativePath", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_RelativePath", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RelativePath", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -13342,7 +10857,7 @@ private void InitCommandCollection() { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT Id, Name, RelativePath FROM dbo.durados_Theme"; + this._commandCollection[0].CommandText = "SELECT Id, Name, Ordinal FROM dbo.durados_DataSourceType"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } @@ -13350,7 +10865,7 @@ private void InitCommandCollection() { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] - public virtual int Fill(MapDataSet.durados_ThemeDataTable dataTable) { + public virtual int Fill(MapDataSet.durados_DataSourceTypeDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); @@ -13363,9 +10878,9 @@ public virtual int Fill(MapDataSet.durados_ThemeDataTable dataTable) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] - public virtual MapDataSet.durados_ThemeDataTable GetData() { + public virtual MapDataSet.durados_DataSourceTypeDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; - MapDataSet.durados_ThemeDataTable dataTable = new MapDataSet.durados_ThemeDataTable(); + MapDataSet.durados_DataSourceTypeDataTable dataTable = new MapDataSet.durados_DataSourceTypeDataTable(); this.Adapter.Fill(dataTable); return dataTable; } @@ -13373,7 +10888,7 @@ public virtual MapDataSet.durados_ThemeDataTable GetData() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(MapDataSet.durados_ThemeDataTable dataTable) { + public virtual int Update(MapDataSet.durados_DataSourceTypeDataTable dataTable) { return this.Adapter.Update(dataTable); } @@ -13381,7 +10896,7 @@ public virtual int Update(MapDataSet.durados_ThemeDataTable dataTable) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MapDataSet dataSet) { - return this.Adapter.Update(dataSet, "durados_Theme"); + return this.Adapter.Update(dataSet, "durados_DataSourceType"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -13403,19 +10918,23 @@ public virtual int Update(global::System.Data.DataRow[] dataRows) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete(int Original_Id, string Original_Name, string Original_RelativePath) { + public virtual int Delete(int Original_Id, string Original_Name, global::System.Nullable Original_Ordinal) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Id)); if ((Original_Name == null)) { - throw new global::System.ArgumentNullException("Original_Name"); + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; } else { - this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name)); + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Name)); } - if ((Original_RelativePath == null)) { - throw new global::System.ArgumentNullException("Original_RelativePath"); + if ((Original_Ordinal.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_Ordinal.Value)); } else { - this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_RelativePath)); + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; } global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) @@ -13437,18 +10956,19 @@ public virtual int Delete(int Original_Id, string Original_Name, string Original [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(string Name, string RelativePath) { + public virtual int Insert(int Id, string Name, global::System.Nullable Ordinal) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(Id)); if ((Name == null)) { - throw new global::System.ArgumentNullException("Name"); + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; } else { - this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name)); + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Name)); } - if ((RelativePath == null)) { - throw new global::System.ArgumentNullException("RelativePath"); + if ((Ordinal.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[2].Value = ((int)(Ordinal.Value)); } else { - this.Adapter.InsertCommand.Parameters[1].Value = ((string)(RelativePath)); + this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; } global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) @@ -13470,33 +10990,37 @@ public virtual int Insert(string Name, string RelativePath) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(string Name, string RelativePath, int Original_Id, string Original_Name, string Original_RelativePath, int Id) { + public virtual int Update(int Id, string Name, global::System.Nullable Ordinal, int Original_Id, string Original_Name, global::System.Nullable Original_Ordinal) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(Id)); if ((Name == null)) { - throw new global::System.ArgumentNullException("Name"); + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name)); + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Name)); } - if ((RelativePath == null)) { - throw new global::System.ArgumentNullException("RelativePath"); + if ((Ordinal.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Ordinal.Value)); } else { - this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(RelativePath)); + this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; } - this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_Id)); + this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_Id)); if ((Original_Name == null)) { - throw new global::System.ArgumentNullException("Original_Name"); + this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_Name)); + this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_Name)); } - if ((Original_RelativePath == null)) { - throw new global::System.ArgumentNullException("Original_RelativePath"); + if ((Original_Ordinal.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_Ordinal.Value)); } else { - this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_RelativePath)); + this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; } - this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Id)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -13517,8 +11041,8 @@ public virtual int Update(string Name, string RelativePath, int Original_Id, str [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(string Name, string RelativePath, int Original_Id, string Original_Name, string Original_RelativePath) { - return this.Update(Name, RelativePath, Original_Id, Original_Name, Original_RelativePath, Original_Id); + public virtual int Update(string Name, global::System.Nullable Ordinal, int Original_Id, string Original_Name, global::System.Nullable Original_Ordinal) { + return this.Update(Original_Id, Name, Ordinal, Original_Id, Original_Name, Original_Ordinal); } } @@ -13531,7 +11055,7 @@ public virtual int Update(string Name, string RelativePath, int Original_Id, str [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public partial class durados_AppStatTableAdapter : global::System.ComponentModel.Component { + public partial class durados_SqlProductTableAdapter : global::System.ComponentModel.Component { private global::System.Data.SqlClient.SqlDataAdapter _adapter; @@ -13545,7 +11069,7 @@ public partial class durados_AppStatTableAdapter : global::System.ComponentModel [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public durados_AppStatTableAdapter() { + public durados_SqlProductTableAdapter() { this.ClearBeforeFill = true; } @@ -13642,56 +11166,42 @@ private void InitAdapter() { this._adapter = new global::System.Data.SqlClient.SqlDataAdapter(); global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; - tableMapping.DataSetTable = "durados_AppStat"; + tableMapping.DataSetTable = "durados_SqlProduct"; tableMapping.ColumnMappings.Add("Id", "Id"); - tableMapping.ColumnMappings.Add("AppId", "AppId"); tableMapping.ColumnMappings.Add("Name", "Name"); - tableMapping.ColumnMappings.Add("Value", "Value"); - tableMapping.ColumnMappings.Add("Date", "Date"); + tableMapping.ColumnMappings.Add("Ordinal", "Ordinal"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; - this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[durados_AppStat] WHERE (([Id] = @Original_Id) AND ((@IsNull_AppId = 1 AND [AppId] IS NULL) OR ([AppId] = @Original_AppId)) AND ((@IsNull_Name = 1 AND [Name] IS NULL) OR ([Name] = @Original_Name)) AND ((@IsNull_Value = 1 AND [Value] IS NULL) OR ([Value] = @Original_Value)) AND ((@IsNull_Date = 1 AND [Date] IS NULL) OR ([Date] = @Original_Date)))"; + this._adapter.DeleteCommand.CommandText = "DELETE FROM [durados_SqlProduct] WHERE (([Id] = @Original_Id) AND ((@IsNull_Name " + + "= 1 AND [Name] IS NULL) OR ([Name] = @Original_Name)) AND ((@IsNull_Ordinal = 1 " + + "AND [Ordinal] IS NULL) OR ([Ordinal] = @Original_Ordinal)))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_AppId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AppId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AppId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AppId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Value", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Value", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Value", global::System.Data.SqlDbType.Real, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Value", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Date", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Date", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Date", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Date", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[durados_AppStat] ([Id], [AppId], [Name], [Value], [Date]) VALU" + - "ES (@Id, @AppId, @Name, @Value, @Date);\r\nSELECT Id, AppId, Name, Value, Date FRO" + - "M durados_AppStat WHERE (Id = @Id)"; + this._adapter.InsertCommand.CommandText = "INSERT INTO [durados_SqlProduct] ([Name], [Ordinal]) VALUES (@Name, @Ordinal);\r\nS" + + "ELECT Id, Name, Ordinal FROM durados_SqlProduct WHERE (Id = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AppId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AppId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Value", global::System.Data.SqlDbType.Real, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Value", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Date", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Date", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[durados_AppStat] SET [Id] = @Id, [AppId] = @AppId, [Name] = @Name, [Value] = @Value, [Date] = @Date WHERE (([Id] = @Original_Id) AND ((@IsNull_AppId = 1 AND [AppId] IS NULL) OR ([AppId] = @Original_AppId)) AND ((@IsNull_Name = 1 AND [Name] IS NULL) OR ([Name] = @Original_Name)) AND ((@IsNull_Value = 1 AND [Value] IS NULL) OR ([Value] = @Original_Value)) AND ((@IsNull_Date = 1 AND [Date] IS NULL) OR ([Date] = @Original_Date))); -SELECT Id, AppId, Name, Value, Date FROM durados_AppStat WHERE (Id = @Id)"; + this._adapter.UpdateCommand.CommandText = @"UPDATE [durados_SqlProduct] SET [Name] = @Name, [Ordinal] = @Ordinal WHERE (([Id] = @Original_Id) AND ((@IsNull_Name = 1 AND [Name] IS NULL) OR ([Name] = @Original_Name)) AND ((@IsNull_Ordinal = 1 AND [Ordinal] IS NULL) OR ([Ordinal] = @Original_Ordinal))); +SELECT Id, Name, Ordinal FROM durados_SqlProduct WHERE (Id = @Id)"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AppId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AppId", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Value", global::System.Data.SqlDbType.Real, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Value", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Date", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Date", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_AppId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AppId", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AppId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AppId", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Value", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Value", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Value", global::System.Data.SqlDbType.Real, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Value", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Date", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Date", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); - this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Date", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Date", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Ordinal", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ordinal", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -13707,7 +11217,7 @@ private void InitCommandCollection() { this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; - this._commandCollection[0].CommandText = "SELECT Id, AppId, Name, Value, Date FROM dbo.durados_AppStat"; + this._commandCollection[0].CommandText = "SELECT durados_SqlProduct.*\r\nFROM durados_SqlProduct"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; } @@ -13715,7 +11225,7 @@ private void InitCommandCollection() { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] - public virtual int Fill(MapDataSet.durados_AppStatDataTable dataTable) { + public virtual int Fill(MapDataSet.durados_SqlProductDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); @@ -13728,9 +11238,9 @@ public virtual int Fill(MapDataSet.durados_AppStatDataTable dataTable) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] - public virtual MapDataSet.durados_AppStatDataTable GetData() { + public virtual MapDataSet.durados_SqlProductDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; - MapDataSet.durados_AppStatDataTable dataTable = new MapDataSet.durados_AppStatDataTable(); + MapDataSet.durados_SqlProductDataTable dataTable = new MapDataSet.durados_SqlProductDataTable(); this.Adapter.Fill(dataTable); return dataTable; } @@ -13738,7 +11248,7 @@ public virtual MapDataSet.durados_AppStatDataTable GetData() { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - public virtual int Update(MapDataSet.durados_AppStatDataTable dataTable) { + public virtual int Update(MapDataSet.durados_SqlProductDataTable dataTable) { return this.Adapter.Update(dataTable); } @@ -13746,7 +11256,7 @@ public virtual int Update(MapDataSet.durados_AppStatDataTable dataTable) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] public virtual int Update(MapDataSet dataSet) { - return this.Adapter.Update(dataSet, "durados_AppStat"); + return this.Adapter.Update(dataSet, "durados_SqlProduct"); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -13768,39 +11278,23 @@ public virtual int Update(global::System.Data.DataRow[] dataRows) { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete(int Original_Id, global::System.Nullable Original_AppId, string Original_Name, global::System.Nullable Original_Value, global::System.Nullable Original_Date) { + public virtual int Delete(int Original_Id, string Original_Name, global::System.Nullable Original_Ordinal) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Id)); - if ((Original_AppId.HasValue == true)) { - this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_AppId.Value)); - } - else { + if ((Original_Name == null)) { this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; } - if ((Original_Name == null)) { - this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; - } - else { - this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_Name)); - } - if ((Original_Value.HasValue == true)) { - this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[6].Value = ((float)(Original_Value.Value)); - } else { - this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Name)); } - if ((Original_Date.HasValue == true)) { - this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); - this.Adapter.DeleteCommand.Parameters[8].Value = ((System.DateTime)(Original_Date.Value)); + if ((Original_Ordinal.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_Ordinal.Value)); } else { - this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); - this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value; + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; } global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) @@ -13822,31 +11316,18 @@ public virtual int Delete(int Original_Id, global::System.Nullable Original [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(int Id, global::System.Nullable AppId, string Name, global::System.Nullable Value, global::System.Nullable Date) { - this.Adapter.InsertCommand.Parameters[0].Value = ((int)(Id)); - if ((AppId.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[1].Value = ((int)(AppId.Value)); - } - else { - this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; - } + public virtual int Insert(string Name, global::System.Nullable Ordinal) { if ((Name == null)) { - this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; - } - else { - this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Name)); - } - if ((Value.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[3].Value = ((float)(Value.Value)); + this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value; } else { - this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; + this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name)); } - if ((Date.HasValue == true)) { - this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(Date.Value)); + if ((Ordinal.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[1].Value = ((int)(Ordinal.Value)); } else { - this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; } global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) @@ -13868,65 +11349,37 @@ public virtual int Insert(int Id, global::System.Nullable AppId, string Nam [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(int Id, global::System.Nullable AppId, string Name, global::System.Nullable Value, global::System.Nullable Date, int Original_Id, global::System.Nullable Original_AppId, string Original_Name, global::System.Nullable Original_Value, global::System.Nullable Original_Date) { - this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(Id)); - if ((AppId.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(AppId.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; - } + public virtual int Update(string Name, global::System.Nullable Ordinal, int Original_Id, string Original_Name, global::System.Nullable Original_Ordinal, int Id) { if ((Name == null)) { - this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Name)); - } - if ((Value.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[3].Value = ((float)(Value.Value)); - } - else { - this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; - } - if ((Date.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(Date.Value)); + this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name)); } - this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_Id)); - if ((Original_AppId.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_AppId.Value)); + if ((Ordinal.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Ordinal.Value)); } else { - this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; } + this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_Id)); if ((Original_Name == null)) { - this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[9].Value = ((string)(Original_Name)); - } - if ((Original_Value.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[11].Value = ((float)(Original_Value.Value)); + this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_Name)); } - if ((Original_Date.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[13].Value = ((System.DateTime)(Original_Date.Value)); + if ((Original_Ordinal.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[5].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_Ordinal.Value)); } else { - this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[13].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[5].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; } + this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Id)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -13947,8 +11400,8 @@ public virtual int Update(int Id, global::System.Nullable AppId, string Nam [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] - public virtual int Update(global::System.Nullable AppId, string Name, global::System.Nullable Value, global::System.Nullable Date, int Original_Id, global::System.Nullable Original_AppId, string Original_Name, global::System.Nullable Original_Value, global::System.Nullable Original_Date) { - return this.Update(Original_Id, AppId, Name, Value, Date, Original_Id, Original_AppId, Original_Name, Original_Value, Original_Date); + public virtual int Update(string Name, global::System.Nullable Ordinal, int Original_Id, string Original_Name, global::System.Nullable Original_Ordinal) { + return this.Update(Name, Ordinal, Original_Id, Original_Name, Original_Ordinal, Original_Id); } } @@ -15284,14 +12737,8 @@ public partial class TableAdapterManager : global::System.ComponentModel.Compone private durados_DataSourceTypeTableAdapter _durados_DataSourceTypeTableAdapter; - private durados_DnsAliasTableAdapter _durados_DnsAliasTableAdapter; - private durados_SqlProductTableAdapter _durados_SqlProductTableAdapter; - private durados_ThemeTableAdapter _durados_ThemeTableAdapter; - - private durados_AppStatTableAdapter _durados_AppStatTableAdapter; - private backand_ActionTemplateTableAdapter _backand_ActionTemplateTableAdapter; private durados_UserSocialTableAdapter _durados_UserSocialTableAdapter; @@ -15381,20 +12828,6 @@ public durados_DataSourceTypeTableAdapter durados_DataSourceTypeTableAdapter { } } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + - "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + - "a", "System.Drawing.Design.UITypeEditor")] - public durados_DnsAliasTableAdapter durados_DnsAliasTableAdapter { - get { - return this._durados_DnsAliasTableAdapter; - } - set { - this._durados_DnsAliasTableAdapter = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + @@ -15409,34 +12842,6 @@ public durados_SqlProductTableAdapter durados_SqlProductTableAdapter { } } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + - "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + - "a", "System.Drawing.Design.UITypeEditor")] - public durados_ThemeTableAdapter durados_ThemeTableAdapter { - get { - return this._durados_ThemeTableAdapter; - } - set { - this._durados_ThemeTableAdapter = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + - "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" + - "a", "System.Drawing.Design.UITypeEditor")] - public durados_AppStatTableAdapter durados_AppStatTableAdapter { - get { - return this._durados_AppStatTableAdapter; - } - set { - this._durados_AppStatTableAdapter = value; - } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + @@ -15504,22 +12909,10 @@ public bool BackupDataSetBeforeUpdate { && (this._durados_DataSourceTypeTableAdapter.Connection != null))) { return this._durados_DataSourceTypeTableAdapter.Connection; } - if (((this._durados_DnsAliasTableAdapter != null) - && (this._durados_DnsAliasTableAdapter.Connection != null))) { - return this._durados_DnsAliasTableAdapter.Connection; - } if (((this._durados_SqlProductTableAdapter != null) && (this._durados_SqlProductTableAdapter.Connection != null))) { return this._durados_SqlProductTableAdapter.Connection; } - if (((this._durados_ThemeTableAdapter != null) - && (this._durados_ThemeTableAdapter.Connection != null))) { - return this._durados_ThemeTableAdapter.Connection; - } - if (((this._durados_AppStatTableAdapter != null) - && (this._durados_AppStatTableAdapter.Connection != null))) { - return this._durados_AppStatTableAdapter.Connection; - } if (((this._backand_ActionTemplateTableAdapter != null) && (this._backand_ActionTemplateTableAdapter.Connection != null))) { return this._backand_ActionTemplateTableAdapter.Connection; @@ -15556,18 +12949,9 @@ public int TableAdapterInstanceCount { if ((this._durados_DataSourceTypeTableAdapter != null)) { count = (count + 1); } - if ((this._durados_DnsAliasTableAdapter != null)) { - count = (count + 1); - } if ((this._durados_SqlProductTableAdapter != null)) { count = (count + 1); } - if ((this._durados_ThemeTableAdapter != null)) { - count = (count + 1); - } - if ((this._durados_AppStatTableAdapter != null)) { - count = (count + 1); - } if ((this._backand_ActionTemplateTableAdapter != null)) { count = (count + 1); } @@ -15612,15 +12996,6 @@ private int UpdateUpdatedRows(MapDataSet dataSet, global::System.Collections.Gen allChangedRows.AddRange(updatedRows); } } - if ((this._durados_ThemeTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.durados_Theme.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._durados_ThemeTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } if ((this._durados_AppTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.durados_App.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -15649,24 +13024,6 @@ private int UpdateUpdatedRows(MapDataSet dataSet, global::System.Collections.Gen allChangedRows.AddRange(updatedRows); } } - if ((this._durados_DnsAliasTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.durados_DnsAlias.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._durados_DnsAliasTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } - if ((this._durados_AppStatTableAdapter != null)) { - global::System.Data.DataRow[] updatedRows = dataSet.durados_AppStat.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); - updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); - if (((updatedRows != null) - && (0 < updatedRows.Length))) { - result = (result + this._durados_AppStatTableAdapter.Update(updatedRows)); - allChangedRows.AddRange(updatedRows); - } - } if ((this._backand_ActionTemplateTableAdapter != null)) { global::System.Data.DataRow[] updatedRows = dataSet.backand_ActionTemplate.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); @@ -15719,14 +13076,6 @@ private int UpdateInsertedRows(MapDataSet dataSet, global::System.Collections.Ge allAddedRows.AddRange(addedRows); } } - if ((this._durados_ThemeTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.durados_Theme.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._durados_ThemeTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } if ((this._durados_AppTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.durados_App.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -15752,22 +13101,6 @@ private int UpdateInsertedRows(MapDataSet dataSet, global::System.Collections.Ge allAddedRows.AddRange(addedRows); } } - if ((this._durados_DnsAliasTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.durados_DnsAlias.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._durados_DnsAliasTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } - if ((this._durados_AppStatTableAdapter != null)) { - global::System.Data.DataRow[] addedRows = dataSet.durados_AppStat.Select(null, null, global::System.Data.DataViewRowState.Added); - if (((addedRows != null) - && (0 < addedRows.Length))) { - result = (result + this._durados_AppStatTableAdapter.Update(addedRows)); - allAddedRows.AddRange(addedRows); - } - } if ((this._backand_ActionTemplateTableAdapter != null)) { global::System.Data.DataRow[] addedRows = dataSet.backand_ActionTemplate.Select(null, null, global::System.Data.DataViewRowState.Added); if (((addedRows != null) @@ -15810,22 +13143,6 @@ private int UpdateDeletedRows(MapDataSet dataSet, global::System.Collections.Gen allChangedRows.AddRange(deletedRows); } } - if ((this._durados_AppStatTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.durados_AppStat.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._durados_AppStatTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } - if ((this._durados_DnsAliasTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.durados_DnsAlias.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._durados_DnsAliasTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } if ((this._durados_UserAppTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.durados_UserApp.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -15851,14 +13168,6 @@ private int UpdateDeletedRows(MapDataSet dataSet, global::System.Collections.Gen allChangedRows.AddRange(deletedRows); } } - if ((this._durados_ThemeTableAdapter != null)) { - global::System.Data.DataRow[] deletedRows = dataSet.durados_Theme.Select(null, null, global::System.Data.DataViewRowState.Deleted); - if (((deletedRows != null) - && (0 < deletedRows.Length))) { - result = (result + this._durados_ThemeTableAdapter.Update(deletedRows)); - allChangedRows.AddRange(deletedRows); - } - } if ((this._durados_DataSourceTypeTableAdapter != null)) { global::System.Data.DataRow[] deletedRows = dataSet.durados_DataSourceType.Select(null, null, global::System.Data.DataViewRowState.Deleted); if (((deletedRows != null) @@ -15947,26 +13256,11 @@ public virtual int UpdateAll(MapDataSet dataSet) { throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + "tring."); } - if (((this._durados_DnsAliasTableAdapter != null) - && (this.MatchTableAdapterConnection(this._durados_DnsAliasTableAdapter.Connection) == false))) { - throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + - "tring."); - } if (((this._durados_SqlProductTableAdapter != null) && (this.MatchTableAdapterConnection(this._durados_SqlProductTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + "tring."); } - if (((this._durados_ThemeTableAdapter != null) - && (this.MatchTableAdapterConnection(this._durados_ThemeTableAdapter.Connection) == false))) { - throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + - "tring."); - } - if (((this._durados_AppStatTableAdapter != null) - && (this.MatchTableAdapterConnection(this._durados_AppStatTableAdapter.Connection) == false))) { - throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + - "tring."); - } if (((this._backand_ActionTemplateTableAdapter != null) && (this.MatchTableAdapterConnection(this._backand_ActionTemplateTableAdapter.Connection) == false))) { throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + @@ -16054,15 +13348,6 @@ public virtual int UpdateAll(MapDataSet dataSet) { adaptersWithAcceptChangesDuringUpdate.Add(this._durados_DataSourceTypeTableAdapter.Adapter); } } - if ((this._durados_DnsAliasTableAdapter != null)) { - revertConnections.Add(this._durados_DnsAliasTableAdapter, this._durados_DnsAliasTableAdapter.Connection); - this._durados_DnsAliasTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); - this._durados_DnsAliasTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); - if (this._durados_DnsAliasTableAdapter.Adapter.AcceptChangesDuringUpdate) { - this._durados_DnsAliasTableAdapter.Adapter.AcceptChangesDuringUpdate = false; - adaptersWithAcceptChangesDuringUpdate.Add(this._durados_DnsAliasTableAdapter.Adapter); - } - } if ((this._durados_SqlProductTableAdapter != null)) { revertConnections.Add(this._durados_SqlProductTableAdapter, this._durados_SqlProductTableAdapter.Connection); this._durados_SqlProductTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); @@ -16072,24 +13357,6 @@ public virtual int UpdateAll(MapDataSet dataSet) { adaptersWithAcceptChangesDuringUpdate.Add(this._durados_SqlProductTableAdapter.Adapter); } } - if ((this._durados_ThemeTableAdapter != null)) { - revertConnections.Add(this._durados_ThemeTableAdapter, this._durados_ThemeTableAdapter.Connection); - this._durados_ThemeTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); - this._durados_ThemeTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); - if (this._durados_ThemeTableAdapter.Adapter.AcceptChangesDuringUpdate) { - this._durados_ThemeTableAdapter.Adapter.AcceptChangesDuringUpdate = false; - adaptersWithAcceptChangesDuringUpdate.Add(this._durados_ThemeTableAdapter.Adapter); - } - } - if ((this._durados_AppStatTableAdapter != null)) { - revertConnections.Add(this._durados_AppStatTableAdapter, this._durados_AppStatTableAdapter.Connection); - this._durados_AppStatTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); - this._durados_AppStatTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction)); - if (this._durados_AppStatTableAdapter.Adapter.AcceptChangesDuringUpdate) { - this._durados_AppStatTableAdapter.Adapter.AcceptChangesDuringUpdate = false; - adaptersWithAcceptChangesDuringUpdate.Add(this._durados_AppStatTableAdapter.Adapter); - } - } if ((this._backand_ActionTemplateTableAdapter != null)) { revertConnections.Add(this._backand_ActionTemplateTableAdapter, this._backand_ActionTemplateTableAdapter.Connection); this._backand_ActionTemplateTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection)); @@ -16186,22 +13453,10 @@ public virtual int UpdateAll(MapDataSet dataSet) { this._durados_DataSourceTypeTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._durados_DataSourceTypeTableAdapter])); this._durados_DataSourceTypeTableAdapter.Transaction = null; } - if ((this._durados_DnsAliasTableAdapter != null)) { - this._durados_DnsAliasTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._durados_DnsAliasTableAdapter])); - this._durados_DnsAliasTableAdapter.Transaction = null; - } if ((this._durados_SqlProductTableAdapter != null)) { this._durados_SqlProductTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._durados_SqlProductTableAdapter])); this._durados_SqlProductTableAdapter.Transaction = null; } - if ((this._durados_ThemeTableAdapter != null)) { - this._durados_ThemeTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._durados_ThemeTableAdapter])); - this._durados_ThemeTableAdapter.Transaction = null; - } - if ((this._durados_AppStatTableAdapter != null)) { - this._durados_AppStatTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._durados_AppStatTableAdapter])); - this._durados_AppStatTableAdapter.Transaction = null; - } if ((this._backand_ActionTemplateTableAdapter != null)) { this._backand_ActionTemplateTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._backand_ActionTemplateTableAdapter])); this._backand_ActionTemplateTableAdapter.Transaction = null; diff --git a/Durados.Web.Mvc/MapDataSet.xsd b/Durados.Web.Mvc/MapDataSet.xsd index 239d064e..ba5e88ac 100644 --- a/Durados.Web.Mvc/MapDataSet.xsd +++ b/Durados.Web.Mvc/MapDataSet.xsd @@ -488,59 +488,6 @@ SELECT Id, Name, Ordinal FROM durados_DataSourceType WHERE (Id = @Id) - - - - - - DELETE FROM [dbo].[durados_DnsAlias] WHERE (([Id] = @Original_Id) AND ([Alias] = @Original_Alias) AND ([AppId] = @Original_AppId)) - - - - - - - - - - INSERT INTO [dbo].[durados_DnsAlias] ([Id], [Alias], [AppId]) VALUES (@Id, @Alias, @AppId); -SELECT Id, Alias, AppId FROM durados_DnsAlias WHERE (Id = @Id) - - - - - - - - - - SELECT Id, Alias, AppId FROM dbo.durados_DnsAlias - - - - - - UPDATE [dbo].[durados_DnsAlias] SET [Id] = @Id, [Alias] = @Alias, [AppId] = @AppId WHERE (([Id] = @Original_Id) AND ([Alias] = @Original_Alias) AND ([AppId] = @Original_AppId)); -SELECT Id, Alias, AppId FROM durados_DnsAlias WHERE (Id = @Id) - - - - - - - - - - - - - - - - - - - @@ -598,129 +545,6 @@ SELECT Id, Name, Ordinal FROM durados_SqlProduct WHERE (Id = @Id) - - - - - - DELETE FROM [dbo].[durados_Theme] WHERE (([Id] = @Original_Id) AND ([Name] = @Original_Name) AND ([RelativePath] = @Original_RelativePath)) - - - - - - - - - - INSERT INTO [dbo].[durados_Theme] ([Name], [RelativePath]) VALUES (@Name, @RelativePath); -SELECT Id, Name, RelativePath FROM durados_Theme WHERE (Id = SCOPE_IDENTITY()) - - - - - - - - - SELECT Id, Name, RelativePath FROM dbo.durados_Theme - - - - - - UPDATE [dbo].[durados_Theme] SET [Name] = @Name, [RelativePath] = @RelativePath WHERE (([Id] = @Original_Id) AND ([Name] = @Original_Name) AND ([RelativePath] = @Original_RelativePath)); -SELECT Id, Name, RelativePath FROM durados_Theme WHERE (Id = @Id) - - - - - - - - - - - - - - - - - - - - - - - - - DELETE FROM [dbo].[durados_AppStat] WHERE (([Id] = @Original_Id) AND ((@IsNull_AppId = 1 AND [AppId] IS NULL) OR ([AppId] = @Original_AppId)) AND ((@IsNull_Name = 1 AND [Name] IS NULL) OR ([Name] = @Original_Name)) AND ((@IsNull_Value = 1 AND [Value] IS NULL) OR ([Value] = @Original_Value)) AND ((@IsNull_Date = 1 AND [Date] IS NULL) OR ([Date] = @Original_Date))) - - - - - - - - - - - - - - - - INSERT INTO [dbo].[durados_AppStat] ([Id], [AppId], [Name], [Value], [Date]) VALUES (@Id, @AppId, @Name, @Value, @Date); -SELECT Id, AppId, Name, Value, Date FROM durados_AppStat WHERE (Id = @Id) - - - - - - - - - - - - SELECT Id, AppId, Name, Value, Date FROM dbo.durados_AppStat - - - - - - UPDATE [dbo].[durados_AppStat] SET [Id] = @Id, [AppId] = @AppId, [Name] = @Name, [Value] = @Value, [Date] = @Date WHERE (([Id] = @Original_Id) AND ((@IsNull_AppId = 1 AND [AppId] IS NULL) OR ([AppId] = @Original_AppId)) AND ((@IsNull_Name = 1 AND [Name] IS NULL) OR ([Name] = @Original_Name)) AND ((@IsNull_Value = 1 AND [Value] IS NULL) OR ([Value] = @Original_Value)) AND ((@IsNull_Date = 1 AND [Date] IS NULL) OR ([Date] = @Original_Date))); -SELECT Id, AppId, Name, Value, Date FROM durados_AppStat WHERE (Id = @Id) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1201,21 +1025,6 @@ SELECT id, UserId, Provider, SocialId FROM durados_UserSocial WHERE (id = @id) - - - - - - - - - - - - - - - @@ -1231,44 +1040,6 @@ SELECT id, UserId, Provider, SocialId FROM durados_UserSocial WHERE (id = @id) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1444,22 +1215,10 @@ SELECT id, UserId, Provider, SocialId FROM durados_UserSocial WHERE (id = @id) - - - - - - - - - - - - @@ -1482,10 +1241,7 @@ SELECT id, UserId, Provider, SocialId FROM durados_UserSocial WHERE (id = @id) - - - diff --git a/Durados.Web.Mvc/MapDataSet.xss b/Durados.Web.Mvc/MapDataSet.xss index 39655857..a1373ff5 100644 --- a/Durados.Web.Mvc/MapDataSet.xss +++ b/Durados.Web.Mvc/MapDataSet.xss @@ -4,23 +4,20 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - - - - - - - - - - + + + + + + + + + - + 870 @@ -36,7 +33,7 @@ - + 1576 @@ -48,7 +45,7 @@ - + 887 @@ -72,7 +69,7 @@ - + 494 @@ -84,7 +81,7 @@ - + 400 @@ -100,7 +97,7 @@ - + 494 @@ -112,7 +109,7 @@ - + 494 @@ -124,7 +121,7 @@ - + 1037 @@ -144,7 +141,7 @@ - + 494 @@ -156,7 +153,7 @@ - + 1576 @@ -168,7 +165,7 @@ - + 1576 @@ -180,19 +177,7 @@ - - - - 887 - 324 - - - 519 - 324 - - - - + 1503 @@ -204,31 +189,7 @@ - - - - 726 - 533 - - - 887 - 533 - - - - - - - 887 - 533 - - - 334 - 533 - - - - + 259 @@ -244,7 +205,7 @@ - + 887 diff --git a/Durados.Web.Mvc/Services/AccountService.cs b/Durados.Web.Mvc/Services/AccountService.cs index d0ae7c55..f9019c1d 100644 --- a/Durados.Web.Mvc/Services/AccountService.cs +++ b/Durados.Web.Mvc/Services/AccountService.cs @@ -6,7 +6,7 @@ using System; using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; +//using System.Data.SqlClient; using System.Diagnostics; using System.IO; using System.Linq; @@ -57,15 +57,16 @@ public string GetEmailBySocialId(string provider, string socialId, int appId) //int rowCount = -1; //DataView dataView = view.FillPage(1, 1, new Dictionary() { { "Provider", provider }, { "SocialId", socialId } }, null, null, out rowCount, null, null); - SqlAccess sa = new SqlAccess(); + SqlAccess sa = Maps.MainAppSqlAccess; - string sql = "select UserId from durados_UserSocial where Provider = @Provider and SocialId = @SocialId and AppId = @AppId"; + //ISqlMainSchema sqlMain = ; + string sql = Maps.MainAppSchema.GetEmailBySocialIdSql(); object scalar = sa.ExecuteScalar(view.ConnectionString, sql, new Dictionary() { { "Provider", provider }, { "SocialId", socialId }, { "AppId", appId } }); if (scalar == null) { - sql = "select UserId from durados_UserSocial where Provider = @Provider and SocialId = @SocialId and AppId is null"; + sql = Maps.MainAppSchema.GetEmailBySocialIdSql2(); scalar = sa.ExecuteScalar(view.ConnectionString, sql, new Dictionary() { { "Provider", provider }, { "SocialId", socialId } }); } @@ -91,6 +92,8 @@ public string GetEmailBySocialId(string provider, string socialId, int appId) return GetDuradosMap().Database.GetUsernameById(userId); } + + public string GetSocialIdlByEmail(string provider, string email, string appName) { int appId = Convert.ToInt32(Maps.Instance.GetMap(appName).Id); @@ -145,16 +148,18 @@ public static string GetRandomPassword(int chars) public string GetSocialIdlByEmail(string provider, int userId, int appId) { View view = GetUserSocialView(); - - SqlAccess sa = new SqlAccess(); - string sql = "select SocialId from durados_UserSocial WITH(NOLOCK) where Provider = @Provider and UserId = @UserId and AppId = @AppId"; + SqlAccess sa = Maps.MainAppSqlAccess; + + ISqlMainSchema sqlMain = Maps.MainAppSchema; + + string sql = sqlMain.GetSocialIdlByEmail(); object scalar = sa.ExecuteScalar(view.ConnectionString, sql, new Dictionary() { { "Provider", provider }, { "UserId", userId }, { "AppId", appId } }); if (scalar == null) { - sql = "select SocialId from durados_UserSocial WITH(NOLOCK) where Provider = @Provider and UserId = @UserId and AppId is null"; + sql = sqlMain.GetSocialIdlByEmail2(); scalar = sa.ExecuteScalar(view.ConnectionString, sql, new Dictionary() { { "Provider", provider }, { "UserId", userId } }); } @@ -269,13 +274,59 @@ public virtual void ChangePassword(string username, string password, Map map) } - private void ChangePasswordInner(string username, string password, MembershipProvider provider) + private static void ChangePasswordInner(string username, string password, MembershipProvider provider) { provider.UnlockUser(username); string oldPassword = provider.ResetPassword(username, null); provider.ChangePassword(username, oldPassword, password); + UpdateMembershipFailureCount(username, provider); - + + } + + private static void UpdateMembershipFailureCount(string username, MembershipProvider provider) + { + if(string.IsNullOrEmpty(username) || provider == null) + return; + + MembershipUser user = provider.GetUser(username, false); + if(user == null || user.ProviderUserKey == null || user.ProviderUserKey.ToString() == string.Empty) + return; + + var userId = user.ProviderUserKey; + try + { + if (provider is MySql.Web.Security.MySQLMembershipProvider) + { + ISqlMainSchema sqlSchema = Maps.MainAppSchema; + string sql = sqlSchema.GetUpdateFailedPasswordAttemptCountSql(); + using (IDbConnection connection = sqlSchema.GetNewConnection(System.Configuration.ConfigurationManager.ConnectionStrings["SecurityConnectionString"].ConnectionString)) + { + IDbCommand cmd = connection.CreateCommand(); + cmd.CommandText = sql; + cmd.Parameters.Clear(); + IDataParameter parameterUser = cmd.CreateParameter(); + parameterUser.ParameterName = "userId"; + parameterUser.Value = userId; + cmd.Parameters.Add(parameterUser); + + IDataParameter parameterCnt = cmd.CreateParameter(); + parameterCnt.ParameterName = "count"; + parameterCnt.Value = 0; + cmd.Parameters.Add(parameterCnt); + + connection.Open(); + + if (cmd.ExecuteNonQuery() < 0) + throw new System.Configuration.Provider.ProviderException("Unable to update failure count."); + + } + } + } + catch (MySql.Data.MySqlClient.MySqlException e) + { + Maps.Instance.DuradosMap.Logger.Log("AccountService", "ResetPassword", "UpdateMembershipFailureCount", e, 1, string.Format("membershipUserId:{0},username:{1}", userId??string.Empty, username)); + } } @@ -339,11 +390,14 @@ public static bool IsValidRole(string appName, string role) public Dictionary SignUpToBackand(string username, string password, string send, string phone, string fullname, string dbtype, string dbother) { - int identity = -1; + bool DontSend = false; try { - Durados.DataAccess.SqlAccess sql = new Durados.DataAccess.SqlAccess(); + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; + + ISqlMainSchema sqlMain = Maps.MainAppSchema; + Dictionary parameters = new Dictionary(); string email = username.Trim(); @@ -351,7 +405,7 @@ public Dictionary SignUpToBackand(string username, string passwo parameters.Add("@Email", email); parameters.Add("@Username", username); - //if (sql.ExecuteScalar(Maps.Instance.DuradosMap.Database.ConnectionString, "SELECT TOP 1 [Username] FROM [durados_User] WHERE [Username]=@Username", parameters) != string.Empty) + System.Web.Security.MembershipUser user = System.Web.Security.Membership.Provider.GetUser(username, false); if (user != null) { @@ -396,7 +450,7 @@ public Dictionary SignUpToBackand(string username, string passwo Guid guid = Guid.NewGuid(); parameters.Add("@Guid", guid); - sql.ExecuteNonQuery(Maps.Instance.DuradosMap.Database.ConnectionString, "if NOT EXISTS (Select [Username] From [" + GetDuradosMap().Database.GetUserView().GetTableName() + "] WHERE [Username] = @Username) begin INSERT INTO [durados_User] ([Username],[FirstName],[LastName],[Email],[Role],[Guid]) VALUES (@Username,@FirstName,@LastName,@Email,@Role,@Guid) end", parameters, CreateMembershipCallback); + sqlAccess.ExecuteNonQuery(Maps.Instance.DuradosMap.Database.ConnectionString, sqlMain.InsertNewUserSql(GetDuradosMap().Database.GetUserView().GetTableName(), "durados_User"), sqlAccess.GetSqlProduct(), parameters, CreateMembershipCallback); //System.Web.Security.MembershipUser user = System.Web.Security.Membership.Provider.GetUser(username, true); //if (user != null) @@ -420,6 +474,8 @@ public Dictionary SignUpToBackand(string username, string passwo if (sendEmail) SendRegistrationRequest(fullname, lastName, email, guid.ToString(), username, password, Maps.Instance.DuradosMap, DontSend); + /* + * TODO: Main MySQL depricated try { Durados.Web.Mvc.UI.Helpers.AccountService.UpdateWebsiteUsers(username, identity); @@ -440,6 +496,7 @@ public Dictionary SignUpToBackand(string username, string passwo Maps.Instance.DuradosMap.Logger.Log("account", "SignUpToBackand", "SignUp", ex, 1, "failed to update websiteuser in ContactUs"); } + */ } catch (DuradosException exception) @@ -459,6 +516,7 @@ public Dictionary SignUpToBackand(string username, string passwo //return Json(new { Success = true, Message = "Success", identity = identity, DemoDefaults = GetDefaultDemo(identity) }); } + protected virtual string CreateMembershipCallback(Dictionary paraemeters) { string username = paraemeters["@Username"].ToString(); @@ -832,14 +890,17 @@ protected virtual void Activate(string username, string appName) protected virtual void Activate(string username, string appName, string role) { Map map = GetMap(appName); - Durados.DataAccess.SqlAccess sql = new Durados.DataAccess.SqlAccess(); + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; + ISqlMainSchema sqlMain = Maps.MainAppSchema; Dictionary parameters = new Dictionary(); parameters.Add("@UserId", map.Database.GetUserID(username)); parameters.Add("@AppId", map.Id); parameters.Add("@Role", role); - sql.ExecuteNonQuery(Maps.Instance.DuradosMap.Database.ConnectionString, "INSERT INTO [durados_UserApp] ([UserId],[AppId],[Role]) VALUES (@UserId,@AppId,@Role)", parameters, null); + sqlAccess.ExecuteNonQuery(Maps.Instance.DuradosMap.Database.ConnectionString, sqlMain.GetInsertUserAppSql(), parameters, null); } + + public virtual void ActivateAdmin(string username, string appName) { bool isAuthenticated = IsAuthenticated(username, null); @@ -850,20 +911,20 @@ public virtual void ActivateAdmin(string username, string appName) } else { - InviteAdminBeforeAignUp(username, appName); + InviteAdminBeforeSignUp(username, appName); } } - private void InviteAdminBeforeAignUp(string username, string appName) + private void InviteAdminBeforeSignUp(string username, string appName) { - SqlAccess sqlAccess = new SqlAccess(); - + SqlAccess sqlAccess = Maps.MainAppSqlAccess; + ISqlMainSchema sqlMain = Maps.MainAppSchema; try { Map map = GetDuradosMap(); string appId = GetMap(appName).Id; - sqlAccess.ExecuteNonQuery(map.connectionString, string.Format("insert into durados_Invite (username, appId) values ('{0}', {1})", username, appId)); + sqlAccess.ExecuteNonQuery(map.connectionString,sqlMain.GetInviteAdminBeforeSignUpSql(username, appId) ); } catch (Exception exception) { @@ -912,9 +973,11 @@ public static void SendRegistrationRequest(string firstName, string lastName, st /// /// /// + /// + /* TODO: Main MySQL depricated public static void UpdateWebsiteUsers(string username, int userId) { - SqlAccess sqlAccess = new SqlAccess(); + SqlAccess sqlAccess = Maps.MainAppSqlAccess; string sql = @"INSERT INTO [website_UsersCookie]([UserId],[CookieGuid],[CreateDate]) VALUES(@UserId,@CookieGuid,@CreateDate)"; Dictionary parameters = new Dictionary(); @@ -937,7 +1000,7 @@ public static void UpdateWebsiteUsers(string username, int userId) /// public static void InsertContactUsUsers(string email, string fullname, string comments, string phone, int requestSubjectId, int? dbType, string dbOther) { - SqlAccess sqlAccess = new SqlAccess(); + SqlAccess sqlAccess = Maps.MainAppSqlAccess; Dictionary parameters = new Dictionary(); parameters.Add("@Email", email); if (fullname == null) @@ -972,7 +1035,7 @@ public static void InsertContactUsUsers(string email, string fullname, string co sqlAccess.ExecuteNonQuery(Maps.Instance.DuradosMap.connectionString, "dbo.website_AddEditUser @Email,@FullName,@Comments,@CookieGuid,@Phone,@RequestSubject,@DBtype,@DBother", parameters, null); } - + /// /// Retrun the GUID stored in the tracking cookie /// @@ -986,7 +1049,7 @@ public static object GetTrackingCookieGuid() return trackingCookie.Values["guid"]; } - + */ public virtual void InviteAdminAfterSignUp(string username) { try @@ -994,21 +1057,25 @@ public virtual void InviteAdminAfterSignUp(string username) Map map = GetDuradosMap(); int userId = GetDuradosMap().Database.GetUserID(username); - using (SqlConnection connection = new SqlConnection(map.connectionString)) + SqlAccess sqlAccess = Maps.MainAppSqlAccess; + ISqlMainSchema sqlMain = Maps.MainAppSchema; + using (IDbConnection connection = sqlAccess.GetNewSqlSchema().GetConnection(map.connectionString)) { connection.Open(); - - SqlTransaction transaction = connection.BeginTransaction(IsolationLevel.ReadCommitted); + + IDbTransaction transaction = connection.BeginTransaction(IsolationLevel.ReadCommitted); try { - using (SqlCommand command = new SqlCommand()) + + + using (IDbCommand command = sqlAccess.GetNewCommand()) { command.Connection = connection; command.Transaction = transaction; - command.CommandText = string.Format("select appId from durados_Invite where username = '{0}'", username); + command.CommandText = sqlMain.GetInviteAdminAfterSignupSql(username); List apps = new List(); using (IDataReader reader = command.ExecuteReader()) { @@ -1022,10 +1089,10 @@ public virtual void InviteAdminAfterSignUp(string username) foreach (string appId in apps) { - command.CommandText = string.Format("insert into durados_UserApp (UserId, AppId, Role) values ({0},{1},'{2}')", userId, appId, "Admin"); + command.CommandText = sqlMain.GetInviteAdminAfterSignupSql(userId,appId,"Admin"); command.ExecuteNonQuery(); } - command.CommandText = string.Format("delete durados_Invite where username = '{0}'", username); + command.CommandText = sqlMain.GetDeleteInviteUser(username); command.ExecuteNonQuery(); transaction.Commit(); @@ -1159,8 +1226,11 @@ protected virtual void AddToAuthenticatedUsers(string appName, string firstName, parameters.Add("Role", role); parameters.Add("Guid", Guid.NewGuid()); parameters.Add("AppName", appName); - Durados.DataAccess.SqlAccess sql = new Durados.DataAccess.SqlAccess(); - sql.ExecuteNonQuery(GetDuradosMap().Database.GetUserView().ConnectionString, "if NOT EXISTS (Select [Username] From [" + GetDuradosMap().Database.GetUserView().GetTableName() + "] WHERE [Username] = @Username) begin INSERT INTO [" + GetDuradosMap().Database.GetUserView().GetTableName() + "] ([Username],[FirstName],[LastName],[Email],[Role],[Guid]) VALUES (@Username,@FirstName,@LastName,@Email,@Role,@Guid) end", parameters, AddToAuthenticatedUsersCallback); + + Map map = GetDuradosMap(); + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; + ISqlMainSchema sqlMain = Maps.MainAppSchema; + sqlAccess.ExecuteNonQuery(map.Database.GetUserView().ConnectionString, sqlMain.InsertNewUserSql(GetDuradosMap().Database.GetUserView().GetTableName() , GetDuradosMap().Database.GetUserView().GetTableName() ), parameters, AddToAuthenticatedUsersCallback); } @@ -1603,12 +1673,12 @@ public static string GetUserGuid(string userName) { try { - Durados.DataAccess.SqlAccess sql = new Durados.DataAccess.SqlAccess(); + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; Dictionary parameters = new Dictionary(); parameters.Add("@username", userName); - object guid = sql.ExecuteScalar(Maps.Instance.DuradosMap.connectionString, "SELECT TOP 1 [durados_user].[guid] FROM durados_user WITH(NOLOCK) WHERE [durados_user].[username]=@username", parameters); + object guid = sqlAccess.ExecuteScalar(Maps.Instance.DuradosMap.connectionString, Maps.MainAppSchema.GetUserGuidSql(), parameters); if (guid == null || guid == DBNull.Value) throw new DuradosException("Username has no unique guid, cannot reset password."); @@ -1626,12 +1696,14 @@ public static int GetUserId(string userName) { try { - Durados.DataAccess.SqlAccess sql = new Durados.DataAccess.SqlAccess(); + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; + + ISqlMainSchema sqlMain = Maps.MainAppSchema; Dictionary parameters = new Dictionary(); parameters.Add("@username", userName); - object id = sql.ExecuteScalar(Maps.Instance.DuradosMap.connectionString, "SELECT TOP 1 [durados_user].[id] FROM durados_user WITH(NOLOCK) WHERE [durados_user].[username]=@username", parameters); + object id = sqlAccess.ExecuteScalar(Maps.Instance.DuradosMap.connectionString, sqlMain.GetUserIdFromUsernameSql(), parameters); if (id == null || id == DBNull.Value) throw new DuradosException("Username has no unique username."); @@ -1652,12 +1724,14 @@ public static string GetUserTempToken(string username) { string guid = GetUserGuid(username); - Durados.DataAccess.SqlAccess sql = new Durados.DataAccess.SqlAccess(); + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; + + ISqlMainSchema sqlMain = Maps.MainAppSchema; Dictionary parameters = new Dictionary(); parameters.Add("@UserGuid", guid); - object tempGuid = sql.ExecuteScalar(Maps.Instance.DuradosMap.connectionString, "SELECT TOP 1 Id FROM [durados_ValidGuid] WITH(NOLOCK) WHERE UserGuid=@UserGuid and Used=0", parameters); + object tempGuid = sqlAccess.ExecuteScalar(Maps.Instance.DuradosMap.connectionString, sqlMain.GetUserTempTokenSql() , parameters); if (tempGuid == null || tempGuid == DBNull.Value) throw new DuradosException("Temp token not found for " + username); @@ -1709,13 +1783,15 @@ private void SetAppNameByToken(string token, string appName) private string GetUsername(string guid) { - Durados.DataAccess.SqlAccess sqlAccess = new Durados.DataAccess.SqlAccess(); + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; + + ISqlMainSchema sqlMain = Maps.MainAppSchema; Dictionary parameters = new Dictionary(); parameters.Add("@guid", guid); - string sqlDuradosSys = string.Format("SELECT TOP 1 username FROM durados_user WITH(NOLOCK) WHERE guid=@guid"); + string sqlDuradosSys = sqlMain.GetUserNameByGuidSql(); return sqlAccess.ExecuteScalar(Maps.Instance.ConnectionString, sqlDuradosSys, parameters); } @@ -1733,13 +1809,14 @@ public void DeleteUser(string username, string appName) if (Maps.Instance.DuradosMap.Database.GetUserRow() == null) throw new DuradosException("user does not exist"); - Durados.DataAccess.SqlAccess sqlAccess = new Durados.DataAccess.SqlAccess(); + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; Dictionary parameters = new Dictionary(); parameters.Add("@username", username); + ISqlMainSchema sqlMain = Maps.MainAppSchema; - string sql = string.Format("delete FROM durados_user WHERE [username]=@username"); + string sql = sqlMain.GetDeleteUserSql(); if (appName != null && appName != Maps.DuradosAppName) { @@ -1766,14 +1843,15 @@ public bool UserBelongToMoreThanOneApp(string username, string appName) appId = Convert.ToInt32(map.Id); } - Durados.DataAccess.SqlAccess sqlAccess = new Durados.DataAccess.SqlAccess(); + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; + ISqlMainSchema sqlMain = Maps.MainAppSchema; Dictionary parameters = new Dictionary(); parameters.Add("@appid", appId); parameters.Add("@userid", id); - string sql = string.Format("select id FROM durados_userapp WHERE [userid]=@userid and appid<>@appid"); + string sql = sqlMain.GetUserBelongToMoreThanOneAppSql(); return !sqlAccess.ExecuteScalar(Maps.Instance.DuradosMap.connectionString, sql, parameters).Equals(string.Empty); @@ -1785,13 +1863,13 @@ private bool UserHasApps(string username) { int id = Maps.Instance.DuradosMap.Database.GetUserID(username); - Durados.DataAccess.SqlAccess sqlAccess = new Durados.DataAccess.SqlAccess(); - + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; + ISqlMainSchema sqlMain = Maps.MainAppSchema; Dictionary parameters = new Dictionary(); parameters.Add("@id", id); - string sql = string.Format("SELECT TOP 1 id FROM durados_app WITH(NOLOCK) WHERE creator=@id"); + string sql = sqlMain.GetHasAppsSql(); return !sqlAccess.ExecuteScalar(Maps.Instance.DuradosMap.connectionString, sql, parameters).Equals(string.Empty); } @@ -1921,10 +1999,25 @@ private static void DisableAction(Map map, string actionName) } } + private static SqlServerMembershipValidationConvertor sqlServerMembershipValidationConvertor = new SqlServerMembershipValidationConvertor(); + public static bool ValidateUser(MembershipProvider provider, string userName, string password) + { + bool valid = provider.ValidateUser(userName, password); + if (valid) return true; + + valid = sqlServerMembershipValidationConvertor.Validate(userName, password, provider); + if (!valid) return false; + + ChangePasswordInner(userName, password, provider); + + return true; + } + public static bool MultiSignOnValidation(Map map, string userName, string password) { MembershipProvider provider = map.GetMembershipProvider(); - bool valid = provider.ValidateUser(userName, password); + //bool valid = provider.ValidateUser(userName, password); + bool valid = ValidateUser(provider, userName, password); if (valid) { provider.UnlockUser(userName); @@ -1933,7 +2026,9 @@ public static bool MultiSignOnValidation(Map map, string userName, string passwo if (provider.GetUser(userName, false) == null) { - valid = _provider.ValidateUser(userName, password); + //valid = _provider.ValidateUser(userName, password); + valid = ValidateUser(_provider, userName, password); + if (!valid) return valid; diff --git a/Durados.Web.Mvc/Services/SqlServerMembershipValidationConvertor.cs b/Durados.Web.Mvc/Services/SqlServerMembershipValidationConvertor.cs new file mode 100644 index 00000000..9914ac59 --- /dev/null +++ b/Durados.Web.Mvc/Services/SqlServerMembershipValidationConvertor.cs @@ -0,0 +1,97 @@ +using Durados.DataAccess; +using MySql.Data.MySqlClient; +using MySql.Web.Security; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; +using System.Web.Security; + +namespace Durados.Web.Mvc.Services +{ + public class SqlServerMembershipValidationConvertor + { + internal bool Validate(string userName, string password, MembershipProvider provider) + { + MembershipUser user = GetMembershipUser(userName, provider); + + if (user == null) + return false; + + return Validate(user, password); + } + + + private MembershipUser GetMembershipUser(string username, MembershipProvider provider) + { + return provider.GetUser(username, true); + } + + /// + /// Switches the specified ASP.NET membership user to a clear password format, updating the associated fields. + /// + /// The membership user. + /// + private bool Validate(MembershipUser user, string password) + { + if (user == null) + { + throw new ArgumentNullException("user"); + } + + + //if (Membership.Providers[user.ProviderName] is MySQLMembershipProvider) + //{ + ISqlMainSchema sqlSchema = Maps.MainAppSchema; + using (IDbConnection connection = sqlSchema.GetNewConnection(ConfigurationManager.ConnectionStrings["SecurityConnectionString"].ConnectionString)) + { + // Get the user's (possibly encrypted or hashed) security credentials. + string selectQuery = sqlSchema.GetUserSecuritySql(); + IDbCommand cmd = connection.CreateCommand(); + cmd.CommandText = selectQuery; + IDataParameter parameter = cmd.CreateParameter(); + parameter.ParameterName = "userId"; + parameter.Value = user.ProviderUserKey; + cmd.Parameters.Add(parameter); + + string hashedPassword = null; + string passwordSalt = null; + + connection.Open(); + IDataReader reader = cmd.ExecuteReader(); + while (reader.Read()) + { + hashedPassword = (string)reader["Password"]; + passwordSalt = (string)reader["PasswordKey"]; + } + reader.Close(); + connection.Close(); + + return EncodePassword(password, passwordSalt) == hashedPassword; + } + //} + + //return false; + } + + private static string EncodePassword(string pass, string salt) + { + byte[] bytes = Encoding.Unicode.GetBytes(pass); + byte[] src = System.Convert.FromBase64String(salt); + byte[] dst = new byte[src.Length + bytes.Length]; + byte[] inArray = null; + Buffer.BlockCopy(src, 0, dst, 0, src.Length); + Buffer.BlockCopy(bytes, 0, dst, src.Length, bytes.Length); + HashAlgorithm algorithm = HashAlgorithm.Create("SHA1"); + inArray = algorithm.ComputeHash(dst); + return System.Convert.ToBase64String(inArray); + } + + + } + +} diff --git a/Durados.Web.Mvc/Stat/Measurement.cs b/Durados.Web.Mvc/Stat/Measurement.cs index d8997ef9..8c7d7577 100644 --- a/Durados.Web.Mvc/Stat/Measurement.cs +++ b/Durados.Web.Mvc/Stat/Measurement.cs @@ -182,7 +182,7 @@ protected virtual ISqlTextBuilder GetSqlTextBuilder(SqlProduct sqlProduct) } - public virtual void Persist(DateTime date, object value, SqlCommand command) + public virtual void Persist(DateTime date, object value, IDbCommand command) { var appRow = App.GetAppRow(); if (appRow.durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection_System == null) @@ -191,29 +191,40 @@ public virtual void Persist(DateTime date, object value, SqlCommand command) } int sqlConnId = appRow.durados_SqlConnectionRowByFK_durados_App_durados_SqlConnection_System.Id; - + ISqlMainSchema sqlSchema = Maps.MainAppSchema; command.Parameters.Clear(); - command.CommandText = "select Id from modubiz_LogStats2 with(nolock) where SqlConId = @SqlConId and LogDate = @LogDate"; - command.Parameters.AddWithValue("SqlConId", sqlConnId); - command.Parameters.AddWithValue("LogDate", date); + command.CommandText = sqlSchema.GetReportId(); + AddParameter(command, sqlConnId, "SqlConId" ); + AddParameter(command, date, "LogDate"); + object scalar = command.ExecuteScalar(); if (scalar == null || scalar == DBNull.Value) { - command.CommandText = "insert into modubiz_LogStats2 (SqlConId, LogDate) values (@SqlConId, @LogDate); SELECT IDENT_CURRENT(N'[modubiz_LogStats2]') AS ID; "; + command.CommandText = sqlSchema.InsertNewStatsSql(); scalar = command.ExecuteScalar(); } command.Parameters.Clear(); - command.CommandText = "update modubiz_LogStats2 set " + MeasurementType.ToString() + " = @value where Id = @Id"; - command.Parameters.AddWithValue("value", value is ulong ? System.Convert.ToInt64(value) : value); - command.Parameters.AddWithValue("Id", scalar); + command.CommandText = sqlSchema.UpdateMeasurmentType(MeasurementType.ToString()); + AddParameter(command, value is ulong ? System.Convert.ToInt64(value) : value, "value"); + AddParameter(command, scalar, "Id"); + + command.ExecuteNonQuery(); } + private static void AddParameter(IDbCommand command, object val, string key) + { + IDbDataParameter parameter = command.CreateParameter(); + parameter.ParameterName =key; + parameter.Value = val; + command.Parameters.Add(parameter); + } + protected virtual MapDataSet.durados_AppRow GetAppRow() diff --git a/Durados.Web.Mvc/Stat/Producer.cs b/Durados.Web.Mvc/Stat/Producer.cs index aee1b1ed..457fb55f 100644 --- a/Durados.Web.Mvc/Stat/Producer.cs +++ b/Durados.Web.Mvc/Stat/Producer.cs @@ -104,16 +104,17 @@ private object Produce(DateTime date, MeasurementType[] measurementTypes, string private void LoadAppsMeasurments(DateTime date, MeasurementType[] measurementTypes, bool persist, Dictionary> appsMeasurements, Dictionary> appsWithErrors, Dictionary> appsWithWornings, string appItem, App app) { + ISqlMainSchema sqlSchema = Maps.MainAppSchema; appsMeasurements[appItem].Add("AppName", app.AppName); foreach (MeasurementType measurementType in measurementTypes) { try { - using (SqlConnection connection = new SqlConnection(Maps.ReportConnectionString)) + using (IDbConnection connection = sqlSchema.GetNewConnection(Maps.ReportConnectionString)) { connection.Open(); - using (SqlCommand command = new SqlCommand()) + using (IDbCommand command = connection.CreateCommand()) { command.Connection = connection; object measurementValue = ProduceMeasurement(date, measurementType, app, persist, command); @@ -202,7 +203,7 @@ private string[] GetApps(string sql) return apps.ToArray(); } - private object ProduceMeasurement(DateTime date, MeasurementType measurementType, App app, bool persist, SqlCommand persistCommand) + private object ProduceMeasurement(DateTime date, MeasurementType measurementType, App app, bool persist, IDbCommand persistCommand) { Measurement measurement = GetMeasurement(app, measurementType); object value = measurement.Get(date); diff --git a/Durados.Web.Mvc/UI/Helpers/AppFactory.cs b/Durados.Web.Mvc/UI/Helpers/AppFactory.cs index a5428992..231f3ac2 100644 --- a/Durados.Web.Mvc/UI/Helpers/AppFactory.cs +++ b/Durados.Web.Mvc/UI/Helpers/AppFactory.cs @@ -4,6 +4,7 @@ using System.Text; using System.Threading.Tasks; using Durados.DataAccess; +using System.Data.Common; namespace Durados.Web.Mvc.UI.Helpers { @@ -15,13 +16,9 @@ public class AppFactory public NewDatabaseParameters GetNewExternalDBParameters(Durados.SqlProduct sqlProduct, string id, out string server,out int port,string sampleApp)//, out string catalog { - // set all the database parameters for the createapp - - Durados.Web.Mvc.UI.Helpers.NewDatabaseParameters newDbParameters = new Durados.Web.Mvc.UI.Helpers.RDSNewDatabaseFactory().GetNewParameters(sqlProduct, id); - //catalog = newDbParameters.DbName; + Durados.Web.Mvc.UI.Helpers.NewDatabaseParameters newDbParameters = new Durados.Web.Mvc.UI.Helpers.RDSNewDatabaseFactory().GetNewParameters(sqlProduct, id); + CreateNewSchemaAndUser(sqlProduct, out server,out port, newDbParameters,sampleApp); - //server = newDbParameters.InstanceName; //System.Configuration.ConfigurationManager.AppSettings["AWSServer"]??".";//aws database server - //catalog = sqlProduct == Durados.SqlProduct.SqlServer ? newDbParameters.InstanceName : newDbParameters.DbName; return newDbParameters; } @@ -114,40 +111,14 @@ public string GetExternalAvailableInstanceConnectionString(SqlProduct product,ou string password = null; server = null; port = 0; - string spName = "durados_GetExternalAvailableInstance"; - int? connectionId= null; - using (System.Data.IDbConnection cnn = Durados.DataAccess.DataAccessObject.GetNewConnection(SqlProduct.SqlServer, Maps.Instance.ConnectionString)) - { - using (DuradosCommand command = new DuradosCommand(GetSystemProduct())) - { - command.Connection = cnn; - command.CommandText = spName; - command.CommandType = System.Data.CommandType.StoredProcedure; - if (command.Connection.State == System.Data.ConnectionState.Closed) - { - try - { - command.Connection.Open(); - } - catch(Exception ex) - { - Maps.Instance.DuradosMap.Logger.Log("AppFactory", null, "GetExternalAvailableInstanceConnection", null, 1, "No connection to main database"); - throw new Exception("No connection to main database", ex); - } - } - System.Data.IDataReader reader = command.ExecuteReader(); - if (reader.Read()) - connectionId = reader.GetInt32(reader.GetOrdinal("SqlConnectionId")); - } - } - + int? connectionId = GetConnectionFromExternalTable(); + Durados.Web.Mvc.View view = GetView(ConnectionViewName); if (!connectionId.HasValue) { - Maps.Instance.DuradosMap.Logger.Log("AppFactory", null, "GetExternalAvailableInstanceConnection", null, 1, "Failed to retrive available external instance = connection id has no value"); - throw new Exception("Failed to retrive available external instance = connection id has no value"); + connectionId = InsertConnectionFromConfig(connectionId, view); } - Durados.Web.Mvc.View view = GetView(ConnectionViewName); + //Durados.Web.Mvc.View view = GetView(ConnectionViewName); System.Data.DataRow connectionRow = view.GetDataRow(connectionId.Value.ToString()); //Dictionary values = new Dictionary(); //values.Add("Id", "&&%&=&&%& " + connectionId.Value.ToString()); @@ -162,7 +133,9 @@ public string GetExternalAvailableInstanceConnectionString(SqlProduct product,ou try { + password = Convert.ToString(connectionRow["Password"]); + password = Maps.Instance.DuradosMap.Decrypt(password); username = Convert.ToString(connectionRow["Username"]); server = Convert.ToString(connectionRow["ServerName"]); catalog = Convert.ToString(connectionRow["Catalog"]); @@ -180,6 +153,120 @@ public string GetExternalAvailableInstanceConnectionString(SqlProduct product,ou + } + + private int? InsertConnectionFromConfig(int? connectionId, Durados.Web.Mvc.View view) + { + string newConnection = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["AppsConnectionString"].ConnectionString; + DbConnectionStringBuilder builder = GetConnectionStringBuilder(Maps.Instance.ConnectionString); + string serverName = builder.Server(); + string catalogName = builder.Database(); + string password = builder.Password(); + password = Maps.Instance.DuradosMap.Encrypt(password); + Dictionary connectionParameters = new Dictionary{ + {"Password", password}, + {"Username",builder.UserId()}, + {"ServerName",serverName}, + {"Catalog",builder.Database()}, + {"ProductPort",builder.Port()}, + {"durados_SqlProduct_durados_SqlConnection_Parent",builder.ProductId()} + }; + + string pk = view.Create(connectionParameters); + int tmpId; + if (string.IsNullOrEmpty(pk) || !int.TryParse(pk, out tmpId)) + { + Maps.Instance.DuradosMap.Logger.Log("AppFactory", null, "GetExternalAvailableInstanceConnection", null, 1, "Failed to retrive available external instance = connection id has no value"); + throw new Exception("Failed to retrive available external instance = connection id has no value"); + } + + connectionId = tmpId; + + // + return SaveExternalInstanceToDb(connectionId, serverName, catalogName); + } + + private int? SaveExternalInstanceToDb(int? connectionId,string serverName, string catalogName) + { + //ISqlMainSchema sqlSchema = Maps.MainAppSchema; + string sql = Maps.MainAppSchema.InsertNewConnectionToExternalServerTable(); + + using (System.Data.IDbConnection cnn = Maps.MainAppSchema.GetNewConnection(Maps.Instance.ConnectionString)) + { + using (System.Data.IDbCommand command = cnn.CreateCommand()) + { + command.CommandText = sql; + command.CommandType = System.Data.CommandType.Text; + if (command.Connection.State == System.Data.ConnectionState.Closed) + { + try + { + command.Connection.Open(); + } + catch (Exception ex) + { + Maps.Instance.DuradosMap.Logger.Log("AppFactory", null, "InsertExternalAvailableInstanceConnection", null, 1, "New connection to main database"); + throw new Exception("New connection to main database", ex); + } + } + GetNewDbParameter(serverName, command, "serverName"); + GetNewDbParameter(catalogName, command, "catalog"); + GetNewDbParameter(1, command, "IsActive"); + GetNewDbParameter(connectionId, command, "SqlConnectionId"); + object scalar = command.ExecuteScalar(); + + if (scalar == null || scalar == DBNull.Value) + { + throw new DuradosException("Fail to insert new external connection"); + } + + } + // + return connectionId; + } + } + + private static void GetNewDbParameter(object connectionId, System.Data.IDbCommand command,string parameterName) + { + var parameter = command.CreateParameter(); + parameter.ParameterName = parameterName; + parameter.Value = connectionId; + command.Parameters.Add(parameter); + } + + private int? GetConnectionFromExternalTable() + { + string spName = "durados_GetExternalAvailableInstance"; + int? connectionId = null; + using (System.Data.IDbConnection cnn = Maps.MainAppSchema.GetNewConnection(Maps.Instance.ConnectionString)) + { + using (DuradosCommand command = new DuradosCommand(GetSystemProduct())) + { + command.Connection = cnn; + command.CommandText = spName; + command.CommandType = System.Data.CommandType.StoredProcedure; + if (command.Connection.State == System.Data.ConnectionState.Closed) + { + try + { + command.Connection.Open(); + } + catch (Exception ex) + { + Maps.Instance.DuradosMap.Logger.Log("AppFactory", null, "GetExternalAvailableInstanceConnection", null, 1, "No connection to main database"); + throw new Exception("No connection to main database", ex); + } + } + var parameter = command.CreateParameter(); + parameter.ParameterName = "productId"; + parameter.Value = 3; + command.Parameters.Add(parameter); + System.Data.IDataReader reader = command.ExecuteReader(); + if (reader.Read()) + connectionId = reader.GetInt32(reader.GetOrdinal("SqlConnectionId")); + } + } + return connectionId; } public void CreateNewSystemSchemaAndUser(string connectionString, NewDatabaseParameters newDbParameters) { @@ -199,14 +286,14 @@ protected virtual View GetView(string viewName) } private SqlProduct GetSystemProduct() { - return SqlProduct.SqlServer; + return Maps.Instance.DuradosMap.SqlProduct; ; } public static string GetConnectionString(string serverName, string catalog, bool? integratedSecurity, string username, string password, string duradosuserId, Durados.SqlProduct sqlProduct, int localPort, bool usesSsh, bool usesSsl) { string connectionString = null; - System.Data.SqlClient.SqlConnectionStringBuilder builder = new System.Data.SqlClient.SqlConnectionStringBuilder(); - builder.ConnectionString = Maps.Instance.ConnectionString; + DbConnectionStringBuilder cnnBuilder = GetConnectionStringBuilder(Maps.Instance.ConnectionString); + bool hasServer = !string.IsNullOrEmpty(serverName); bool hasCatalog = !string.IsNullOrEmpty(catalog); @@ -220,7 +307,7 @@ public static string GetConnectionString(string serverName, string catalog, bool { if (!hasServer) { - serverName = builder.DataSource; + serverName = cnnBuilder.Server(); } connectionString = "Data Source={0};Initial Catalog={1};Integrated Security=True;"; @@ -264,7 +351,7 @@ public static string GetConnectionString(string serverName, string catalog, bool if (!hasServer) { if (Maps.AllowLocalConnection) - serverName = builder.DataSource; + serverName = cnnBuilder.Server(); else throw new Durados.DuradosException("Server Name is missing"); } @@ -272,7 +359,7 @@ public static string GetConnectionString(string serverName, string catalog, bool if (!hasUsername) { if (Maps.AllowLocalConnection) - username = builder.UserID; + username = cnnBuilder.UserId(); else throw new Durados.DuradosException("Username is missing"); } @@ -280,7 +367,7 @@ public static string GetConnectionString(string serverName, string catalog, bool if (!hasPassword) { if (Maps.AllowLocalConnection) - password = builder.Password; + password = cnnBuilder.Password(); else throw new Durados.DuradosException("Password is missing"); } @@ -305,10 +392,10 @@ public Dictionary GetExternalInstanceConnection() private List GetExternalConnectionIds() { List conIds = new List(); - string sql = "SELECT SqlConnectionId FROM durados_ExternaInstance WITH(NOLOCK) INNER JOIN durados_SqlConnection WITH(NOLOCK) on durados_SqlConnection.Id = durados_ExternaInstance.SqlConnectionId"; - using (System.Data.IDbConnection cnn = Durados.DataAccess.DataAccessObject.GetNewConnection(SqlProduct.SqlServer, Maps.Instance.ConnectionString)) + string sql = Maps.MainAppSchema.GetExternalConnectionIdsSql(); + using (System.Data.IDbConnection cnn = Maps.MainAppSchema.GetNewConnection(Maps.Instance.ConnectionString) ) { - using (DuradosCommand command = new DuradosCommand(GetSystemProduct())) + using (System.Data.IDbCommand command = cnn.CreateCommand()) { command.Connection = cnn; command.CommandText = sql; @@ -372,6 +459,60 @@ private Dictionary GetConnectionFromConnectionId(List connI return connStrs; } + public static DbConnectionStringBuilder GetConnectionStringBuilder(string connectionString) + { + if (MySqlAccess.IsMySqlConnectionString(connectionString)) + return new MySql.Data.MySqlClient.MySqlConnectionStringBuilder(connectionString); + return new System.Data.SqlClient.SqlConnectionStringBuilder(connectionString); + + } + } + public static class DbStringBuilderExtention + { + public static string Server( this DbConnectionStringBuilder builder){ + if(builder is MySql.Data.MySqlClient.MySqlConnectionStringBuilder) + return builder["server"].ToString(); + return builder["Data Source"].ToString(); + } + + public static string Database(this DbConnectionStringBuilder builder) + { + if (builder is MySql.Data.MySqlClient.MySqlConnectionStringBuilder) + return builder["database"].ToString(); + return builder["Initial Catalog"].ToString(); + } + public static string UserId(this DbConnectionStringBuilder builder) + { + if (builder is MySql.Data.MySqlClient.MySqlConnectionStringBuilder) + return builder["uid"].ToString(); + return builder["User ID"].ToString(); + } + + public static string Password(this DbConnectionStringBuilder builder) + { + if (builder is MySql.Data.MySqlClient.MySqlConnectionStringBuilder) + return builder["password"].ToString(); + return builder["Password"].ToString(); + } + public static string Port(this DbConnectionStringBuilder builder) + { + if (builder is MySql.Data.MySqlClient.MySqlConnectionStringBuilder) + return builder["port"].ToString(); + return builder["ProductPort"].ToString(); + } + public static bool IntegratedSecurity(this DbConnectionStringBuilder builder) + { + if (builder is MySql.Data.MySqlClient.MySqlConnectionStringBuilder) + return false; + return (builder as System.Data.SqlClient.SqlConnectionStringBuilder).IntegratedSecurity; + } + public static int ProductId(this DbConnectionStringBuilder builder) + { + if (builder is MySql.Data.MySqlClient.MySqlConnectionStringBuilder) + return (int)SqlProduct.MySql; + return (int)SqlProduct.SqlServer; + } + } } diff --git a/Durados.Web.Mvc/UI/Helpers/Config/Cloud/AWS/AwsStorage.cs b/Durados.Web.Mvc/UI/Helpers/Config/Cloud/AWS/AwsStorage.cs new file mode 100644 index 00000000..0b7df7b2 --- /dev/null +++ b/Durados.Web.Mvc/UI/Helpers/Config/Cloud/AWS/AwsStorage.cs @@ -0,0 +1,189 @@ +using Amazon.S3.IO; +using Amazon.S3.Model; +using Amazon.S3.Transfer; +using Durados.SmartRun; +using Durados.Web.Mvc.Azure; +using Durados.Web.Mvc.Farm; +using Microsoft.WindowsAzure.StorageClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Durados.Web.Mvc.UI.Helpers.Config.Cloud.AWS +{ + public class AwsStorage : IStorage + { + private Map Map; + + public AwsStorage(Map map) + { + this.Map = map; + } + + public void Read(DataSet ds, string filename, string appName, bool isMainMap) + { + CheckIfConfigIsLockedAndWait(appName, isMainMap); + + TransferUtility fileTransferUtility = GetTransferUtility(); + + + string containerName = Maps.GetStorageBlobName(filename); + string key = containerName + "/" + containerName; + + try + { + //BlobStream stream = blob.OpenRead(); + //string tempFileName = fileInfo.DirectoryName + "\\temp" + filenameOnly + "." + fileInfo.Extension; + + using (MemoryStream stream = fileTransferUtility.OpenStream(Maps.ConfigAwsStorageBucketName, key) as MemoryStream) + { + stream.Seek(0, SeekOrigin.Begin); + + ds.ReadXml(stream); + } + //System.IO.File.Delete(tempFileName); + + } + catch { } + } + + DuradosStorage storage = new DuradosStorage(); + + private TransferUtility GetTransferUtility() + { + return new + TransferUtility(Maps.ConfigAwsStorageAccessKeyID, Maps.ConfigAwsStorageSecretAccessKey); + } + + private void CheckIfConfigIsLockedAndWait(string appName, bool isMainMap) + { + try + { + RunWithRetry.Run( + () => + { + // for ELB check if caching was completed + if (!isMainMap && !string.IsNullOrEmpty(appName)) + { + if (!FarmCachingSingeltone.Instance.IsAsyncCacheCompleted(appName)) + { + throw new AsyncCacheIsNotCompletedException(); + } + } + + }, 10, 500); + } + catch (AsyncCacheIsNotCompletedException exception) + { + // clear lock from redis + FarmCachingSingeltone.Instance.AsyncCacheCompleted(appName); + + Maps.Instance.DuradosMap.Logger.Log("ReadConfigFromCloud", "ReadConfigFromCloud", "ReadConfigFromCloud", exception, 1, ""); + } + } + + public void Write(DataSet ds, string filename, bool async, Map map, string version) + { + + TransferUtility fileTransferUtility = GetTransferUtility(); + + string containerName = Maps.GetStorageBlobName(filename); + string key = containerName + "/" + containerName + version; + + if (string.IsNullOrEmpty(version)) + Maps.Instance.StorageCache.Add(containerName, ds); + + + + if (!Maps.Instance.StorageCache.ContainsKey(containerName) || !async) + { + using (MemoryStream stream = new MemoryStream()) + { + ds.WriteXml(stream, XmlWriteMode.WriteSchema); + stream.Seek(0, SeekOrigin.Begin); + fileTransferUtility.Upload(stream, Maps.ConfigAwsStorageBucketName, key); + Map.RefreshApis(map); + //Maps.Instance.Backup.BackupAsync(container, containerName); + } + } + else + { + MemoryStream stream = new MemoryStream(); + ds.WriteXml(stream, XmlWriteMode.WriteSchema); + stream.Seek(0, SeekOrigin.Begin); + + DateTime started = DateTime.Now; + + fileTransferUtility.BeginUpload(stream, Maps.ConfigAwsStorageBucketName, key, TransferCompletedCallback, new TransferAsyncState(fileTransferUtility, stream, started, containerName, key, map)); + + } + } + + private bool IsBigBlob(string blobName) + { + return !(blobName.EndsWith("xml")); + } + + private void TransferCompletedCallback(IAsyncResult result) + { + TransferAsyncState state = (TransferAsyncState)result.AsyncState; + if (state == null || state.Map == null) + return; + + if (IsBigBlob(state.ContainerName)) + { + FarmCachingSingeltone.Instance.AsyncCacheCompleted(state.Map.AppName); + } + + + Map.RefreshApis(state.Map); + + try + { + state.FileTransferUtility.EndUpload(result); + if (!Maps.IsApi2()) + { + //Maps.Instance.Backup.BackupAsync(state.Container, state.BlobName); + } + } + catch (Exception exception) + { + Map map = Maps.Instance.GetMap(); + map.Logger.Log("Map", "TransferCompletedCallback", map.AppName ?? string.Empty, exception, 1, string.Empty); + } + } + + public bool Exists(string filename) + { + if (Maps.Cloud) + { + System.IO.FileInfo fileInfo = new FileInfo(filename); + string filenameOnly = fileInfo.Name.Remove(fileInfo.Name.Length - fileInfo.Extension.Length, fileInfo.Extension.Length); + string containerName = filenameOnly.Replace("_", "").ToLower(); + + using (var client = Amazon.AWSClientFactory.CreateAmazonS3Client(Maps.ConfigAwsStorageAccessKeyID, Maps.ConfigAwsStorageSecretAccessKey)) + { + var request = new ListObjectsRequest() + .WithBucketName(Maps.ConfigAwsStorageBucketName) + .WithPrefix(containerName); + + var response = client.ListObjects(request); + + return response.S3Objects.Count > 0; + + + } + + + } + else + { + return System.IO.File.Exists(filename); + } + } + } +} diff --git a/Durados.Web.Mvc/UI/Helpers/Config/Cloud/AWS/TransferAsyncState.cs b/Durados.Web.Mvc/UI/Helpers/Config/Cloud/AWS/TransferAsyncState.cs new file mode 100644 index 00000000..176eb717 --- /dev/null +++ b/Durados.Web.Mvc/UI/Helpers/Config/Cloud/AWS/TransferAsyncState.cs @@ -0,0 +1,29 @@ +using Amazon.S3.Transfer; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; + +namespace Durados.Web.Mvc.UI.Helpers.Config.Cloud.AWS +{ + public class TransferAsyncState + { + public TransferUtility FileTransferUtility; + public Stream Stream; + public DateTime Started; + public string ContainerName; + public string Key; + public Map Map; + + public TransferAsyncState(TransferUtility fileTransferUtility, Stream stream, DateTime started, string containerName, string key, Map map) + { + FileTransferUtility = fileTransferUtility; + Stream = stream; + Started = started; + ContainerName = containerName; + Key = key; + Map = map; + } + } +} diff --git a/Durados.Web.Mvc/UI/Helpers/Config/Cloud/Azure/AzureStorage.cs b/Durados.Web.Mvc/UI/Helpers/Config/Cloud/Azure/AzureStorage.cs new file mode 100644 index 00000000..d031cd96 --- /dev/null +++ b/Durados.Web.Mvc/UI/Helpers/Config/Cloud/Azure/AzureStorage.cs @@ -0,0 +1,182 @@ +using Durados.SmartRun; +using Durados.Web.Mvc.Azure; +using Durados.Web.Mvc.Farm; +using Microsoft.WindowsAzure.StorageClient; +using System; +using System.Collections.Generic; +using System.Data; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Durados.Web.Mvc.UI.Helpers.Config.Cloud.Azure +{ + public class AzureStorage : IStorage + { + private Map Map; + + public AzureStorage(Map map) + { + this.Map = map; + } + + public void Read(DataSet ds, string filename, string appName, bool isMainMap) + { + CheckIfConfigIsLockedAndWait(appName, isMainMap); + + string containerName = Maps.GetStorageBlobName(filename); + CloudBlobContainer container = GetContainer(containerName); + + CloudBlob blob = container.GetBlobReference(containerName); + try + { + //BlobStream stream = blob.OpenRead(); + //string tempFileName = fileInfo.DirectoryName + "\\temp" + filenameOnly + "." + fileInfo.Extension; + + using (MemoryStream stream = new MemoryStream()) + { + blob.DownloadToStream(stream); + + stream.Seek(0, SeekOrigin.Begin); + + ds.ReadXml(stream); + } + //System.IO.File.Delete(tempFileName); + + } + catch { } + } + + DuradosStorage storage = new DuradosStorage(); + + private CloudBlobContainer GetContainer(string filename) + { + // Get a handle on account, create a blob service client and get container proxy + //var account = CloudStorageAccount.Parse(RoleEnvironment.GetConfigurationSettingValue("ConfigAzureStorage")); + //var client = account.CreateCloudBlobClient(); + //return client.GetContainerReference(RoleEnvironment.GetConfigurationSettingValue("configContainer")); + return storage.GetContainer(filename); + } + + private void CheckIfConfigIsLockedAndWait(string appName, bool isMainMap) + { + try + { + RunWithRetry.Run( + () => + { + // for ELB check if caching was completed + if (!isMainMap && !string.IsNullOrEmpty(appName)) + { + if (!FarmCachingSingeltone.Instance.IsAsyncCacheCompleted(appName)) + { + throw new AsyncCacheIsNotCompletedException(); + } + } + + }, 10, 500); + } + catch (AsyncCacheIsNotCompletedException exception) + { + // clear lock from redis + FarmCachingSingeltone.Instance.AsyncCacheCompleted(appName); + + Maps.Instance.DuradosMap.Logger.Log("ReadConfigFromCloud", "ReadConfigFromCloud", "ReadConfigFromCloud", exception, 1, ""); + } + } + + public void Write(DataSet ds, string filename, bool async, Map map, string version) + { + string containerName = Maps.GetStorageBlobName(filename); + if (string.IsNullOrEmpty(version)) + Maps.Instance.StorageCache.Add(containerName, ds); + + CloudBlobContainer container = GetContainer(containerName); + + CloudBlob blob = container.GetBlobReference(containerName + version); + blob.Properties.ContentType = "application/xml"; + + if (!Maps.Instance.StorageCache.ContainsKey(containerName) || !async) + { + using (MemoryStream stream = new MemoryStream()) + { + ds.WriteXml(stream, XmlWriteMode.WriteSchema); + stream.Seek(0, SeekOrigin.Begin); + blob.UploadFromStream(stream); + Map.RefreshApis(map); + Maps.Instance.Backup.BackupAsync(container, containerName); + } + } + else + { + MemoryStream stream = new MemoryStream(); + ds.WriteXml(stream, XmlWriteMode.WriteSchema); + stream.Seek(0, SeekOrigin.Begin); + + DateTime started = DateTime.Now; + + blob.BeginUploadFromStream(stream, BlobTransferCompletedCallback, new BlobTransferAsyncState(blob, stream, started, container, containerName, map)); + } + } + + private bool IsBigBlob(string blobName) + { + return !(blobName.EndsWith("xml")); + } + + private void BlobTransferCompletedCallback(IAsyncResult result) + { + BlobTransferAsyncState state = (BlobTransferAsyncState)result.AsyncState; + if (state == null || state.Map == null) + return; + + if (IsBigBlob(state.BlobName)) + { + FarmCachingSingeltone.Instance.AsyncCacheCompleted(state.Map.AppName); + } + + //try + //{ + // Maps.Instance.DuradosMap.Logger.Log("Map", "WriteConfigToCloud", state.Map.AppName ?? string.Empty, DateTime.Now.Subtract(state.Started).TotalMilliseconds.ToString(), string.Empty, -8, state.BlobName + " ended", DateTime.Now); + //} + //catch { } + + Map.RefreshApis(state.Map); + + try + { + state.Blob.EndUploadFromStream(result); + if (!Maps.IsApi2()) + { + Maps.Instance.Backup.BackupAsync(state.Container, state.BlobName); + } + } + catch (Exception exception) + { + Map map = Maps.Instance.GetMap(); + map.Logger.Log("Map", "BlobTransferCompletedCallback", map.AppName ?? string.Empty, exception, 1, string.Empty); + } + } + + public bool Exists(string filename) + { + if (Maps.Cloud) + { + System.IO.FileInfo fileInfo = new FileInfo(filename); + string filenameOnly = fileInfo.Name.Remove(fileInfo.Name.Length - fileInfo.Extension.Length, fileInfo.Extension.Length); + string containerName = filenameOnly.Replace("_", "").ToLower(); + + CloudBlobContainer container = GetContainer(containerName); + + CloudBlob blob = container.GetBlobReference(containerName); + + return blob.Exists(); + } + else + { + return System.IO.File.Exists(filename); + } + } + } +} diff --git a/Durados.Web.Mvc/UI/Helpers/Config/Cloud/CloudProvider.cs b/Durados.Web.Mvc/UI/Helpers/Config/Cloud/CloudProvider.cs new file mode 100644 index 00000000..7f373aa1 --- /dev/null +++ b/Durados.Web.Mvc/UI/Helpers/Config/Cloud/CloudProvider.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Durados.Web.Mvc.UI.Helpers.Config.Cloud +{ + public enum CloudProvider + { + AWS, + Azure + } +} diff --git a/Durados.Web.Mvc/UI/Helpers/Config/Cloud/IStorage.cs b/Durados.Web.Mvc/UI/Helpers/Config/Cloud/IStorage.cs new file mode 100644 index 00000000..8ef2a474 --- /dev/null +++ b/Durados.Web.Mvc/UI/Helpers/Config/Cloud/IStorage.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Durados.Web.Mvc.UI.Helpers.Config.Cloud +{ + public interface IStorage + { + void Read(DataSet ds, string filename, string appName, bool isMainMap); + + void Write(DataSet ds, string filename, bool async, Map map, string version); + + bool Exists(string filename); + + } +} diff --git a/Durados.Web.Mvc/UI/Helpers/Config/Cloud/StorageFactory.cs b/Durados.Web.Mvc/UI/Helpers/Config/Cloud/StorageFactory.cs new file mode 100644 index 00000000..c79e6fba --- /dev/null +++ b/Durados.Web.Mvc/UI/Helpers/Config/Cloud/StorageFactory.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Durados.Web.Mvc.UI.Helpers.Config.Cloud +{ + public class StorageFactory + { + public static IStorage GetStorage(CloudProvider cloudProvider, Map map) + { + if (cloudProvider == CloudProvider.Azure) + { + return new Azure.AzureStorage(map); + } + else if (cloudProvider == CloudProvider.AWS) + { + return new AWS.AwsStorage(map); + } + else + { + throw new NotImplementedException(); + } + } + } +} diff --git a/Durados.Web.Mvc/UI/Helpers/PlugInHelper.cs b/Durados.Web.Mvc/UI/Helpers/PlugInHelper.cs index 370af405..ad0bd0e8 100644 --- a/Durados.Web.Mvc/UI/Helpers/PlugInHelper.cs +++ b/Durados.Web.Mvc/UI/Helpers/PlugInHelper.cs @@ -294,7 +294,7 @@ public static string GetCreatorGuid(this Database database, int appId) public static int? GetCreator(this Database database, int appId) { - string sql = "SELECT Creator FROM dbo.durados_App WITH (NOLOCK) WHERE dbo.durados_App.Id = " + appId; + string sql = SqlSchema.GetCreatorSql(appId); string scalar = SqlAccess.ExecuteScalar(database.ConnectionString, sql); @@ -306,7 +306,7 @@ public static string GetCreatorGuid(this Database database, int appId) public static string GetCreatorUsername(this Database database, int appId) { - string sql = "SELECT dbo.durados_User.[Username] FROM dbo.durados_App WITH (NOLOCK) INNER JOIN dbo.durados_User WITH (NOLOCK) ON dbo.durados_App.Creator = dbo.durados_User.ID WHERE dbo.durados_App.Id = " + appId; + string sql = SqlSchema.GetCreatorUsername(appId); return SqlAccess.ExecuteScalar(database.ConnectionString, sql); } @@ -344,21 +344,31 @@ public static void HandleDatabaseInventory(this Database database, int templateA } private static SqlAccess _sqlAccess = null; + private static ISqlMainSchema _sqlSchema = null; private static SqlAccess SqlAccess { get { if (_sqlAccess == null) - _sqlAccess = new SqlAccess(); + _sqlAccess = Maps.MainAppSqlAccess; return _sqlAccess; } } + private static ISqlMainSchema SqlSchema + { + get + { + if (_sqlSchema == null) + _sqlSchema = Maps.MainAppSchema; + return _sqlSchema; + } + } private static string GetNewDatabaseName(Database database, int templateAppId, PlugInType plugInType, out int dbCount) { - string sql = "select DatabaseName, DbCount from durados_SampleApp WITH (NOLOCK) where PlugInId = " + ((int)plugInType) + " and AppId = " + templateAppId; + string sql = SqlSchema.GetNewDatabaseNameSql(((int)plugInType), templateAppId); DataTable table = SqlAccess.ExecuteTable(database.ConnectionString, sql, null, CommandType.Text); diff --git a/Durados.Web.Mvc/UI/Helpers/RestHelper.cs b/Durados.Web.Mvc/UI/Helpers/RestHelper.cs index 056845e9..6ffef1e9 100644 --- a/Durados.Web.Mvc/UI/Helpers/RestHelper.cs +++ b/Durados.Web.Mvc/UI/Helpers/RestHelper.cs @@ -1055,15 +1055,16 @@ public static object GetKeys(string appName) if (!(role == "Admin" || role == "Developer")) throw new DuradosException("Only admin can get keys. your role is " + role); - string sql = string.Format("SELECT * FROM [durados_app] WITH(NOLOCK) WHERE [Name] = '{0}'", appName); + string sql = Maps.MainAppSchema.GetAppRowByNameSql(appName); Dictionary keys = new Dictionary(); - using (System.Data.SqlClient.SqlConnection cnn = new System.Data.SqlClient.SqlConnection(Maps.Instance.DuradosMap.Database.ConnectionString)) + using (IDbConnection cnn = Maps.MainAppSchema.GetNewConnection(Maps.Instance.ConnectionString)) { - using (System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand(sql, cnn)) + using (IDbCommand command = cnn.CreateCommand()) { + command.CommandText = sql; cnn.Open(); - using (System.Data.SqlClient.SqlDataReader reader = command.ExecuteReader()) + using (IDataReader reader = command.ExecuteReader()) { while (reader.Read()) { @@ -1114,20 +1115,25 @@ public static object ResetKey(string appName, string key) string val = null; - - using (System.Data.SqlClient.SqlConnection cnn = new System.Data.SqlClient.SqlConnection(Maps.Instance.DuradosMap.Database.ConnectionString)) + ISqlMainSchema sqlSchema = Maps.MainAppSchema; + string sqlUpdate = sqlSchema.GetUpdateAppMasterGuid(appName, columnName); + string sqlSelect = sqlSchema.GetAppRowByNameSql(appName); + using (IDbConnection cnn = sqlSchema.GetNewConnection() ) { - using (System.Data.SqlClient.SqlCommand command = new System.Data.SqlClient.SqlCommand("", cnn)) + using (IDbCommand command = cnn.CreateCommand()) { cnn.Open(); - command.CommandText = string.Format("update [durados_app] set [{1}] = @newGuid WHERE [Name] = '{0}'", appName, columnName); - command.Parameters.AddWithValue("newGuid", Guid.NewGuid()); + command.CommandText = sqlUpdate; + IDbDataParameter parameter = command.CreateParameter(); + parameter.ParameterName = "newGuid"; + parameter.Value = Guid.NewGuid(); + command.Parameters.Add(parameter); command.ExecuteNonQuery(); command.Parameters.Clear(); - command.CommandText = string.Format("SELECT * FROM [durados_app] WITH(NOLOCK) WHERE [Name] = '{0}'", appName); - using (System.Data.SqlClient.SqlDataReader reader = command.ExecuteReader()) + command.CommandText = sqlSelect; + using (IDataReader reader = command.ExecuteReader()) { while (reader.Read()) { @@ -1377,6 +1383,7 @@ protected override object GetColumnValue(View view, DataRow dataRow, ColumnField if (IsView(view)) { + /* if (columnField.Name == "AllowCreate") { View realView = GetViewFromViewRow(view, dataRow); @@ -1397,7 +1404,7 @@ protected override object GetColumnValue(View view, DataRow dataRow, ColumnField return realView.IsDeletable(); } - else if (columnField.Name == "HideInMenu") + else */if (columnField.Name == "HideInMenu") { View realView = GetViewFromViewRow(view, dataRow); @@ -6128,7 +6135,7 @@ public RefereshTokenException(string message) public class RefreshToken { - static SqlAccess sql = new SqlAccess(); + static string key = "RefreshToken"; static RefreshToken() { @@ -6561,9 +6568,9 @@ private int GetCreator(string username) private void DeleteBadApp(int appId, string connectionString) { - string sql = - "delete from durados_App where [id] = @id "; - new SqlAccess().ExecuteNonQuery(connectionString, sql, new Dictionary() { { "id", appId } }, null); + string sql = Maps.MainAppSchema.GetDeleteAppById(appId); + + Maps.MainAppSqlAccess.ExecuteNonQuery(connectionString, sql, new Dictionary() { { "id", appId } }, null); } @@ -6625,20 +6632,10 @@ private bool ShouldBeUsed() private int? FindAndUpdateAppInMain(string appName, string title, int creator, int poolCreator, string connectionString, int? templateId) { - string sql = - "begin tran getFromPool " + - "declare @appId int " + - "select top(1) @appId = id from durados_App with(UPDLOCK) where TemplateId " + (templateId.HasValue ? " = " + templateId.Value : " is null ").ToString() + " and creator = @poolCreator and DatabaseStatus = 1 and ToDelete = 0 order by id asc; " + - "delete from durados_App where [Name] = @Name; " + - "update durados_App " + - "set creator = @creator, " + - "[CreatedDate] = @CreatedDate, " + - "[Name] = @Name, " + - "[Title] = @Title " + - "where id = @appId; " + - "select @appId " + - "commit tran getFromPool"; - string scalar = new SqlAccess().ExecuteScalar(connectionString, sql, new Dictionary() { { "poolCreator", poolCreator }, { "creator", creator }, { "CreatedDate", DateTime.Now }, { "Name", appName }, { "Title", title } }); + SqlAccess sqlAccess = Maps.MainAppSqlAccess; + string varConnectionString = string.Format("{0};{1};", connectionString.TrimEnd(';'), Maps.MainAppSchema.GetConnectionStringAllowVeriables()); + string sql = Maps.MainAppSchema.GetFindAndUpdateAppInMainSql(templateId); + string scalar = sqlAccess.ExecuteScalar(varConnectionString, sql, new Dictionary() { { "poolCreator", poolCreator }, { "creator", creator }, { "CreatedDate", DateTime.Now }, { "Name", appName }, { "Title", title } }); if (!string.IsNullOrEmpty(scalar)) { return Convert.ToInt32(scalar); diff --git a/Durados.Web.Mvc/UI/Helpers/SecurityHelper.cs b/Durados.Web.Mvc/UI/Helpers/SecurityHelper.cs index efded00e..9f899149 100644 --- a/Durados.Web.Mvc/UI/Helpers/SecurityHelper.cs +++ b/Durados.Web.Mvc/UI/Helpers/SecurityHelper.cs @@ -284,6 +284,7 @@ public static bool IsLogo(System.Collections.Specialized.NameValueCollection que public static string GetUserGuidFromTmpGuid(string tmpGuid) { + // TODO: add specific behaior for Super user Durados.DataAccess.SqlAccess sqlAccess = new DataAccess.SqlAccess(); Dictionary parameters = new Dictionary(); parameters.Add("@id", tmpGuid); @@ -293,7 +294,7 @@ public static string GetUserGuidFromTmpGuid(string tmpGuid) } public static string GetTmpUserGuidFromGuid(string guid,int minutes=15) { - + // TODO: add specific behaior for Super user Dictionary parameters = new Dictionary(); parameters.Add("@userGuid", guid); @@ -305,13 +306,13 @@ public static string GetTmpUserGuidFromGuid(string guid,int minutes=15) private static string CallValidUserGuidSP(Dictionary parameters,string spName,string retParamName) { - Durados.DataAccess.SqlAccess sqlAccess = new DataAccess.SqlAccess(); + Durados.DataAccess.SqlAccess sqlAccess = Maps.MainAppSqlAccess; List outputsParams= new List(); outputsParams.Add(retParamName); - System.Data.SqlClient.SqlParameter[] sqlParameters = sqlAccess.ExecuteProcedure(Maps.Instance.ConnectionString, spName, parameters, outputsParams, null); + System.Data.IDataParameter[] sqlParameters = sqlAccess.ExecuteProcedure(Maps.Instance.ConnectionString, spName, parameters, outputsParams, null); if (sqlParameters.Length > 0) { - foreach (System.Data.SqlClient.SqlParameter parameter in sqlParameters) + foreach (System.Data.IDataParameter parameter in sqlParameters) if (parameter.ParameterName == retParamName) return parameter.Value == null ? null : parameter.Value.ToString(); } diff --git a/Durados.Workflow/ApprovalProcess.cs b/Durados.Workflow/ApprovalProcess.cs index c7318449..22f14922 100644 --- a/Durados.Workflow/ApprovalProcess.cs +++ b/Durados.Workflow/ApprovalProcess.cs @@ -229,8 +229,9 @@ protected virtual Dictionary Notify(IApprovalProcess controller, st controller.GetEmailInfo(userId.ToString(), out to, out name); messages.Add(approvalProcessUserId, message); SendEmail(controller, to, string.Empty, message, subject); - string messageBoardId = ((INotifier)controller).SaveInMessageBoard(parameters, childrenField.ChildrenView, values, prevRow, approvalProcessUserId.ToString(), siteWithoutQueryString, urlAction, subject, message, currentUserId, null, new Dictionary()); - ((INotifier)controller).SaveMessageAction(view, messageBoardId, "True", 5, userId); // Required Action + // TODO : Main MySql + //string messageBoardId = ((INotifier)controller).SaveInMessageBoard(parameters, childrenField.ChildrenView, values, prevRow, approvalProcessUserId.ToString(), siteWithoutQueryString, urlAction, subject, message, currentUserId, null, new Dictionary()); + //((INotifier)controller).SaveMessageAction(view, messageBoardId, "True", 5, userId); // Required Action } diff --git a/Durados.Workflow/Engine.cs b/Durados.Workflow/Engine.cs index 0433080d..893f49fc 100644 --- a/Durados.Workflow/Engine.cs +++ b/Durados.Workflow/Engine.cs @@ -246,13 +246,13 @@ private string GetWhereStatement(View view) return whereStatement.Substring(0, whereStatement.Length - 4); } - private IEnumerable GetWhereParemeters(View view, string pk) + private IEnumerable GetWhereParemeters(View view, string pk) { - List parameters = new List(); + List parameters = new List(); string[] delimitedValues = pk.Split(','); for (int i = 0; i < view.DataTable.PrimaryKey.Length; i++) { - System.Data.SqlClient.SqlParameter parameter = new System.Data.SqlClient.SqlParameter("pk_" + view.DataTable.PrimaryKey[i].ColumnName.ReplaceNonAlphaNumeric(), Convert.ChangeType(delimitedValues[i], view.DataTable.PrimaryKey[i].DataType)); + IDataParameter parameter = new System.Data.SqlClient.SqlParameter("pk_" + view.DataTable.PrimaryKey[i].ColumnName.ReplaceNonAlphaNumeric(), Convert.ChangeType(delimitedValues[i], view.DataTable.PrimaryKey[i].DataType)); parameters.Add(parameter); } @@ -360,7 +360,7 @@ protected virtual bool CheckUsingSql(View view, Durados.Rule rule, Durados.Trigg if (!string.IsNullOrEmpty(pk)) { - foreach (SqlParameter parameter in GetWhereParemeters(view, pk)) + foreach (IDataParameter parameter in GetWhereParemeters(view, pk)) { command.Parameters.Add(GetNewParameter(command, parameter.ParameterName, parameter.Value)); } diff --git a/Durados.Workflow/JavaScript.cs b/Durados.Workflow/JavaScript.cs index 0de61137..6abf1dc9 100644 --- a/Durados.Workflow/JavaScript.cs +++ b/Durados.Workflow/JavaScript.cs @@ -377,7 +377,10 @@ private static IDictionary CleanJson(string message) public static bool IsCrud(System.Net.WebRequest request) { - if (System.Web.HttpContext.Current == null || System.Web.HttpContext.Current.Request.Headers["Authorization"] == null || (System.Web.HttpContext.Current.Request.Url.PathAndQuery.ToLower().Contains("1/user/signup"))) + if (System.Web.HttpContext.Current == null || System.Web.HttpContext.Current.Request == null) + return false; + string pathAndQuery = System.Web.HttpContext.Current.Request.Url.PathAndQuery.ToLower(); + if (System.Web.HttpContext.Current == null || System.Web.HttpContext.Current.Request.Headers["Authorization"] == null || (pathAndQuery.Contains("1/user") || pathAndQuery.Contains("/backandusers"))) return false; if (System.Web.HttpContext.Current.Items.Contains(Database.SignupInProcess)) return false; @@ -419,8 +422,9 @@ private static bool IsBackand(System.Net.WebRequest request) { string localhost = "localhost"; string backand = "backand"; + string[] localAddress = (System.Configuration.ConfigurationManager.AppSettings["localAddress"] ?? string.Empty).Split(','); - return request.RequestUri.AbsoluteUri.Contains(localhost) || request.RequestUri.AbsoluteUri.ToLower().Contains(backand); + return request.RequestUri.AbsoluteUri.Contains(localhost) || request.RequestUri.AbsoluteUri.ToLower().Contains(backand) || localAddress.Contains(request.RequestUri.Scheme + "://" + request.RequestUri.Authority); } public static string PerformCrud(System.Net.WebRequest request, string json) @@ -488,7 +492,8 @@ private static string GetParameters(System.Net.WebRequest request) private static string PerformCrud(System.Net.WebRequest request, string json, Dictionary executeArgs) { - return PerformCrud(request, json, executeArgs, (Durados.Data.IData)executeArgs["controller"], (string)executeArgs["actionName"]); + + return PerformCrud(request, json, executeArgs, executeArgs["controller"] as Durados.Data.IData, (string)executeArgs["actionName"]); } private static string PerformCrud(System.Net.WebRequest request, string json, Dictionary executeArgs, Durados.Data.IData controller, string actionName) @@ -497,7 +502,7 @@ private static string PerformCrud(System.Net.WebRequest request, string json, Di { throw new JavaScriptException(string.Format("The request '{0}' is repeating calling itself. Please change the action {1}", request.RequestUri.AbsoluteUri, actionName), new StackOverflowException()); } - if (controller.DataHandler == null) + if (controller == null || controller.DataHandler == null) { throw new DuradosException("Not performing CRUD"); } diff --git a/Durados.Workflow/Notifier.cs b/Durados.Workflow/Notifier.cs index 2aa57327..90e3a9b7 100644 --- a/Durados.Workflow/Notifier.cs +++ b/Durados.Workflow/Notifier.cs @@ -47,11 +47,8 @@ public virtual void NotifyAsync(object controller, Dictionary if (emailParameters.To.Length > 0) Durados.Cms.DataAccess.Email.Send(host, view.Database.UseSmtpDefaultCredentials, port, username, password, false, emailParameters.To, emailParameters.Cc, emailParameters.Bcc, emailParameters.Subject, emailParameters.Message, emailParameters.From, null, null, ((INotifier)controller).DontSend, view.Database.Logger); - if (ShouldSaveInMessageBoard(controller, parameters, view, values, prevRow, pk, siteWithoutQueryString, connectionString)) - { - SaveInMessageBoard(controller, parameters, view, values, prevRow, pk, siteWithoutQueryString, urlAction, connectionString, emailParameters.Subject, emailParameters.Message, currentUserId, currentUserRole, recipients); + } - } private Dictionary GetRecipients(EmailParameters emailParameters, View userView) { @@ -103,16 +100,16 @@ protected virtual string GetSelectPKStatement(View userView, ISqlTextBuilder sql { return "SELECT " + sqlBuilder.EscapeDbObjectStart + userView.DataTable.PrimaryKey[0].ColumnName + sqlBuilder.EscapeDbObjectEnd + " FROM " + sqlBuilder.EscapeDbObjectStart + userView.DataTable.TableName + sqlBuilder.EscapeDbObjectEnd + " where Email in (" + emailString + ")"; } + //TODO :Main Mysql + //protected virtual bool ShouldSaveInMessageBoard(object controller, Dictionary parameters, View view, Dictionary values, DataRow prevRow, string pk, string siteWithoutQueryString, string connectionString) + //{ + // return !parameters.ContainsKey("ExcludeMessageBoard"); + //} - protected virtual bool ShouldSaveInMessageBoard(object controller, Dictionary parameters, View view, Dictionary values, DataRow prevRow, string pk, string siteWithoutQueryString, string connectionString) - { - return !parameters.ContainsKey("ExcludeMessageBoard"); - } - - protected virtual void SaveInMessageBoard(object controller, Dictionary parameters, View view, Dictionary values, DataRow prevRow, string pk, string siteWithoutQueryString, string urlAction, string connectionString, string subject, string message, int currentUserId, string currentUserRole, Dictionary recipients) - { - ((INotifier)controller).SaveInMessageBoard(parameters, view, values, prevRow, pk, siteWithoutQueryString, urlAction, subject, message, currentUserId, currentUserRole, recipients); - } + //protected virtual void SaveInMessageBoard(object controller, Dictionary parameters, View view, Dictionary values, DataRow prevRow, string pk, string siteWithoutQueryString, string urlAction, string connectionString, string subject, string message, int currentUserId, string currentUserRole, Dictionary recipients) + //{ + // ((INotifier)controller).SaveInMessageBoard(parameters, view, values, prevRow, pk, siteWithoutQueryString, urlAction, subject, message, currentUserId, currentUserRole, recipients); + //} protected virtual EmailParameters GetEmailParameters(object controller, Dictionary parameters, View view, Dictionary values, DataRow prevRow, string pk, string siteWithoutQueryString, string mainSiteWithoutQueryString, string connectionString, string currentUserId, string currentUsername, string currentUserRole) { @@ -155,7 +152,7 @@ public interface INotifier string GetSiteWithoutQueryString(); string GetMainSiteWithoutQueryString(); string GetUrlAction(View view, string pk); - string SaveInMessageBoard(Dictionary parameters, View view, Dictionary values, DataRow prevRow, string pk, string siteWithoutQueryString, string urlAction, string subject, string message, int currentUserId, string currentUserRole, Dictionary recipients); + //string SaveInMessageBoard(Dictionary parameters, View view, Dictionary values, DataRow prevRow, string pk, string siteWithoutQueryString, string urlAction, string subject, string message, int currentUserId, string currentUserRole, Dictionary recipients); void SaveMessageAction(View view, string pk, object value, int messageBoardAction, int userId); string GetFieldValue(Field field, string pk); diff --git a/Durados.Xml/Durados.Xml.csproj b/Durados.Xml/Durados.Xml.csproj index 7c6d3bba..bb63194c 100644 --- a/Durados.Xml/Durados.Xml.csproj +++ b/Durados.Xml/Durados.Xml.csproj @@ -1,175 +1,176 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {758CAABE-E74E-4ECB-AF3E-6B18D19B53D1} - Library - Properties - Durados.Xml - Durados.Xml - v4.5 - 512 - - - 3.5 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - - - - - - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - false - - - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt - AllRules.ruleset - - - bin\x64\Release\ - TRACE - true - pdbonly - x64 - prompt - AllRules.ruleset - - - - False - Lib\ABCpdf.dll - - - False - Lib\DocumentFormat.OpenXml.dll - - - False - Lib\Microsoft.Office.Interop.Word.dll - - - - 3.5 - - - - 3.5 - - - 3.5 - - - - - 3.0 - - - - - - - - - - - - Code - - - - - - - - - - - - - - - - - - - - {FE0D5849-2911-4615-BCC4-C286B213761C} - Durados.DataAccess - - - {04183BAC-B3DA-46EC-BE81-D635768F98F4} - Durados - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {758CAABE-E74E-4ECB-AF3E-6B18D19B53D1} + Library + Properties + Durados.Xml + Durados.Xml + v4.5 + 512 + + + 3.5 + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + + + + + + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + false + + + true + bin\x64\Debug\ + DEBUG;TRACE + full + x64 + prompt + AllRules.ruleset + + + bin\x64\Release\ + TRACE + true + pdbonly + x64 + prompt + AllRules.ruleset + + + + False + Lib\ABCpdf.dll + + + False + Lib\DocumentFormat.OpenXml.dll + + + False + Lib\Microsoft.Office.Interop.Word.dll + + + + 3.5 + + + + 3.5 + + + 3.5 + + + + + 3.0 + + + + + + + + + + + + Code + + + + + + + + + + + + + + + + + + + + + {FE0D5849-2911-4615-BCC4-C286B213761C} + Durados.DataAccess + + + {04183BAC-B3DA-46EC-BE81-D635768F98F4} + Durados + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/Durados.Xml/app.config b/Durados.Xml/app.config new file mode 100644 index 00000000..317c7dca --- /dev/null +++ b/Durados.Xml/app.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Durados/Data/ISqlTextBuilder.cs b/Durados/Data/ISqlTextBuilder.cs index e15b7846..d78349f9 100644 --- a/Durados/Data/ISqlTextBuilder.cs +++ b/Durados/Data/ISqlTextBuilder.cs @@ -69,4 +69,15 @@ string FromDual(); string GetPointFieldStatement(string tableName, string columnName); + + string GetDecryptColumnForSelectStatement(string encryptedName, string databaseNames); + + string GetDecryptColumnStatement(string encryptedName); + + + string GetCloseCertificateStatement(); + + string GetOpenCertificateStatement(); + + string GetDbEncryptedColumnParameterNameSql(string p, string columnName); } \ No newline at end of file diff --git a/Durados/Database.cs b/Durados/Database.cs index b0221f1e..9e43e8ae 100644 --- a/Durados/Database.cs +++ b/Durados/Database.cs @@ -85,6 +85,8 @@ public partial class Database public static readonly string EnableDecryptionKey = "EnableDecryption"; public static readonly string CloudViewName = "durados_Cloud"; + public static readonly string ConnectionViewName = "durados_SqlConnection"; + public virtual Guid Guid diff --git a/Durados/View.cs b/Durados/View.cs index ae86545e..56f78a23 100644 --- a/Durados/View.cs +++ b/Durados/View.cs @@ -2263,6 +2263,7 @@ public class SelectEventArgs : EventArgs { private View view; private object filter; + private DataTable dataTable; public string Sql { get; set; } public SelectEventArgs(View view, object filter) @@ -2271,7 +2272,13 @@ public SelectEventArgs(View view, object filter) this.view = view; this.filter = filter; } - + public SelectEventArgs(View view, object filter,DataTable dataTable) + : base() + { + this.view = view; + this.filter = filter; + this.dataTable = dataTable; + } public View View { get @@ -2289,6 +2296,12 @@ public object Filter } } + public DataTable DataTable{ + get + { + return dataTable; + } + } } public enum TreeType