Ejemplo n.º 1
0
 public void ClearTextValue()
 {
     PNSpecInfor = new ASCXPNSpecInfor();
     try
     {
         {
             PNSpecInfor = (ASCXPNSpecInfor)Page.LoadControl("~/Frame/TestPlan/PNSpecInfor.ascx");
             PNSpecInfor.Colum2TextConfig = "";
             PNSpecInfor.Colum3TextConfig = "";
             PNSpecInfor.EnableColum3Text = true;
             PNSpecInfor.EnableColum2Text = true;
             PNSpecInfor.EnableColum4Text = true;
             PNSpecInfor.EnableColum5Text = true;
             PNSpecInfor.EnableColum7Text = true;
             PNSpecInfor.ClearDropDownList();
             PNSpecsIDtoName(PNSpecInfor);
             ConfigChannelMap(PNSpecInfor);
             PNSpecInfor.ConfigSeletedIndex        = -1;
             PNSpecInfor.TH2Text                   = "名称";
             PNSpecInfor.TH3Text                   = "典型值";
             PNSpecInfor.TH4Text                   = "最小值";
             PNSpecInfor.TH5Text                   = "最大值";
             PNSpecInfor.TH7Text                   = "通道";
             PNSpecInfor.ConfigSeletedIndexChannel = -1;
             PNSpecInfor.Colum6TextConfig          = GlobalDDIDUnitMap[PNSpecInfor.ConfigSeletedIndex];
             this.PNSpecSelfInfor.Controls.Add(PNSpecInfor);
         }
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 2
0
    public bool ConfigRangeValidator(ASCXPNSpecInfor input)
    {
        {
            input.ConfigRangeValidatorMaxMin     = input.Colum4TextConfig;
            input.ConfigRangeValidatorMinMax     = input.Colum5TextConfig;
            input.ConfigRangeValidatorTypicalMax = input.Colum5TextConfig;
            input.ConfigRangeValidatorTypicalMin = input.Colum4TextConfig;
        }

        return(true);
    }
Ejemplo n.º 3
0
 public void ConfigChannelMap(ASCXPNSpecInfor input)
 {
     PNChannelsIDMap.Clear();
     try
     {
         if (channelNumber == "0")
         {
             input.InsertColum7Text(0, new ListItem(0.ToString().Trim()));
             PNChannelsIDMap.Add(0, 0);
         }
         else
         {
             for (int i = 0; i < Convert.ToInt16(channelNumber) + 1; i++)
             {
                 input.InsertColum7Text(i, new ListItem((i).ToString().Trim()));
                 PNChannelsIDMap.Add((byte)(i), (byte)(i));
             }
         }
     }
     catch (System.Exception ex)
     {
     }
 }
Ejemplo n.º 4
0
    public bool PNSpecsIDtoName(ASCXPNSpecInfor input)
    {
        GlobalPNSpecIDMap.Clear();
        GlobalPNSpecIDMap1.Clear();
        GlobalDDIDUnitMap.Clear();
        ddlist.Items.Clear();
        try
        {
            for (int i = 0; i < mydtGlobalSpces.Rows.Count; i++)
            {
                input.InsertColum2Text(i, new ListItem(mydtGlobalSpces.Rows[i]["ItemName"].ToString().Trim()));

                GlobalPNSpecIDMap.Add(i, Convert.ToInt32(mydtGlobalSpces.Rows[i]["ID"]));
                GlobalPNSpecIDMap1.Add(Convert.ToInt32(mydtGlobalSpces.Rows[i]["ID"]), mydtGlobalSpces.Rows[i]["ItemName"].ToString());
                GlobalDDIDUnitMap.Add(i, mydtGlobalSpces.Rows[i]["Unit"].ToString());
            }

            return(true);
        }
        catch (System.Exception ex)
        {
            throw ex;
        }
    }