/// <summary> /// 初始化查询列表 /// </summary> public void BindGrid() { try { ZhuJi.UUMS.IDAL.IResources resources = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.UUMS.NHibernateDAL.Resources)) as ZhuJi.UUMS.IDAL.IResources; gvList.DataSource = resources.GetObjects(base.Where, base.OrderNo); gvList.DataBind(); } catch (Exception ex) { ShowMessage(ex); } }
/// <summary> /// 初始化添加/编辑表单 /// </summary> public void Initialize() { btnAdd.Visible = false; btnEdit.Visible = false; btnDel.Visible = false; try { ZhuJi.UUMS.IDAL.IResources resources = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.UUMS.NHibernateDAL.Resources)) as ZhuJi.UUMS.IDAL.IResources; IList <ZhuJi.UUMS.Domain.Resources> listResources = resources.GetObjects(); foreach (ZhuJi.UUMS.Domain.Resources domainResources in listResources) { ResourcesId.Items.Add(new ListItem(domainResources.ResourceName.ToString(), domainResources.Id.ToString())); } ZhuJi.UUMS.IDAL.IControlsType controlsType = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.UUMS.NHibernateDAL.ControlsType)) as ZhuJi.UUMS.IDAL.IControlsType; IList <ZhuJi.UUMS.Domain.ControlsType> listControlsType = controlsType.GetObjects(); foreach (ZhuJi.UUMS.Domain.ControlsType domainControlsType in listControlsType) { ControlType.Items.Add(new ListItem(domainControlsType.Text.ToString(), domainControlsType.Id.ToString())); } ZhuJi.UUMS.IDAL.IControlsAttribute controlsAttribute = ZhuJi.AOP.Operator.WrapInterface(typeof(ZhuJi.UUMS.NHibernateDAL.ControlsAttribute)) as ZhuJi.UUMS.IDAL.IControlsAttribute; IList <ZhuJi.UUMS.Domain.ControlsAttribute> listControlsAttribute = controlsAttribute.GetObjects(); foreach (ZhuJi.UUMS.Domain.ControlsAttribute domainControlsAttribute in listControlsAttribute) { Attribute.Items.Add(new ListItem(domainControlsAttribute.Text.ToString(), domainControlsAttribute.Id.ToString())); } } catch (Exception ex) { ShowMessage(ex); } switch (_command) { case "ADD": Add(); break; case "EDIT": Edit(); break; } }