///////////////////////////////////////////////////////////////////////////// ///<summary> ///Load data widgets from server; Fill combos and so on. ///</summary> public override void SetWidgetsData() { try { DataSet ds = adminFacade.GetEnterprisesList(sid, 0,0); GuiTreeview guiTvw = new GuiTreeview(); guiTvw.StoreDataSet(ds, ref treevwEnterprises); } catch (Exception ex) { ClientMessages.ShowException(ex); } }
///////////////////////////////////////////////////////////////////////////// void OnTreevwGroupsCursorChanged(object o, EventArgs e) { TreeModel model; //Datos del treeview TreeIter iter; //Fila seleccionada del treeview int groupId = 0; try { if (treevwGroups.Selection.GetSelected (out model, out iter)) { groupId = int.Parse((string) treevwGroups.Model.GetValue (iter, 0)); } DataSet ds = adminFacade.GetUsersList(sid, groupId, 0, 0); GuiTreeview guiTvw = new GuiTreeview(); guiTvw.StoreDataSet(ds, ref treevwUsers); } catch (Exception ex) { ClientMessages.ShowException(ex); } }
///////////////////////////////////////////////////////////////////////////////// void OnTreevwEnterprisesCursorChanged(object o, EventArgs e) { try { TreeModel model; //Datos del treeview TreeIter iter; //Fila seleccionada del treeview int epriseId = 0; GuiTreeview.RemoveColumns(treevwGroups); if (treevwEnterprises.Selection.GetSelected (out model, out iter)) { epriseId = int.Parse((string) treevwEnterprises.Model.GetValue (iter, 0)); } DataSet ds = adminFacade.GetGroupsListById(sid, epriseId, 0, 0); GuiTreeview guiTvw = new GuiTreeview(); guiTvw.StoreDataSet(ds, ref treevwGroups); } catch (Exception ex) { ClientMessages.ShowException(ex); } }
///////////////////////////////////////////////////////////////////////////// void OnCombobEprisesChanged(object o, EventArgs e) { try { GuiTreeview.RemoveColumns(treevwUsers); GuiTreeview.RemoveColumns(treevwGroups); ComboBox combob = (ComboBox) o; TreeIter iter; string epriseName = ""; if (combob.GetActiveIter (out iter)) epriseName = (string) combob.Model.GetValue (iter, 0); DataSet ds = adminFacade.GetIconGroupsList(sid, epriseName, 0, 0); XmlDocument doc = new XmlDocument(); doc.Load(Boxerp.Defines.GUI_DIR + "treeviews.xml"); XmlNodeList xmlNode = doc.GetElementsByTagName("groups"); GuiTreeview guiTvw = new GuiTreeview(); guiTvw.StoreDataSet(ds, xmlNode.Item(0), ref treevwGroups); GuiTreeview.RemoveColumns(treevwUsers); } catch (Exception ex) { ClientMessages.ShowException(ex); } }