public DataRow SelectGODINEIRAGODIDGODINE(string fillMethod, DataRow fillByRow) { GODINESelectionListWorkItem item = this.WorkItem.Items.AddNew <GODINESelectionListWorkItem>(); DataRow row = item.ShowModal(true, fillMethod, fillByRow); item.Terminate(); this.WorkItem.Activate(); return(row); }
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); } }