public virtual void Fill() { this.PreFill(); this.dsGODINEDataSet1 = new GODINEDataSet(); this.m_StartRow = 0; this.Cursor = Cursors.WaitCursor; this.m_GridLoading = true; ThreadPool.QueueUserWorkItem(new WaitCallback(this.FillDataThread), Thread.CurrentPrincipal); }
public void PromjenaGodine(object sender, EventArgs e) { GODINESelectionListWorkItem item = this.WorkItem.Items.AddNew <GODINESelectionListWorkItem>("test"); DataRow row2 = item.ShowModal(true, "", null); item.Terminate(); if (row2 != null) { IEnumerator enumerator = null; GODINEDataAdapter adapter = new GODINEDataAdapter(); GODINEDataSet dataSet = new GODINEDataSet(); adapter.Fill(dataSet); try { enumerator = dataSet.GODINE.Rows.GetEnumerator(); while (enumerator.MoveNext()) { DataRow current = (DataRow)enumerator.Current; current["godineaktivna"] = false; } } finally { if (enumerator is IDisposable) { (enumerator as IDisposable).Dispose(); } } dataSet.GODINE.Select("idgodine =" + Conversions.ToString(row2["idgodine"]))[0]["godineaktivna"] = true; adapter.Update(dataSet); UltraExplorerBarWorkspace smartPart = (UltraExplorerBarWorkspace)this.WorkItem.Workspaces["Dock"].SmartParts[1]; UltraDockSmartPartInfo smartPartInfo = new UltraDockSmartPartInfo { DefaultPaneStyle = ChildPaneStyle.VerticalSplit, Description = Deklarit.Resources.Resources.MainMenu }; Size size = new System.Drawing.Size(180, 100); smartPartInfo.PreferredSize = size; smartPartInfo.DefaultLocation = DockedLocation.DockedLeft; smartPartInfo.Title = "Aktivna godina:" + Conversions.ToString((int)mipsed.application.framework.Application.ActiveYear); this.WorkItem.Workspaces["Dock"].ApplySmartPartInfo(smartPart, smartPartInfo); } }
public void ChangeBinding() { this.bindingSourceGODINE.DataSource = this.GODINEController.DataSet; this.dsGODINEDataSet1 = this.GODINEController.DataSet; }
private void InitializeComponent() { this.components = new Container(); ResourceManager manager = new ResourceManager(typeof(GODINEFormUserControl)); 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.bindingSourceGODINE = new BindingSource(this.components); ((ISupportInitialize)this.bindingSourceGODINE).BeginInit(); this.layoutManagerformGODINE = new TableLayoutPanel(); this.layoutManagerformGODINE.SuspendLayout(); this.layoutManagerformGODINE.AutoSize = true; this.layoutManagerformGODINE.Dock = DockStyle.Fill; this.layoutManagerformGODINE.AutoSizeMode = AutoSizeMode.GrowAndShrink; this.layoutManagerformGODINE.AutoScroll = false; System.Drawing.Point point = new System.Drawing.Point(0, 0); this.layoutManagerformGODINE.Location = point; Size size = new System.Drawing.Size(0, 0); this.layoutManagerformGODINE.Size = size; this.layoutManagerformGODINE.ColumnCount = 2; this.layoutManagerformGODINE.RowCount = 3; this.layoutManagerformGODINE.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.layoutManagerformGODINE.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.layoutManagerformGODINE.RowStyles.Add(new RowStyle()); this.layoutManagerformGODINE.RowStyles.Add(new RowStyle()); this.layoutManagerformGODINE.RowStyles.Add(new RowStyle()); this.label1IDGODINE = new UltraLabel(); this.textIDGODINE = new UltraNumericEditor(); this.label1GODINEAKTIVNA = new UltraLabel(); this.checkGODINEAKTIVNA = new UltraCheckEditor(); ((ISupportInitialize)this.textIDGODINE).BeginInit(); this.dsGODINEDataSet1 = new GODINEDataSet(); this.dsGODINEDataSet1.BeginInit(); this.SuspendLayout(); this.dsGODINEDataSet1.DataSetName = "dsGODINE"; this.dsGODINEDataSet1.Locale = new CultureInfo("hr-HR"); this.bindingSourceGODINE.DataSource = this.dsGODINEDataSet1; this.bindingSourceGODINE.DataMember = "GODINE"; ((ISupportInitialize)this.bindingSourceGODINE).BeginInit(); point = new System.Drawing.Point(0, 0); this.label1IDGODINE.Location = point; this.label1IDGODINE.Name = "label1IDGODINE"; this.label1IDGODINE.TabIndex = 1; this.label1IDGODINE.Tag = "labelIDGODINE"; this.label1IDGODINE.Text = "Godina:"; this.label1IDGODINE.StyleSetName = "FieldUltraLabel"; this.label1IDGODINE.AutoSize = true; this.label1IDGODINE.Anchor = AnchorStyles.Left; this.label1IDGODINE.Appearance.TextVAlign = VAlign.Middle; this.label1IDGODINE.Appearance.Image = RuntimeHelpers.GetObjectValue(manager.GetObject("pictureBoxKey.Image")); this.label1IDGODINE.Appearance.ImageHAlign = HAlign.Right; size = new System.Drawing.Size(7, 10); this.label1IDGODINE.ImageSize = size; this.label1IDGODINE.Appearance.ForeColor = Color.Black; this.label1IDGODINE.BackColor = Color.Transparent; this.layoutManagerformGODINE.Controls.Add(this.label1IDGODINE, 0, 0); this.layoutManagerformGODINE.SetColumnSpan(this.label1IDGODINE, 1); this.layoutManagerformGODINE.SetRowSpan(this.label1IDGODINE, 1); Padding padding = new Padding(3, 1, 5, 2); this.label1IDGODINE.Margin = padding; size = new System.Drawing.Size(0, 0); this.label1IDGODINE.MinimumSize = size; size = new System.Drawing.Size(60, 0x17); this.label1IDGODINE.Size = size; point = new System.Drawing.Point(0, 0); this.textIDGODINE.Location = point; this.textIDGODINE.Name = "textIDGODINE"; this.textIDGODINE.Tag = "IDGODINE"; this.textIDGODINE.TabIndex = 0; this.textIDGODINE.Anchor = AnchorStyles.Left; this.textIDGODINE.MouseEnter += new EventHandler(this.mouseEnter_Text); this.textIDGODINE.ReadOnly = false; this.textIDGODINE.PromptChar = ' '; this.textIDGODINE.Enter += new EventHandler(this.numericEditor_Enter); this.textIDGODINE.DataBindings.Add(new Binding("Value", this.bindingSourceGODINE, "IDGODINE")); this.textIDGODINE.NumericType = NumericType.Integer; this.textIDGODINE.MaskInput = "{LOC}-nnnn"; this.layoutManagerformGODINE.Controls.Add(this.textIDGODINE, 1, 0); this.layoutManagerformGODINE.SetColumnSpan(this.textIDGODINE, 1); this.layoutManagerformGODINE.SetRowSpan(this.textIDGODINE, 1); padding = new Padding(0, 1, 3, 2); this.textIDGODINE.Margin = padding; size = new System.Drawing.Size(0x2d, 0x16); this.textIDGODINE.MinimumSize = size; size = new System.Drawing.Size(0x2d, 0x16); this.textIDGODINE.Size = size; point = new System.Drawing.Point(0, 0); this.label1GODINEAKTIVNA.Location = point; this.label1GODINEAKTIVNA.Name = "label1GODINEAKTIVNA"; this.label1GODINEAKTIVNA.TabIndex = 1; this.label1GODINEAKTIVNA.Tag = "labelGODINEAKTIVNA"; this.label1GODINEAKTIVNA.Text = "Aktivna:"; this.label1GODINEAKTIVNA.StyleSetName = "FieldUltraLabel"; this.label1GODINEAKTIVNA.AutoSize = true; this.label1GODINEAKTIVNA.Anchor = AnchorStyles.Left; this.label1GODINEAKTIVNA.Appearance.TextVAlign = VAlign.Middle; this.label1GODINEAKTIVNA.Appearance.ForeColor = Color.Black; this.label1GODINEAKTIVNA.BackColor = Color.Transparent; this.layoutManagerformGODINE.Controls.Add(this.label1GODINEAKTIVNA, 0, 1); this.layoutManagerformGODINE.SetColumnSpan(this.label1GODINEAKTIVNA, 1); this.layoutManagerformGODINE.SetRowSpan(this.label1GODINEAKTIVNA, 1); padding = new Padding(3, 1, 5, 2); this.label1GODINEAKTIVNA.Margin = padding; size = new System.Drawing.Size(0, 0); this.label1GODINEAKTIVNA.MinimumSize = size; size = new System.Drawing.Size(0x42, 0x17); this.label1GODINEAKTIVNA.Size = size; point = new System.Drawing.Point(0, 0); this.checkGODINEAKTIVNA.Location = point; this.checkGODINEAKTIVNA.Name = "checkGODINEAKTIVNA"; this.checkGODINEAKTIVNA.Tag = "GODINEAKTIVNA"; this.checkGODINEAKTIVNA.TabIndex = 0; this.checkGODINEAKTIVNA.Anchor = AnchorStyles.Left; this.checkGODINEAKTIVNA.MouseEnter += new EventHandler(this.mouseEnter_Text); this.checkGODINEAKTIVNA.Enabled = true; this.layoutManagerformGODINE.Controls.Add(this.checkGODINEAKTIVNA, 1, 1); this.layoutManagerformGODINE.SetColumnSpan(this.checkGODINEAKTIVNA, 1); this.layoutManagerformGODINE.SetRowSpan(this.checkGODINEAKTIVNA, 1); padding = new Padding(0, 1, 3, 2); this.checkGODINEAKTIVNA.Margin = padding; size = new System.Drawing.Size(13, 13); this.checkGODINEAKTIVNA.MinimumSize = size; size = new System.Drawing.Size(13, 13); this.checkGODINEAKTIVNA.Size = size; this.Controls.Add(this.layoutManagerformGODINE); 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.bindingSourceGODINE; this.errorProviderValidator1.ErrorProvider = this.errorProvider1; this.Name = "GODINEFormUserControl"; this.Text = "GODINE"; this.AutoSize = true; this.AutoScroll = true; this.Load += new EventHandler(this.GODINEFormUserControl_Load); this.layoutManagerformGODINE.ResumeLayout(false); this.layoutManagerformGODINE.PerformLayout(); ((ISupportInitialize)this.bindingSourceGODINE).EndInit(); ((ISupportInitialize)this.textIDGODINE).EndInit(); this.dsGODINEDataSet1.EndInit(); this.ResumeLayout(false); this.PerformLayout(); }