Ejemplo n.º 1
0
        private void Unit_SelectedIndexChanged(object sender, EventArgs e)
        {
            var org    = Unit.SelectedItem as Orginfo;
            var roomes = new List <PrjFolder>();

            if (org != null && !string.IsNullOrEmpty(org.DepCode))
            {
                roomes.AddRange(DepositoryFolderInfo.QueryPrjFolders(org.DepCode, ""));
            }

            TestRoom.DataSource = roomes;
        }
Ejemplo n.º 2
0
        private void ComboBox_Company_SelectedIndexChanged(object sender, EventArgs e)
        {
            ComboBox_TestRooms.Items.Clear();
            ComboBox_TestRooms.Items.Add("全部试验室");

            if (ComboBox_Company.SelectedItem is Orginfo)
            {
                Orginfo          Orginfo    = ComboBox_Company.SelectedItem as Orginfo;
                List <PrjFolder> PrjFolders = DepositoryFolderInfo.QueryPrjFolders(Orginfo.DepCode, "");
                ComboBox_TestRooms.Items.AddRange(PrjFolders.ToArray());
            }

            if (ComboBox_TestRooms.Items.Count > 0)
            {
                ComboBox_TestRooms.SelectedIndex = 0;
            }
        }
Ejemplo n.º 3
0
        private void Unit_SelectedIndexChanged(object sender, EventArgs e)
        {
            Search.Enabled      = false;
            TestRoom.DataSource = null;

            var org    = Unit.SelectedItem as Orginfo;
            var roomes = new List <PrjFolder>();

            if (org != null && !string.IsNullOrEmpty(org.DepCode))
            {
                roomes.AddRange(DepositoryFolderInfo.QueryPrjFolders(org.DepCode, ""));
                roomes.Add(new PrjFolder()
                {
                    FolderName = "全部",
                    FolderCode = "#"
                });

                TestRoom.DataSource = roomes;
            }

            Search.Enabled = true;
        }
Ejemplo n.º 4
0
        private void SetTreeValues(Prjsct section, Orginfo unit, PrjFolder room)
        {
            Section.SelectedIndexChanged  -= new EventHandler(Section_SelectedIndexChanged);
            Unit.SelectedIndexChanged     -= new EventHandler(Unit_SelectedIndexChanged);
            TestRoom.SelectedIndexChanged -= new EventHandler(TestRoom_SelectedIndexChanged);

            Section.DataSource = DepositoryPrjsctInfo.QueryPrjscts(Yqun.Common.ContextCache.ApplicationContext.Current.InProject.Code);
            Section.Text       = section.PrjsctName;

            Unit.DataSource = DepositoryOrganInfo.QueryOrgans(section.PrjsctCode, "");
            Unit.Text       = unit.DepName;

            TestRoom.DataSource    = DepositoryFolderInfo.QueryPrjFolders(unit.DepCode, "");
            TestRoom.SelectedItem  = room;
            TestRoom.SelectedValue = room.FolderCode;
            TestRoom.SelectedText  = room.FolderName;
            TestRoom.Text          = room.FolderName;


            Section.SelectedIndexChanged  += new EventHandler(Section_SelectedIndexChanged);
            Unit.SelectedIndexChanged     += new EventHandler(Unit_SelectedIndexChanged);
            TestRoom.SelectedIndexChanged += new EventHandler(TestRoom_SelectedIndexChanged);
        }