Exemplo n.º 1
0
        private void tvMType_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            #region 根据不同材料设置不同的材料属性
            if (e.Node.Name == "activity")
            {
                activity = e.Node.Tag.ToString();
                int specnum = PartParameter.GetSpecCou(activity);
                if (specnum != 0)
                {
                    if (specnum > 0)
                    {
                        lspec1.Visible   = true;
                        tb_spec1.Visible = true;
                        lspec2.Visible   = false;
                        tb_spec2.Visible = false;
                        lspec3.Visible   = false;
                        tb_spec3.Visible = false;
                        lspec4.Visible   = false;
                        tb_spec4.Visible = false;
                        lspec1.Text      = PartParameter.GetSpecName(activity, "1").Trim();
                        //relocation();
                    }
                    if (specnum > 1)
                    {
                        lspec2.Visible   = true;
                        tb_spec2.Visible = true;
                        lspec3.Visible   = false;
                        tb_spec3.Visible = false;
                        lspec4.Visible   = false;
                        tb_spec4.Visible = false;
                        lspec2.Text      = PartParameter.GetSpecName(activity, "2").Trim();
                        //relocation();
                    }
                    if (specnum > 2)
                    {
                        lspec3.Visible   = true;
                        tb_spec3.Visible = true;
                        lspec4.Visible   = false;
                        tb_spec4.Visible = false;
                        lspec3.Text      = PartParameter.GetSpecName(activity, "3").Trim();
                        //relocation();
                    }
                    if (specnum > 3)
                    {
                        lspec4.Visible = true; tb_spec4.Visible = true; lspec4.Text = PartParameter.GetSpecName(activity, "4").Trim();
                    }
                }
                else
                {
                    lspec1.Visible   = false;
                    tb_spec1.Visible = false;
                    lspec2.Visible   = false;
                    tb_spec2.Visible = false;
                    lspec3.Visible   = false;
                    tb_spec3.Visible = false;
                    lspec4.Visible   = false;
                    tb_spec4.Visible = false;
                    //relocation();
                }



                //BindPartNobyAct();
                //cmb_partno.Text = site;
                //if (sub2pro == "")
                //{
                //    sub2pro = "03";
                //}
                //cmb_site.SelectedValue = sub2pro;
                //QuerydataBind();
            }
            #endregion
        }