static App() { AM_Controls.Settings AMSet = new AM_Controls.Settings(new System.Configuration.AppSettingsReader()); ReportsDirectory = LoadDirectoryString("ReportsDirectory", "..\\..\\_Reports\\"); AM_Controls.MsgBoxX.Header = "BPS"; Connection = new System.Data.SqlClient.SqlConnection(); System.Configuration.AppSettingsReader configurationAppSettings = new System.Configuration.AppSettingsReader(); Connection.ConnectionString = ConnectionString = ((string)(configurationAppSettings.GetValue("ConnectionString", typeof(string)))); OleDbConnectionString = ((string)(configurationAppSettings.GetValue("OleDbConnectionString", typeof(string)))); POFormatSettingsFileName = ((string)(configurationAppSettings.GetValue("POFormatSettingsFile", typeof(string)))); sqlData = new AM_Lib.sqlData(ConnectionString); AppSettingsGet(); bllBank = new BPS.BLL.Bank.coBanks(Connection); bllBank.Fill(); bllCity = new BPS.BLL.City.coCities(Connection); bllCity.Fill(); bllCurrency = new BPS.BLL.Currency.coCurrency(Connection); bllCurrency.Fill(); bllCurrency.FillHistory(); bllOrgs = new BPS.BLL.Orgs.coOrgs(Connection); bllOrgs.Fill(); bllRequests = new BPS.BLL.ClientsRequests.coRequest(Connection); bllRequests.FillDirectories(); BPSClients = bllClients = new BPS.BLL.Clients.coClientEx(Connection); bllClients.DataGridStyle += new BPS.BLL.Clients.coClientEx.DataGridStyleEventHandler(OnSetStyle); bllClients.AddClient += new BPS.BLL.Clients.coClientEx.AddClientEventHandler(OnAddingClient); DBLock = new AM_Lib.Lock(Connection); dsOrgsAccount1 = new BPS.dsOrgsAccount(); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.Configuration.AppSettingsReader configurationAppSettings = new System.Configuration.AppSettingsReader(); this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter(); this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand(); this.sqlConnection1 = new System.Data.SqlClient.SqlConnection(); this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand(); this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand(); this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand(); this.dsOrgs1 = new BPS.BLL.Orgs.DataSets.dsOrgs(); this.dsOrgsAccount1 = new BPS.dsOrgsAccount(); ((System.ComponentModel.ISupportInitialize)(this.dsOrgs1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dsOrgsAccount1)).BeginInit(); // // sqlDataAdapter1 // this.sqlDataAdapter1.DeleteCommand = this.sqlDeleteCommand1; this.sqlDataAdapter1.InsertCommand = this.sqlInsertCommand1; this.sqlDataAdapter1.SelectCommand = this.sqlSelectCommand1; this.sqlDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] { new System.Data.Common.DataTableMapping("Table", "Orgs", new System.Data.Common.DataColumnMapping[] { new System.Data.Common.DataColumnMapping("OrgID", "OrgID"), new System.Data.Common.DataColumnMapping("OrgName", "OrgName"), new System.Data.Common.DataColumnMapping("OrgName2", "OrgName2"), new System.Data.Common.DataColumnMapping("IsNormal", "IsNormal"), new System.Data.Common.DataColumnMapping("IsInner", "IsInner"), new System.Data.Common.DataColumnMapping("IsSpecial", "IsSpecial"), new System.Data.Common.DataColumnMapping("DefaultServiceCharge", "DefaultServiceCharge"), new System.Data.Common.DataColumnMapping("CodeINN", "CodeINN"), new System.Data.Common.DataColumnMapping("CodeKPP", "CodeKPP"), new System.Data.Common.DataColumnMapping("AddrReg", "AddrReg"), new System.Data.Common.DataColumnMapping("AddrFact", "AddrFact"), new System.Data.Common.DataColumnMapping("Phone1", "Phone1"), new System.Data.Common.DataColumnMapping("Phone2", "Phone2"), new System.Data.Common.DataColumnMapping("Fax1", "Fax1"), new System.Data.Common.DataColumnMapping("Fax2", "Fax2"), new System.Data.Common.DataColumnMapping("ContactPerson", "ContactPerson"), new System.Data.Common.DataColumnMapping("OKPO", "OKPO"), new System.Data.Common.DataColumnMapping("OKONH", "OKONH"), new System.Data.Common.DataColumnMapping("ClientID", "ClientID") }) }); this.sqlDataAdapter1.UpdateCommand = this.sqlUpdateCommand1; // // sqlDeleteCommand1 // this.sqlDeleteCommand1.CommandText = "[OrgsDeleteCommand]"; this.sqlDeleteCommand1.CommandType = System.Data.CommandType.StoredProcedure; this.sqlDeleteCommand1.Connection = this.sqlConnection1; this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, false, ((System.Byte)(10)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null)); this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OrgID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "OrgID", System.Data.DataRowVersion.Original, null)); // // sqlConnection1 // this.sqlConnection1.ConnectionString = ((string)(configurationAppSettings.GetValue("ConnectionString", typeof(string)))); // // sqlInsertCommand1 // this.sqlInsertCommand1.CommandText = "[OrgsInsertCommand]"; this.sqlInsertCommand1.CommandType = System.Data.CommandType.StoredProcedure; this.sqlInsertCommand1.Connection = this.sqlConnection1; this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, false, ((System.Byte)(10)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null)); this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrgName", System.Data.SqlDbType.NVarChar, 256, "OrgName")); this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrgName2", System.Data.SqlDbType.NVarChar, 255, "OrgName2")); this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNormal", System.Data.SqlDbType.Bit, 1, "IsNormal")); this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsInner", System.Data.SqlDbType.Bit, 1, "IsInner")); this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsSpecial", System.Data.SqlDbType.Bit, 1, "IsSpecial")); this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DefaultServiceCharge", System.Data.SqlDbType.Float, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(15)), ((System.Byte)(0)), "DefaultServiceCharge", System.Data.DataRowVersion.Current, null)); this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CodeINN", System.Data.SqlDbType.NVarChar, 16, "CodeINN")); this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CodeKPP", System.Data.SqlDbType.NVarChar, 16, "CodeKPP")); this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddrReg", System.Data.SqlDbType.NVarChar, 255, "AddrReg")); this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddrFact", System.Data.SqlDbType.NVarChar, 255, "AddrFact")); this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Phone1", System.Data.SqlDbType.NVarChar, 16, "Phone1")); this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Phone2", System.Data.SqlDbType.NVarChar, 16, "Phone2")); this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Fax1", System.Data.SqlDbType.NVarChar, 16, "Fax1")); this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Fax2", System.Data.SqlDbType.NVarChar, 16, "Fax2")); this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactPerson", System.Data.SqlDbType.NVarChar, 50, "ContactPerson")); this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OKPO", System.Data.SqlDbType.NVarChar, 50, "OKPO")); this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OKONH", System.Data.SqlDbType.NVarChar, 50, "OKONH")); this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ClientID", System.Data.SqlDbType.Int, 0, "ClientID")); // // sqlSelectCommand1 // this.sqlSelectCommand1.CommandText = "[OrgsSelectCommand]"; this.sqlSelectCommand1.CommandType = System.Data.CommandType.StoredProcedure; this.sqlSelectCommand1.Connection = this.sqlConnection1; this.sqlSelectCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, false, ((System.Byte)(10)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null)); // // sqlUpdateCommand1 // this.sqlUpdateCommand1.CommandText = "[OrgsUpdateCommand]"; this.sqlUpdateCommand1.CommandType = System.Data.CommandType.StoredProcedure; this.sqlUpdateCommand1.Connection = this.sqlConnection1; this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, false, ((System.Byte)(10)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null)); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrgName", System.Data.SqlDbType.NVarChar, 256, "OrgName")); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrgName2", System.Data.SqlDbType.NVarChar, 255, "OrgName2")); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNormal", System.Data.SqlDbType.Bit, 1, "IsNormal")); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsInner", System.Data.SqlDbType.Bit, 1, "IsInner")); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsSpecial", System.Data.SqlDbType.Bit, 1, "IsSpecial")); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsRemoved", System.Data.SqlDbType.Bit, 1, "IsRemoved")); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DefaultServiceCharge", System.Data.SqlDbType.Float, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(15)), ((System.Byte)(0)), "DefaultServiceCharge", System.Data.DataRowVersion.Current, null)); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CodeINN", System.Data.SqlDbType.NVarChar, 16, "CodeINN")); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CodeKPP", System.Data.SqlDbType.NVarChar, 16, "CodeKPP")); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddrReg", System.Data.SqlDbType.NVarChar, 255, "AddrReg")); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AddrFact", System.Data.SqlDbType.NVarChar, 255, "AddrFact")); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Phone1", System.Data.SqlDbType.NVarChar, 16, "Phone1")); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Phone2", System.Data.SqlDbType.NVarChar, 16, "Phone2")); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Fax1", System.Data.SqlDbType.NVarChar, 16, "Fax1")); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Fax2", System.Data.SqlDbType.NVarChar, 16, "Fax2")); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactPerson", System.Data.SqlDbType.NVarChar, 50, "ContactPerson")); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OKPO", System.Data.SqlDbType.NVarChar, 50, "OKPO")); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OKONH", System.Data.SqlDbType.NVarChar, 50, "OKONH")); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OrgID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "OrgID", System.Data.DataRowVersion.Current, null)); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrgID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "OrgID", System.Data.DataRowVersion.Current, null)); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ClientID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "ClientID", System.Data.DataRowVersion.Current, null)); // // dsOrgs1 // this.dsOrgs1.DataSetName = "dsOrgs"; this.dsOrgs1.Locale = new System.Globalization.CultureInfo("ru-RU"); // // dsOrgsAccount1 // this.dsOrgsAccount1.DataSetName = "dsOrgsAccount"; this.dsOrgsAccount1.Locale = new System.Globalization.CultureInfo("ru-RU"); ((System.ComponentModel.ISupportInitialize)(this.dsOrgs1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dsOrgsAccount1)).EndInit(); }