public virtual void Fill() { this.PreFill(); this.dsOSVRSTADataSet1 = new OSVRSTADataSet(); this.m_StartRow = 0; this.Cursor = Cursors.WaitCursor; this.m_GridLoading = true; ThreadPool.QueueUserWorkItem(new WaitCallback(this.FillDataThread), Thread.CurrentPrincipal); }
public void ChangeBinding() { this.bindingSourceOSVRSTA.DataSource = this.OSVRSTAController.DataSet; this.dsOSVRSTADataSet1 = this.OSVRSTAController.DataSet; }
private void InitializeComponent() { this.components = new Container(); ResourceManager manager = new ResourceManager(typeof(OSVRSTAFormUserControl)); this.contextMenu1 = new ContextMenu(); this.SetNullItem = new MenuItem(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.errorProvider1 = new ErrorProvider(); this.errorProviderValidator1 = new ErrorProviderValidator(this.components); this.bindingSourceOSVRSTA = new BindingSource(this.components); ((ISupportInitialize)this.bindingSourceOSVRSTA).BeginInit(); this.layoutManagerformOSVRSTA = new TableLayoutPanel(); this.layoutManagerformOSVRSTA.SuspendLayout(); this.layoutManagerformOSVRSTA.AutoSize = true; this.layoutManagerformOSVRSTA.Dock = DockStyle.Fill; this.layoutManagerformOSVRSTA.AutoSizeMode = AutoSizeMode.GrowAndShrink; this.layoutManagerformOSVRSTA.AutoScroll = false; System.Drawing.Point point = new System.Drawing.Point(0, 0); this.layoutManagerformOSVRSTA.Location = point; Size size = new System.Drawing.Size(0, 0); this.layoutManagerformOSVRSTA.Size = size; this.layoutManagerformOSVRSTA.ColumnCount = 2; this.layoutManagerformOSVRSTA.RowCount = 4; this.layoutManagerformOSVRSTA.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.layoutManagerformOSVRSTA.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.layoutManagerformOSVRSTA.RowStyles.Add(new RowStyle()); this.layoutManagerformOSVRSTA.RowStyles.Add(new RowStyle()); this.layoutManagerformOSVRSTA.RowStyles.Add(new RowStyle()); this.layoutManagerformOSVRSTA.RowStyles.Add(new RowStyle()); this.label1IDOSVRSTA = new UltraLabel(); this.textIDOSVRSTA = new UltraNumericEditor(); this.label1OPISOSVRSTA = new UltraLabel(); this.textOPISOSVRSTA = new UltraTextEditor(); this.label1OSV = new UltraLabel(); this.labelOSV = new UltraLabel(); ((ISupportInitialize)this.textIDOSVRSTA).BeginInit(); ((ISupportInitialize)this.textOPISOSVRSTA).BeginInit(); this.dsOSVRSTADataSet1 = new OSVRSTADataSet(); this.dsOSVRSTADataSet1.BeginInit(); this.SuspendLayout(); this.dsOSVRSTADataSet1.DataSetName = "dsOSVRSTA"; this.dsOSVRSTADataSet1.Locale = new CultureInfo("hr-HR"); this.bindingSourceOSVRSTA.DataSource = this.dsOSVRSTADataSet1; this.bindingSourceOSVRSTA.DataMember = "OSVRSTA"; ((ISupportInitialize)this.bindingSourceOSVRSTA).BeginInit(); point = new System.Drawing.Point(0, 0); this.label1IDOSVRSTA.Location = point; this.label1IDOSVRSTA.Name = "label1IDOSVRSTA"; this.label1IDOSVRSTA.TabIndex = 1; this.label1IDOSVRSTA.Tag = "labelIDOSVRSTA"; this.label1IDOSVRSTA.Text = "Šfr.:"; this.label1IDOSVRSTA.StyleSetName = "FieldUltraLabel"; this.label1IDOSVRSTA.AutoSize = true; this.label1IDOSVRSTA.Anchor = AnchorStyles.Left; this.label1IDOSVRSTA.Appearance.TextVAlign = VAlign.Middle; this.label1IDOSVRSTA.Appearance.Image = RuntimeHelpers.GetObjectValue(manager.GetObject("pictureBoxKey.Image")); this.label1IDOSVRSTA.Appearance.ImageHAlign = HAlign.Right; size = new System.Drawing.Size(7, 10); this.label1IDOSVRSTA.ImageSize = size; this.label1IDOSVRSTA.Appearance.ForeColor = Color.Black; this.label1IDOSVRSTA.BackColor = Color.Transparent; this.layoutManagerformOSVRSTA.Controls.Add(this.label1IDOSVRSTA, 0, 0); this.layoutManagerformOSVRSTA.SetColumnSpan(this.label1IDOSVRSTA, 1); this.layoutManagerformOSVRSTA.SetRowSpan(this.label1IDOSVRSTA, 1); Padding padding = new Padding(3, 1, 5, 2); this.label1IDOSVRSTA.Margin = padding; size = new System.Drawing.Size(0, 0); this.label1IDOSVRSTA.MinimumSize = size; size = new System.Drawing.Size(0x26, 0x17); this.label1IDOSVRSTA.Size = size; point = new System.Drawing.Point(0, 0); this.textIDOSVRSTA.Location = point; this.textIDOSVRSTA.Name = "textIDOSVRSTA"; this.textIDOSVRSTA.Tag = "IDOSVRSTA"; this.textIDOSVRSTA.TabIndex = 0; this.textIDOSVRSTA.Anchor = AnchorStyles.Left; this.textIDOSVRSTA.MouseEnter += new EventHandler(this.mouseEnter_Text); this.textIDOSVRSTA.ReadOnly = false; this.textIDOSVRSTA.PromptChar = ' '; this.textIDOSVRSTA.Enter += new EventHandler(this.numericEditor_Enter); this.textIDOSVRSTA.DataBindings.Add(new Binding("Value", this.bindingSourceOSVRSTA, "IDOSVRSTA")); this.textIDOSVRSTA.NumericType = NumericType.Integer; this.textIDOSVRSTA.MaskInput = "{LOC}-nnnnn"; this.layoutManagerformOSVRSTA.Controls.Add(this.textIDOSVRSTA, 1, 0); this.layoutManagerformOSVRSTA.SetColumnSpan(this.textIDOSVRSTA, 1); this.layoutManagerformOSVRSTA.SetRowSpan(this.textIDOSVRSTA, 1); padding = new Padding(0, 1, 3, 2); this.textIDOSVRSTA.Margin = padding; size = new System.Drawing.Size(0x33, 0x16); this.textIDOSVRSTA.MinimumSize = size; size = new System.Drawing.Size(0x33, 0x16); this.textIDOSVRSTA.Size = size; point = new System.Drawing.Point(0, 0); this.label1OPISOSVRSTA.Location = point; this.label1OPISOSVRSTA.Name = "label1OPISOSVRSTA"; this.label1OPISOSVRSTA.TabIndex = 1; this.label1OPISOSVRSTA.Tag = "labelOPISOSVRSTA"; this.label1OPISOSVRSTA.Text = "Vrsta sredstva (OS ili SI):"; this.label1OPISOSVRSTA.StyleSetName = "FieldUltraLabel"; this.label1OPISOSVRSTA.AutoSize = true; this.label1OPISOSVRSTA.Anchor = AnchorStyles.Left; this.label1OPISOSVRSTA.Appearance.TextVAlign = VAlign.Middle; this.label1OPISOSVRSTA.Appearance.ForeColor = Color.Black; this.label1OPISOSVRSTA.BackColor = Color.Transparent; this.layoutManagerformOSVRSTA.Controls.Add(this.label1OPISOSVRSTA, 0, 1); this.layoutManagerformOSVRSTA.SetColumnSpan(this.label1OPISOSVRSTA, 1); this.layoutManagerformOSVRSTA.SetRowSpan(this.label1OPISOSVRSTA, 1); padding = new Padding(3, 1, 5, 2); this.label1OPISOSVRSTA.Margin = padding; size = new System.Drawing.Size(0, 0); this.label1OPISOSVRSTA.MinimumSize = size; size = new System.Drawing.Size(0xad, 0x17); this.label1OPISOSVRSTA.Size = size; point = new System.Drawing.Point(0, 0); this.textOPISOSVRSTA.Location = point; this.textOPISOSVRSTA.Name = "textOPISOSVRSTA"; this.textOPISOSVRSTA.Tag = "OPISOSVRSTA"; this.textOPISOSVRSTA.TabIndex = 0; this.textOPISOSVRSTA.Anchor = AnchorStyles.Left; this.textOPISOSVRSTA.MouseEnter += new EventHandler(this.mouseEnter_Text); this.textOPISOSVRSTA.ReadOnly = false; this.textOPISOSVRSTA.DataBindings.Add(new Binding("Text", this.bindingSourceOSVRSTA, "OPISOSVRSTA")); this.textOPISOSVRSTA.MaxLength = 30; this.layoutManagerformOSVRSTA.Controls.Add(this.textOPISOSVRSTA, 1, 1); this.layoutManagerformOSVRSTA.SetColumnSpan(this.textOPISOSVRSTA, 1); this.layoutManagerformOSVRSTA.SetRowSpan(this.textOPISOSVRSTA, 1); padding = new Padding(0, 1, 3, 2); this.textOPISOSVRSTA.Margin = padding; size = new System.Drawing.Size(0xe2, 0x16); this.textOPISOSVRSTA.MinimumSize = size; size = new System.Drawing.Size(0xe2, 0x16); this.textOPISOSVRSTA.Size = size; point = new System.Drawing.Point(0, 0); this.label1OSV.Location = point; this.label1OSV.Name = "label1OSV"; this.label1OSV.TabIndex = 1; this.label1OSV.Tag = "labelOSV"; this.label1OSV.Text = "OSV:"; this.label1OSV.StyleSetName = "FieldUltraLabel"; this.label1OSV.AutoSize = true; this.label1OSV.Anchor = AnchorStyles.Left; this.label1OSV.Appearance.TextVAlign = VAlign.Middle; this.label1OSV.Appearance.ForeColor = Color.Black; this.label1OSV.BackColor = Color.Transparent; this.layoutManagerformOSVRSTA.Controls.Add(this.label1OSV, 0, 2); this.layoutManagerformOSVRSTA.SetColumnSpan(this.label1OSV, 1); this.layoutManagerformOSVRSTA.SetRowSpan(this.label1OSV, 1); padding = new Padding(3, 1, 5, 2); this.label1OSV.Margin = padding; size = new System.Drawing.Size(0, 0); this.label1OSV.MinimumSize = size; size = new System.Drawing.Size(0x2d, 0x17); this.label1OSV.Size = size; point = new System.Drawing.Point(0, 0); this.labelOSV.Location = point; this.labelOSV.Name = "labelOSV"; this.labelOSV.Tag = "OSV"; this.labelOSV.TabIndex = 0; this.labelOSV.Anchor = AnchorStyles.Left; this.labelOSV.BackColor = Color.Transparent; this.labelOSV.DataBindings.Add(new Binding("Text", this.bindingSourceOSVRSTA, "OSV")); this.labelOSV.Appearance.TextVAlign = VAlign.Middle; this.layoutManagerformOSVRSTA.Controls.Add(this.labelOSV, 1, 2); this.layoutManagerformOSVRSTA.SetColumnSpan(this.labelOSV, 1); this.layoutManagerformOSVRSTA.SetRowSpan(this.labelOSV, 1); padding = new Padding(0, 1, 3, 2); this.labelOSV.Margin = padding; size = new System.Drawing.Size(0x105, 0x16); this.labelOSV.MinimumSize = size; size = new System.Drawing.Size(0x105, 0x16); this.labelOSV.Size = size; this.Controls.Add(this.layoutManagerformOSVRSTA); this.SetNullItem.Index = 0; this.SetNullItem.Text = "Set Null"; this.SetNullItem.Click += new EventHandler(this.SetNullItem_Click); this.contextMenu1.Popup += new EventHandler(this.contextMenu1_Popup); this.contextMenu1.MenuItems.AddRange(new MenuItem[] { this.SetNullItem }); this.errorProvider1.DataSource = this.bindingSourceOSVRSTA; this.errorProviderValidator1.ErrorProvider = this.errorProvider1; this.Name = "OSVRSTAFormUserControl"; this.Text = "Vrste sredstava (OS ili SI)"; this.AutoSize = true; this.AutoScroll = true; this.Load += new EventHandler(this.OSVRSTAFormUserControl_Load); this.layoutManagerformOSVRSTA.ResumeLayout(false); this.layoutManagerformOSVRSTA.PerformLayout(); ((ISupportInitialize)this.bindingSourceOSVRSTA).EndInit(); ((ISupportInitialize)this.textIDOSVRSTA).EndInit(); ((ISupportInitialize)this.textOPISOSVRSTA).EndInit(); this.dsOSVRSTADataSet1.EndInit(); this.ResumeLayout(false); this.PerformLayout(); }
private void SetComboBoxColumnProperties(bool setColumnsWidth) { if (DataAdapterFactory.Provider == null) { DataAdapterFactory.Provider = new SimpleDataAdapterFactory(); } DataSet dataSet = new OSVRSTADataSet(); if (DataAdapterFactory.Provider != null) { DataAdapterFactory.GetOSVRSTADataAdapter().Fill(dataSet); } System.Data.DataView dataList = new System.Data.DataView(dataSet.Tables["OSVRSTA"]) { Sort = "OSV" }; CreateValueList(this.DataGrid, "OSVRSTAIDOSVRSTA", dataList, "IDOSVRSTA", "OSV"); UltraGridColumn column2 = this.DataGrid.DisplayLayout.Bands["OS"].Columns["IDOSVRSTA"]; column2.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList; column2.ValueList = this.DataGrid.DisplayLayout.ValueLists["OSVRSTAIDOSVRSTA"]; if (setColumnsWidth) { column2.Width = 0x145; } DataSet set = new AMSKUPINEDataSet(); if (DataAdapterFactory.Provider != null) { DataAdapterFactory.GetAMSKUPINEDataAdapter().Fill(set); } System.Data.DataView view = new System.Data.DataView(set.Tables["AMSKUPINE"]) { Sort = "AM" }; CreateValueList(this.DataGrid, "AMSKUPINEIDAMSKUPINE", view, "IDAMSKUPINE", "AM"); UltraGridColumn column = this.DataGrid.DisplayLayout.Bands["OS"].Columns["IDAMSKUPINE"]; column.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList; column.ValueList = this.DataGrid.DisplayLayout.ValueLists["AMSKUPINEIDAMSKUPINE"]; if (setColumnsWidth) { column.Width = 370; } DataSet set3 = new OSDOKUMENTDataSet(); if (DataAdapterFactory.Provider != null) { DataAdapterFactory.GetOSDOKUMENTDataAdapter().Fill(set3); } System.Data.DataView view3 = new System.Data.DataView(set3.Tables["OSDOKUMENT"]) { Sort = "OSDK" }; CreateValueList(this.DataGrid, "OSDOKUMENTIDOSDOKUMENT", view3, "IDOSDOKUMENT", "OSDK"); UltraGridColumn column3 = this.DataGrid.DisplayLayout.Bands["OS_OSTEMELJNICA"].Columns["IDOSDOKUMENT"]; column3.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList; column3.ValueList = this.DataGrid.DisplayLayout.ValueLists["OSDOKUMENTIDOSDOKUMENT"]; if (setColumnsWidth) { column3.Width = 370; } DataSet set4 = new LOKACIJEDataSet(); if (DataAdapterFactory.Provider != null) { DataAdapterFactory.GetLOKACIJEDataAdapter().Fill(set4); } System.Data.DataView view4 = new System.Data.DataView(set4.Tables["LOKACIJE"]) { Sort = "LOK" }; CreateValueList(this.DataGrid, "LOKACIJERASHODLOKACIJEIDLOKACIJE", view4, "IDLOKACIJE", "LOK"); UltraGridColumn column4 = this.DataGrid.DisplayLayout.Bands["OS_OSTEMELJNICA"].Columns["RASHODLOKACIJEIDLOKACIJE"]; column4.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList; column4.ValueList = this.DataGrid.DisplayLayout.ValueLists["LOKACIJERASHODLOKACIJEIDLOKACIJE"]; if (setColumnsWidth) { column4.Width = 370; } }