Exemplo n.º 1
0
        private void LoadData()
        {
            ProjectSelector.PopMaxWidth  = 0;
            ProjectSelector.KeyField     = "ProjectNo";
            ProjectSelector.DisplayField = "BidName";
            ProjectSelector.AddColumn("标段名称", "BidName");
            ProjectSelector.InnerControl.MainView.OptionsView.ShowDetailButtons = false;
            ProjectSelector.GetDataSource = () => {
                List <ProjectInfo> infoList = client.GetIProjectInfoService().GetList(AppConfig.GlBidRootNo);

                infoList = infoList.FindAll(m => m.Category == 4);
                return(infoList);
            };
            ProjectSelector.RefDataSource = () => { return(client.GetIProjectInfoService().GetList(AppConfig.GlBidRootNo).FindAll(m => m.Category == 4)); };
            ProjectSelector.Closed       += (sender, e) =>
            {
                bindingSource1.EndEdit();
            };
            ProjectSelector.ClearEvent += () =>
            {
                bindingSource1.EndEdit();
            };

            GpUserSelector.PopMaxWidth  = 0;
            GpUserSelector.KeyField     = "LoginName";
            GpUserSelector.DisplayField = "UserName";
            GpUserSelector.AddColumn("人员姓名", "UserName");
            GpUserSelector.AddColumn("OA名", "LoginName");
            GpUserSelector.InnerControl.MainView.OptionsView.ShowDetailButtons = false;
            GpUserSelector.GetDataSource = () => { return(client.GetIGpuserService().GetList(AppConfig.GlOrgCode)); };
            GpUserSelector.RefDataSource = () => { return(client.GetIGpuserService().GetList(AppConfig.GlOrgCode)); };
            GpUserSelector.Closed       += (sender, e) =>
            {
                bindingSource1.EndEdit();
            };
            GpUserSelector.ClearEvent += () =>
            {
                bindingSource1.EndEdit();
            };
        }
Exemplo n.º 2
0
        private void LoadData()
        {
            List <ProjectInfo> LstProject = client.GetIProjectInfoService().GetList("");

            gridLookUpEdit1.Properties.DataSource = LstProject;
        }