public ClientView(BPS.BLL.Clients.DataSets.dsClients dsClnt, BPS.BLL.Clients.DataSets.dsGroups dsGroups) { // // Required for Windows Form Designer support // InitializeComponent(); InterestRates = new BPS.BLL.Clients.coInterestRates(); this.dvClientRate.Table = dsInterestRate1.InterestRate; BPS.App.SetDataGridTableStyle(this.dataGridTableStyle2); this.BindingContext[this.dataView1].CurrentChanged += new EventHandler(BindingContextChange); this.dsClients1 = dsClnt; this.dataView1.Table = dsClients1.Clients; // Groups this.dvGroups.Table = dsGroups.ClientsGroups; // InterestRates dsInterestRate1 = InterestRates.DsInterestRates; this.dvClientRate.Table = dsInterestRate1.InterestRate; // ReqTypes InterestRates.FillDSReqType(); // InterestRatesList InterestRates.FillDSInterestRateList(); this.dsInterestRateList1 = this.InterestRates.DSInterestRateList; this.dvRateList.Table = this.dsInterestRateList1.InterestRates; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ClientView)); this.dsClients1 = new BPS.BLL.Clients.DataSets.dsClients(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.cbSpecial = new System.Windows.Forms.CheckBox(); this.cbIsInner = new System.Windows.Forms.CheckBox(); this.tbName = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.dataGrid1 = new AM_Controls.DataGridV(); this.contextMenu1 = new System.Windows.Forms.ContextMenu(); this.dataView1 = new System.Data.DataView(); this.dataGridTableStyle1 = new System.Windows.Forms.DataGridTableStyle(); this.dataGridTextBoxColumn1 = new System.Windows.Forms.DataGridTextBoxColumn(); this.dataGridTextBoxColumn3 = new System.Windows.Forms.DataGridTextBoxColumn(); this.dataGridTextBoxColumn2 = new System.Windows.Forms.DataGridTextBoxColumn(); this.dataGridTextBoxColumn4 = new System.Windows.Forms.DataGridTextBoxColumn(); this.panel2 = new System.Windows.Forms.Panel(); this.toolBar1 = new System.Windows.Forms.ToolBar(); this.toolBarButton1 = new System.Windows.Forms.ToolBarButton(); this.toolBarButton2 = new System.Windows.Forms.ToolBarButton(); this.toolBarButton4 = new System.Windows.Forms.ToolBarButton(); this.toolBarButton3 = new System.Windows.Forms.ToolBarButton(); this.toolBarButton5 = new System.Windows.Forms.ToolBarButton(); this.toolBarButton6 = new System.Windows.Forms.ToolBarButton(); this.toolBarButton7 = new System.Windows.Forms.ToolBarButton(); this.toolBarButton8 = new System.Windows.Forms.ToolBarButton(); this.toolBarButton9 = new System.Windows.Forms.ToolBarButton(); this.dvGroups = new System.Data.DataView(); this.panel3 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel(); this.dataGridV1 = new AM_Controls.DataGridV(); this.dvClientRate = new System.Data.DataView(); this.dsInterestRate1 = new BPS.BLL.Clients.DataSets.dsInterestRate(); this.dataGridTableStyle2 = new System.Windows.Forms.DataGridTableStyle(); this.ReqType = new System.Windows.Forms.DataGridTextBoxColumn(); this.ReqTypeName = new System.Windows.Forms.DataGridTextBoxColumn(); this.RateNormal = new System.Windows.Forms.DataGridTextBoxColumn(); this.RateBlack = new System.Windows.Forms.DataGridTextBoxColumn(); this.dvRateList = new System.Data.DataView(); this.dsInterestRateList1 = new BPS.BLL.Clients.DataSets.dsInterestRateList(); this.dsReqTypes1 = new BPS.BLL.ClientsRequests.DataSets.dsReqTypes(); this.mainMenu1 = new System.Windows.Forms.MainMenu(); this.mnuEdit = new System.Windows.Forms.MenuItem(); this.menuItem2 = new System.Windows.Forms.MenuItem(); this.menuItem3 = new System.Windows.Forms.MenuItem(); this.menuItem4 = new System.Windows.Forms.MenuItem(); this.menuItem5 = new System.Windows.Forms.MenuItem(); this.menuItem6 = new System.Windows.Forms.MenuItem(); this.menuItem7 = new System.Windows.Forms.MenuItem(); this.menuItem8 = new System.Windows.Forms.MenuItem(); this.menuItem9 = new System.Windows.Forms.MenuItem(); this.menuItem10 = new System.Windows.Forms.MenuItem(); this.dsOrgsClients1 = new BPS.BLL.Clients.DataSets.dsOrgsClients(); ((System.ComponentModel.ISupportInitialize)(this.dsClients1)).BeginInit(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataView1)).BeginInit(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dvGroups)).BeginInit(); this.panel3.SuspendLayout(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridV1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dvClientRate)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dsInterestRate1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dvRateList)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dsInterestRateList1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dsReqTypes1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dsOrgsClients1)).BeginInit(); this.SuspendLayout(); // // dsClients1 // this.dsClients1.DataSetName = "dsClients"; this.dsClients1.Locale = new System.Globalization.CultureInfo("ru-RU"); // // groupBox1 // this.groupBox1.Controls.Add(this.cbSpecial); this.groupBox1.Controls.Add(this.cbIsInner); this.groupBox1.Controls.Add(this.tbName); this.groupBox1.Controls.Add(this.label2); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox1.Location = new System.Drawing.Point(0, 28); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(792, 38); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; this.groupBox1.Text = "Фильтр"; // // cbSpecial // this.cbSpecial.Location = new System.Drawing.Point(520, 14); this.cbSpecial.Name = "cbSpecial"; this.cbSpecial.TabIndex = 4; this.cbSpecial.Text = "Специальные"; // // cbIsInner // this.cbIsInner.Location = new System.Drawing.Point(414, 14); this.cbIsInner.Name = "cbIsInner"; this.cbIsInner.Size = new System.Drawing.Size(88, 24); this.cbIsInner.TabIndex = 3; this.cbIsInner.Text = "Внутренний"; // // tbName // this.tbName.Location = new System.Drawing.Point(64, 16); this.tbName.Name = "tbName"; this.tbName.Size = new System.Drawing.Size(184, 21); this.tbName.TabIndex = 0; this.tbName.Text = ""; // // label2 // this.label2.Location = new System.Drawing.Point(12, 20); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(48, 16); this.label2.TabIndex = 2; this.label2.Text = "Клиент:"; // // imageList1 // this.imageList1.ImageSize = new System.Drawing.Size(16, 16); this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); this.imageList1.TransparentColor = System.Drawing.Color.Transparent; // // dataGrid1 // this.dataGrid1._CanEdit = false; this.dataGrid1._InvisibleColumn = 0; this.dataGrid1.AlternatingBackColor = System.Drawing.Color.LightGray; this.dataGrid1.BackColor = System.Drawing.Color.Gainsboro; this.dataGrid1.CaptionVisible = false; this.dataGrid1.ContextMenu = this.contextMenu1; this.dataGrid1.DataMember = ""; this.dataGrid1.DataSource = this.dataView1; this.dataGrid1.Dock = System.Windows.Forms.DockStyle.Fill; this.dataGrid1.GridLineColor = System.Drawing.Color.LightGray; this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText; this.dataGrid1.Location = new System.Drawing.Point(0, 0); this.dataGrid1.Name = "dataGrid1"; this.dataGrid1.ReadOnly = true; this.dataGrid1.Size = new System.Drawing.Size(792, 391); this.dataGrid1.TabIndex = 1; this.dataGrid1.TableStyles.AddRange(new System.Windows.Forms.DataGridTableStyle[] { this.dataGridTableStyle1 }); this.dataGrid1.DoubleClick += new System.EventHandler(this.dataGrid1_DoubleClick); this.dataGrid1.Paint += new System.Windows.Forms.PaintEventHandler(this.dataGrid1_Paint); // // dataView1 // this.dataView1.Table = this.dsClients1.Clients; // // dataGridTableStyle1 // this.dataGridTableStyle1.AlternatingBackColor = System.Drawing.Color.LightGray; this.dataGridTableStyle1.BackColor = System.Drawing.Color.Gainsboro; this.dataGridTableStyle1.DataGrid = this.dataGrid1; this.dataGridTableStyle1.GridColumnStyles.AddRange(new System.Windows.Forms.DataGridColumnStyle[] { this.dataGridTextBoxColumn1, this.dataGridTextBoxColumn3, this.dataGridTextBoxColumn2, this.dataGridTextBoxColumn4 }); this.dataGridTableStyle1.GridLineColor = System.Drawing.Color.LightGray; this.dataGridTableStyle1.HeaderForeColor = System.Drawing.SystemColors.ControlText; this.dataGridTableStyle1.MappingName = "Clients"; // // dataGridTextBoxColumn1 // this.dataGridTextBoxColumn1.Format = ""; this.dataGridTextBoxColumn1.FormatInfo = null; this.dataGridTextBoxColumn1.MappingName = "ClientID"; this.dataGridTextBoxColumn1.NullText = ""; this.dataGridTextBoxColumn1.Width = 40; // // dataGridTextBoxColumn3 // this.dataGridTextBoxColumn3.Format = ""; this.dataGridTextBoxColumn3.FormatInfo = null; this.dataGridTextBoxColumn3.HeaderText = "Группа"; this.dataGridTextBoxColumn3.MappingName = "ClientGroupName"; this.dataGridTextBoxColumn3.NullText = ""; this.dataGridTextBoxColumn3.Width = 130; // // dataGridTextBoxColumn2 // this.dataGridTextBoxColumn2.Format = ""; this.dataGridTextBoxColumn2.FormatInfo = null; this.dataGridTextBoxColumn2.HeaderText = "Имя клиента"; this.dataGridTextBoxColumn2.MappingName = "ClientName"; this.dataGridTextBoxColumn2.NullText = ""; this.dataGridTextBoxColumn2.Width = 250; // // dataGridTextBoxColumn4 // this.dataGridTextBoxColumn4.Format = ""; this.dataGridTextBoxColumn4.FormatInfo = null; this.dataGridTextBoxColumn4.HeaderText = "Примечание"; this.dataGridTextBoxColumn4.MappingName = "ClientRemarks"; this.dataGridTextBoxColumn4.NullText = ""; this.dataGridTextBoxColumn4.Width = 330; // // panel2 // this.panel2.Controls.Add(this.groupBox1); this.panel2.Controls.Add(this.toolBar1); this.panel2.Dock = System.Windows.Forms.DockStyle.Top; this.panel2.Location = new System.Drawing.Point(0, 0); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(792, 66); this.panel2.TabIndex = 10; // // toolBar1 // this.toolBar1.Appearance = System.Windows.Forms.ToolBarAppearance.Flat; this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] { this.toolBarButton1, this.toolBarButton2, this.toolBarButton4, this.toolBarButton3, this.toolBarButton5, this.toolBarButton6, this.toolBarButton7, this.toolBarButton8, this.toolBarButton9 }); this.toolBar1.ButtonSize = new System.Drawing.Size(100, 22); this.toolBar1.DropDownArrows = true; this.toolBar1.ImageList = this.imageList1; this.toolBar1.Location = new System.Drawing.Point(0, 0); this.toolBar1.Name = "toolBar1"; this.toolBar1.ShowToolTips = true; this.toolBar1.Size = new System.Drawing.Size(792, 28); this.toolBar1.TabIndex = 0; this.toolBar1.TextAlign = System.Windows.Forms.ToolBarTextAlign.Right; this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick); // // toolBarButton1 // this.toolBarButton1.ImageIndex = 0; this.toolBarButton1.Text = "Новый"; // // toolBarButton2 // this.toolBarButton2.ImageIndex = 1; this.toolBarButton2.Text = "Открыть"; // // toolBarButton4 // this.toolBarButton4.ImageIndex = 2; this.toolBarButton4.Text = "Удалить"; // // toolBarButton3 // this.toolBarButton3.ImageIndex = 2; this.toolBarButton3.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; // // toolBarButton5 // this.toolBarButton5.ImageIndex = 3; this.toolBarButton5.Text = "Обновить"; // // toolBarButton6 // this.toolBarButton6.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; // // toolBarButton7 // this.toolBarButton7.ImageIndex = 5; this.toolBarButton7.Text = "Выбрать"; // // toolBarButton8 // this.toolBarButton8.ImageIndex = 6; this.toolBarButton8.Text = "Сбросить"; // // toolBarButton9 // this.toolBarButton9.ImageIndex = 7; this.toolBarButton9.Text = "Очистить"; // // panel3 // this.panel3.Controls.Add(this.dataGrid1); this.panel3.Controls.Add(this.panel1); this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; this.panel3.Location = new System.Drawing.Point(0, 66); this.panel3.Name = "panel3"; this.panel3.Size = new System.Drawing.Size(792, 507); this.panel3.TabIndex = 11; // // panel1 // this.panel1.Controls.Add(this.dataGridV1); this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; this.panel1.Location = new System.Drawing.Point(0, 391); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(792, 116); this.panel1.TabIndex = 3; // // dataGridV1 // this.dataGridV1._CanEdit = false; this.dataGridV1._InvisibleColumn = 0; this.dataGridV1.CaptionBackColor = System.Drawing.SystemColors.Control; this.dataGridV1.CaptionForeColor = System.Drawing.SystemColors.WindowText; this.dataGridV1.CaptionText = "Процентные ставки"; this.dataGridV1.DataMember = ""; this.dataGridV1.DataSource = this.dvClientRate; this.dataGridV1.HeaderForeColor = System.Drawing.SystemColors.ControlText; this.dataGridV1.Location = new System.Drawing.Point(0, 0); this.dataGridV1.Name = "dataGridV1"; this.dataGridV1.ReadOnly = true; this.dataGridV1.Size = new System.Drawing.Size(440, 116); this.dataGridV1.TabIndex = 2; this.dataGridV1.TableStyles.AddRange(new System.Windows.Forms.DataGridTableStyle[] { this.dataGridTableStyle2 }); // // dvClientRate // this.dvClientRate.AllowDelete = false; this.dvClientRate.AllowNew = false; this.dvClientRate.Table = this.dsInterestRate1.InterestRate; // // dsInterestRate1 // this.dsInterestRate1.DataSetName = "dsInterestRate"; this.dsInterestRate1.Locale = new System.Globalization.CultureInfo("en-US"); // // dataGridTableStyle2 // this.dataGridTableStyle2.DataGrid = this.dataGridV1; this.dataGridTableStyle2.GridColumnStyles.AddRange(new System.Windows.Forms.DataGridColumnStyle[] { this.ReqType, this.ReqTypeName, this.RateNormal, this.RateBlack }); this.dataGridTableStyle2.HeaderForeColor = System.Drawing.SystemColors.ControlText; this.dataGridTableStyle2.MappingName = "InterestRate"; // // ReqType // this.ReqType.Alignment = System.Windows.Forms.HorizontalAlignment.Right; this.ReqType.Format = ""; this.ReqType.FormatInfo = null; this.ReqType.HeaderText = "ID"; this.ReqType.MappingName = "ReqType"; this.ReqType.Width = 40; // // ReqTypeName // this.ReqTypeName.Format = ""; this.ReqTypeName.FormatInfo = null; this.ReqTypeName.HeaderText = "Тип операции"; this.ReqTypeName.MappingName = "ReqTypeName"; this.ReqTypeName.NullText = "-"; this.ReqTypeName.Width = 200; // // RateNormal // this.RateNormal.Alignment = System.Windows.Forms.HorizontalAlignment.Right; this.RateNormal.Format = "#,##0.00"; this.RateNormal.FormatInfo = null; this.RateNormal.HeaderText = "Процент н."; this.RateNormal.MappingName = "RateNormal"; this.RateNormal.NullText = "-"; this.RateNormal.Width = 80; // // RateBlack // this.RateBlack.Alignment = System.Windows.Forms.HorizontalAlignment.Right; this.RateBlack.Format = "#,##0.00"; this.RateBlack.FormatInfo = null; this.RateBlack.HeaderText = "Процент ч."; this.RateBlack.MappingName = "RateBlack"; this.RateBlack.NullText = "-"; this.RateBlack.Width = 80; // // dvRateList // this.dvRateList.Table = this.dsInterestRateList1.InterestRates; // // dsInterestRateList1 // this.dsInterestRateList1.DataSetName = "dsInterestRateList"; this.dsInterestRateList1.Locale = new System.Globalization.CultureInfo("ru-RU"); // // dsReqTypes1 // this.dsReqTypes1.DataSetName = "dsReqTypes"; this.dsReqTypes1.Locale = new System.Globalization.CultureInfo("ru-RU"); // // mainMenu1 // this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.mnuEdit }); // // mnuEdit // this.mnuEdit.Index = 0; this.mnuEdit.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.menuItem2, this.menuItem3, this.menuItem4, this.menuItem5, this.menuItem6, this.menuItem7, this.menuItem8, this.menuItem9, this.menuItem10 }); this.mnuEdit.Text = "Редактирование"; // // menuItem2 // this.menuItem2.Index = 0; this.menuItem2.Shortcut = System.Windows.Forms.Shortcut.F3; this.menuItem2.Text = "Новый"; this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click); // // menuItem3 // this.menuItem3.Index = 1; this.menuItem3.Shortcut = System.Windows.Forms.Shortcut.F10; this.menuItem3.Text = "Изменить"; this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click); // // menuItem4 // this.menuItem4.Index = 2; this.menuItem4.Shortcut = System.Windows.Forms.Shortcut.CtrlDel; this.menuItem4.Text = "Удалить"; this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click); // // menuItem5 // this.menuItem5.Index = 3; this.menuItem5.Text = "-"; // // menuItem6 // this.menuItem6.Index = 4; this.menuItem6.Shortcut = System.Windows.Forms.Shortcut.F5; this.menuItem6.Text = "Обновить"; this.menuItem6.Click += new System.EventHandler(this.menuItem6_Click); // // menuItem7 // this.menuItem7.Index = 5; this.menuItem7.Text = "-"; // // menuItem8 // this.menuItem8.Index = 6; this.menuItem8.Text = "Выбрать"; this.menuItem8.Click += new System.EventHandler(this.menuItem8_Click); // // menuItem9 // this.menuItem9.Index = 7; this.menuItem9.Text = "Сбросить"; this.menuItem9.Click += new System.EventHandler(this.menuItem9_Click); // // menuItem10 // this.menuItem10.Index = 8; this.menuItem10.Text = "Очистить"; this.menuItem10.Click += new System.EventHandler(this.menuItem10_Click); // // dsOrgsClients1 // this.dsOrgsClients1.DataSetName = "dsOrgsClients"; this.dsOrgsClients1.Locale = new System.Globalization.CultureInfo("ru-RU"); // // ClientView // this.AutoScaleBaseSize = new System.Drawing.Size(5, 14); this.ClientSize = new System.Drawing.Size(792, 573); this.Controls.Add(this.panel3); this.Controls.Add(this.panel2); this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Menu = this.mainMenu1; this.Name = "ClientView"; this.Text = "Клиенты"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.MdiChildActivate += new System.EventHandler(this.ClientView_MdiChildActivate); this.Load += new System.EventHandler(this.ClientView_Load); ((System.ComponentModel.ISupportInitialize)(this.dsClients1)).EndInit(); this.groupBox1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dataView1)).EndInit(); this.panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dvGroups)).EndInit(); this.panel3.ResumeLayout(false); this.panel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dataGridV1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dvClientRate)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dsInterestRate1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dvRateList)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dsInterestRateList1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dsReqTypes1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dsOrgsClients1)).EndInit(); this.ResumeLayout(false); }
/// <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.sqlConnection1 = new System.Data.SqlClient.SqlConnection(); this.sqldaClients = new System.Data.SqlClient.SqlDataAdapter(); this.sqlDeleteCommand2 = new System.Data.SqlClient.SqlCommand(); this.sqlInsertCommand2 = new System.Data.SqlClient.SqlCommand(); this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand(); this.sqlUpdateCommand2 = new System.Data.SqlClient.SqlCommand(); this.dsClients1 = new BPS.BLL.Clients.DataSets.dsClients(); this.sqlDataAdapter2 = new System.Data.SqlClient.SqlDataAdapter(); this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand(); this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand(); this.sqlSelectCommand2 = new System.Data.SqlClient.SqlCommand(); this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand(); this.dsGroups1 = new BPS.BLL.Clients.DataSets.dsGroups(); this.dsCurr1 = new BPS.BLL.Currency.DataSets.dsCurr(); this.sqldaSelOrgsClients = new System.Data.SqlClient.SqlDataAdapter(); this.sqlCommand2 = new System.Data.SqlClient.SqlCommand(); this.sqlSelectClientsOrgs = new System.Data.SqlClient.SqlCommand(); this.sqlCommand1 = new System.Data.SqlClient.SqlCommand(); this.dsOrgsClients1 = new BPS.BLL.Clients.DataSets.dsOrgsClients(); this.sqldaGetAvailableOrgs = new System.Data.SqlClient.SqlDataAdapter(); this.sqlCommand3 = new System.Data.SqlClient.SqlCommand(); this.sqlCommand4 = new System.Data.SqlClient.SqlCommand(); this.sqlCommand5 = new System.Data.SqlClient.SqlCommand(); ((System.ComponentModel.ISupportInitialize)(this.dsClients1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dsGroups1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dsCurr1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dsOrgsClients1)).BeginInit(); // // sqlConnection1 // this.sqlConnection1.ConnectionString = ((string)(configurationAppSettings.GetValue("ConnectionString", typeof(string)))); // // sqldaClients // this.sqldaClients.DeleteCommand = this.sqlDeleteCommand2; this.sqldaClients.InsertCommand = this.sqlInsertCommand2; this.sqldaClients.SelectCommand = this.sqlSelectCommand1; this.sqldaClients.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] { new System.Data.Common.DataTableMapping("Table", "Clients", new System.Data.Common.DataColumnMapping[] { new System.Data.Common.DataColumnMapping("ClientID", "ClientID"), new System.Data.Common.DataColumnMapping("ClientGroupID", "ClientGroupID"), new System.Data.Common.DataColumnMapping("ClientName", "ClientName"), new System.Data.Common.DataColumnMapping("ClientRemarks", "ClientRemarks"), new System.Data.Common.DataColumnMapping("IsInner", "IsInner"), new System.Data.Common.DataColumnMapping("IsSpecial", "IsSpecial"), new System.Data.Common.DataColumnMapping("Password", "Password") }) }); this.sqldaClients.UpdateCommand = this.sqlUpdateCommand2; // // sqlDeleteCommand2 // this.sqlDeleteCommand2.CommandText = "[ClientDelete]"; this.sqlDeleteCommand2.CommandType = System.Data.CommandType.StoredProcedure; this.sqlDeleteCommand2.Connection = this.sqlConnection1; this.sqlDeleteCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ClientID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "ClientID", System.Data.DataRowVersion.Current, null)); this.sqlDeleteCommand2.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)); // // sqlInsertCommand2 // this.sqlInsertCommand2.CommandText = @"INSERT INTO Clients (ClientGroupID, ClientName, ClientRemarks, IsInner, IsSpecial, Password) VALUES (@ClientGroupID, @ClientName, @ClientRemarks, @IsInner, @IsSpecial, @Password); SELECT Clients.ClientID, Clients.ClientGroupID, Clients.ClientName, Clients.ClientRemarks, ClientsGroups.ClientGroupName, Clients.IsInner, Clients.IsSpecial, Clients.Password FROM Clients INNER JOIN ClientsGroups ON Clients.ClientGroupID = ClientsGroups.ClientGroupID WHERE (Clients.ClientID = @@IDENTITY)"; this.sqlInsertCommand2.Connection = this.sqlConnection1; this.sqlInsertCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ClientGroupID", System.Data.SqlDbType.Int, 4, "ClientGroupID")); this.sqlInsertCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ClientName", System.Data.SqlDbType.NVarChar, 50, "ClientName")); this.sqlInsertCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ClientRemarks", System.Data.SqlDbType.NVarChar, 255, "ClientRemarks")); this.sqlInsertCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsInner", System.Data.SqlDbType.Bit, 1, "IsInner")); this.sqlInsertCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsSpecial", System.Data.SqlDbType.Bit, 1, "IsSpecial")); this.sqlInsertCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Password", System.Data.SqlDbType.NVarChar, 48, "Password")); // // sqlSelectCommand1 // this.sqlSelectCommand1.CommandText = @"SELECT Clients.ClientID, Clients.ClientGroupID, Clients.ClientName, Clients.ClientRemarks, Clients.IsInner, Clients.IsSpecial, Clients.Password, ClientsGroups.ClientGroupName FROM Clients INNER JOIN ClientsGroups ON Clients.ClientGroupID = ClientsGroups.ClientGroupID ORDER BY Clients.ClientName"; this.sqlSelectCommand1.Connection = this.sqlConnection1; // // sqlUpdateCommand2 // this.sqlUpdateCommand2.CommandText = @"UPDATE Clients SET ClientGroupID = @ClientGroupID, ClientName = @ClientName, ClientRemarks = @ClientRemarks, IsInner = @IsInner, IsSpecial = @IsSpecial, Password = @Password WHERE (ClientID = @Original_ClientID) AND (ClientGroupID = @Original_ClientGroupID) AND (ClientName = @Original_ClientName) AND (ClientRemarks = @Original_ClientRemarks) AND (IsInner = @Original_IsInner) AND (IsSpecial = @Original_IsSpecial OR @Original_IsSpecial IS NULL AND IsSpecial IS NULL) AND (Password = @Original_Password OR @Original_Password IS NULL AND Password IS NULL); SELECT ClientID, ClientGroupID, ClientName, ClientRemarks, IsInner, IsSpecial, Password FROM Clients WHERE (ClientID = @ClientID)"; this.sqlUpdateCommand2.Connection = this.sqlConnection1; this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ClientGroupID", System.Data.SqlDbType.Int, 4, "ClientGroupID")); this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ClientName", System.Data.SqlDbType.NVarChar, 50, "ClientName")); this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ClientRemarks", System.Data.SqlDbType.NVarChar, 255, "ClientRemarks")); this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsInner", System.Data.SqlDbType.Bit, 1, "IsInner")); this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsSpecial", System.Data.SqlDbType.Bit, 1, "IsSpecial")); this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Password", System.Data.SqlDbType.NVarChar, 128, "Password")); this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ClientID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ClientID", System.Data.DataRowVersion.Original, null)); this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ClientGroupID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ClientGroupID", System.Data.DataRowVersion.Original, null)); this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ClientName", System.Data.SqlDbType.NVarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ClientName", System.Data.DataRowVersion.Original, null)); this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ClientRemarks", System.Data.SqlDbType.NVarChar, 255, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ClientRemarks", System.Data.DataRowVersion.Original, null)); this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_IsInner", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "IsInner", System.Data.DataRowVersion.Original, null)); this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_IsSpecial", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "IsSpecial", System.Data.DataRowVersion.Original, null)); this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Password", System.Data.SqlDbType.NVarChar, 128, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Password", System.Data.DataRowVersion.Original, null)); this.sqlUpdateCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ClientID", System.Data.SqlDbType.Int, 4, "ClientID")); // // dsClients1 // this.dsClients1.DataSetName = "dsClients"; this.dsClients1.Locale = new System.Globalization.CultureInfo("ru-RU"); // // sqlDataAdapter2 // this.sqlDataAdapter2.DeleteCommand = this.sqlDeleteCommand1; this.sqlDataAdapter2.InsertCommand = this.sqlInsertCommand1; this.sqlDataAdapter2.SelectCommand = this.sqlSelectCommand2; this.sqlDataAdapter2.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] { new System.Data.Common.DataTableMapping("Table", "ClientsGroups", new System.Data.Common.DataColumnMapping[] { new System.Data.Common.DataColumnMapping("ClientGroupID", "ClientGroupID"), new System.Data.Common.DataColumnMapping("ClientGroupName", "ClientGroupName"), new System.Data.Common.DataColumnMapping("ClientGroupRemarks", "ClientGroupRemarks"), new System.Data.Common.DataColumnMapping("IsInner", "IsInner"), new System.Data.Common.DataColumnMapping("IsSpecial", "IsSpecial") }) }); this.sqlDataAdapter2.UpdateCommand = this.sqlUpdateCommand1; // // sqlDeleteCommand1 // this.sqlDeleteCommand1.CommandText = "DELETE FROM ClientsGroups WHERE (ClientGroupID = @Original_ClientGroupID) AND (Cl" + "ientGroupName = @Original_ClientGroupName) AND (ClientGroupRemarks = @Original_C" + "lientGroupRemarks) AND (IsInner = @Original_IsInner) AND (IsSpecial = @Original_" + "IsSpecial)"; this.sqlDeleteCommand1.Connection = this.sqlConnection1; this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ClientGroupID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ClientGroupID", System.Data.DataRowVersion.Original, null)); this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ClientGroupName", System.Data.SqlDbType.NVarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ClientGroupName", System.Data.DataRowVersion.Original, null)); this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ClientGroupRemarks", System.Data.SqlDbType.NVarChar, 512, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ClientGroupRemarks", System.Data.DataRowVersion.Original, null)); this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_IsInner", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "IsInner", System.Data.DataRowVersion.Original, null)); this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_IsSpecial", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "IsSpecial", System.Data.DataRowVersion.Original, null)); // // sqlInsertCommand1 // this.sqlInsertCommand1.CommandText = @"INSERT INTO ClientsGroups(ClientGroupName, ClientGroupRemarks, IsInner, IsSpecial) VALUES (@ClientGroupName, @ClientGroupRemarks, @IsInner, @IsSpecial); SELECT ClientGroupID, ClientGroupName, ClientGroupRemarks, IsInner, IsSpecial FROM ClientsGroups WHERE (ClientGroupID = @@IDENTITY)"; this.sqlInsertCommand1.Connection = this.sqlConnection1; this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ClientGroupName", System.Data.SqlDbType.NVarChar, 50, "ClientGroupName")); this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ClientGroupRemarks", System.Data.SqlDbType.NVarChar, 512, "ClientGroupRemarks")); 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")); // // sqlSelectCommand2 // this.sqlSelectCommand2.CommandText = "SELECT ClientGroupID, ClientGroupName, ClientGroupRemarks, IsInner, IsSpecial FRO" + "M ClientsGroups ORDER BY ClientGroupName"; this.sqlSelectCommand2.Connection = this.sqlConnection1; // // sqlUpdateCommand1 // this.sqlUpdateCommand1.CommandText = @"UPDATE ClientsGroups SET ClientGroupName = @ClientGroupName, ClientGroupRemarks = @ClientGroupRemarks, IsInner = @IsInner, IsSpecial = @IsSpecial WHERE (ClientGroupID = @Original_ClientGroupID) AND (ClientGroupName = @Original_ClientGroupName) AND (ClientGroupRemarks = @Original_ClientGroupRemarks) AND (IsInner = @Original_IsInner) AND (IsSpecial = @Original_IsSpecial); SELECT ClientGroupID, ClientGroupName, ClientGroupRemarks, IsInner, IsSpecial FROM ClientsGroups WHERE (ClientGroupID = @ClientGroupID)"; this.sqlUpdateCommand1.Connection = this.sqlConnection1; this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ClientGroupName", System.Data.SqlDbType.NVarChar, 50, "ClientGroupName")); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ClientGroupRemarks", System.Data.SqlDbType.NVarChar, 512, "ClientGroupRemarks")); 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("@Original_ClientGroupID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ClientGroupID", System.Data.DataRowVersion.Original, null)); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ClientGroupName", System.Data.SqlDbType.NVarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ClientGroupName", System.Data.DataRowVersion.Original, null)); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ClientGroupRemarks", System.Data.SqlDbType.NVarChar, 512, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ClientGroupRemarks", System.Data.DataRowVersion.Original, null)); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_IsInner", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "IsInner", System.Data.DataRowVersion.Original, null)); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_IsSpecial", System.Data.SqlDbType.Bit, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "IsSpecial", System.Data.DataRowVersion.Original, null)); this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ClientGroupID", System.Data.SqlDbType.Int, 4, "ClientGroupID")); // // dsGroups1 // this.dsGroups1.DataSetName = "dsGroups"; this.dsGroups1.Locale = new System.Globalization.CultureInfo("ru-RU"); // // dsCurr1 // this.dsCurr1.DataSetName = "dsCurr"; this.dsCurr1.Locale = new System.Globalization.CultureInfo("ru-RU"); // // sqldaSelOrgsClients // this.sqldaSelOrgsClients.InsertCommand = this.sqlCommand2; this.sqldaSelOrgsClients.SelectCommand = this.sqlSelectClientsOrgs; this.sqldaSelOrgsClients.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] { new System.Data.Common.DataTableMapping("Table", "OrgsClients", new System.Data.Common.DataColumnMapping[] { new System.Data.Common.DataColumnMapping("ClientID", "ClientID"), new System.Data.Common.DataColumnMapping("OrgID", "OrgID"), new System.Data.Common.DataColumnMapping("Direction", "Direction"), new System.Data.Common.DataColumnMapping("IsAvailable", "IsAvailable"), new System.Data.Common.DataColumnMapping("OrgName", "OrgName"), new System.Data.Common.DataColumnMapping("CodeINN", "CodeINN"), new System.Data.Common.DataColumnMapping("IsRemoved", "IsRemoved") }) }); this.sqldaSelOrgsClients.UpdateCommand = this.sqlCommand1; // // sqlCommand2 // this.sqlCommand2.CommandText = "INSERT INTO OrgsClients (ClientID, OrgID, Direction, IsAvailable) VALUES (@Client" + "ID, @OrgID, @Direction, @IsAvailable)"; this.sqlCommand2.Connection = this.sqlConnection1; this.sqlCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ClientID", System.Data.SqlDbType.Int, 4, "ClientID")); this.sqlCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrgID", System.Data.SqlDbType.Int, 4, "OrgID")); this.sqlCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Direction", System.Data.SqlDbType.TinyInt, 1, "Direction")); this.sqlCommand2.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsAvailable", System.Data.SqlDbType.Bit, 1, "IsAvailable")); // // sqlSelectClientsOrgs // this.sqlSelectClientsOrgs.CommandText = @"SELECT OrgsClients.ClientID, OrgsClients.OrgID, OrgsClients.Direction, OrgsClients.IsAvailable, Orgs.OrgName, Orgs.CodeINN, Orgs.IsRemoved FROM OrgsClients INNER JOIN Orgs ON OrgsClients.OrgID = Orgs.OrgID WHERE (OrgsClients.ClientID = @ClientID) AND (Orgs.IsRemoved = 0)"; this.sqlSelectClientsOrgs.Connection = this.sqlConnection1; this.sqlSelectClientsOrgs.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ClientID", System.Data.SqlDbType.Int, 4, "ClientID")); // // sqlCommand1 // this.sqlCommand1.CommandText = "UPDATE OrgsClients SET IsAvailable = @IsAvailable WHERE (ClientID = @Original_Cli" + "entID) AND (Direction = @Original_Direction) AND (OrgID = @Original_OrgID)"; this.sqlCommand1.Connection = this.sqlConnection1; this.sqlCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsAvailable", System.Data.SqlDbType.Bit, 1, "IsAvailable")); this.sqlCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ClientID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ClientID", System.Data.DataRowVersion.Original, null)); this.sqlCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Direction", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Direction", System.Data.DataRowVersion.Original, null)); this.sqlCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OrgID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "OrgID", System.Data.DataRowVersion.Original, null)); // // dsOrgsClients1 // this.dsOrgsClients1.DataSetName = "dsOrgsClients"; this.dsOrgsClients1.Locale = new System.Globalization.CultureInfo("ru-RU"); // // sqldaGetAvailableOrgs // this.sqldaGetAvailableOrgs.InsertCommand = this.sqlCommand3; this.sqldaGetAvailableOrgs.SelectCommand = this.sqlCommand4; this.sqldaGetAvailableOrgs.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] { new System.Data.Common.DataTableMapping("Table", "OrgsClients", new System.Data.Common.DataColumnMapping[] { new System.Data.Common.DataColumnMapping("ClientID", "ClientID"), new System.Data.Common.DataColumnMapping("OrgID", "OrgID"), new System.Data.Common.DataColumnMapping("Direction", "Direction"), new System.Data.Common.DataColumnMapping("IsAvailable", "IsAvailable"), new System.Data.Common.DataColumnMapping("OrgName", "OrgName"), new System.Data.Common.DataColumnMapping("CodeINN", "CodeINN"), new System.Data.Common.DataColumnMapping("IsRemoved", "IsRemoved"), new System.Data.Common.DataColumnMapping("CodeKPP", "CodeKPP") }) }); this.sqldaGetAvailableOrgs.UpdateCommand = this.sqlCommand5; // // sqlCommand3 // this.sqlCommand3.CommandText = "INSERT INTO OrgsClients (ClientID, OrgID, Direction, IsAvailable) VALUES (@Client" + "ID, @OrgID, @Direction, @IsAvailable)"; this.sqlCommand3.Connection = this.sqlConnection1; this.sqlCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ClientID", System.Data.SqlDbType.Int, 4, "ClientID")); this.sqlCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OrgID", System.Data.SqlDbType.Int, 4, "OrgID")); this.sqlCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Direction", System.Data.SqlDbType.TinyInt, 1, "Direction")); this.sqlCommand3.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsAvailable", System.Data.SqlDbType.Bit, 1, "IsAvailable")); // // sqlCommand4 // this.sqlCommand4.CommandText = @"SELECT OrgsClients.ClientID, OrgsClients.OrgID, OrgsClients.Direction, OrgsClients.IsAvailable, Orgs.OrgName, Orgs.CodeINN, Orgs.IsRemoved, Orgs.CodeKPP FROM OrgsClients INNER JOIN Orgs ON OrgsClients.OrgID = Orgs.OrgID WHERE (OrgsClients.ClientID = @ClientID) AND (Orgs.IsRemoved = 0) AND (OrgsClients.IsAvailable = 1) ORDER BY Orgs.OrgName"; this.sqlCommand4.Connection = this.sqlConnection1; this.sqlCommand4.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ClientID", System.Data.SqlDbType.Int, 4, "ClientID")); // // sqlCommand5 // this.sqlCommand5.CommandText = "UPDATE OrgsClients SET IsAvailable = @IsAvailable WHERE (ClientID = @Original_Cli" + "entID) AND (Direction = @Original_Direction) AND (OrgID = @Original_OrgID)"; this.sqlCommand5.Connection = this.sqlConnection1; this.sqlCommand5.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsAvailable", System.Data.SqlDbType.Bit, 1, "IsAvailable")); this.sqlCommand5.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ClientID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ClientID", System.Data.DataRowVersion.Original, null)); this.sqlCommand5.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Direction", System.Data.SqlDbType.TinyInt, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "Direction", System.Data.DataRowVersion.Original, null)); this.sqlCommand5.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_OrgID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "OrgID", System.Data.DataRowVersion.Original, null)); ((System.ComponentModel.ISupportInitialize)(this.dsClients1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dsGroups1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dsCurr1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dsOrgsClients1)).EndInit(); }