当前位置: 首页>>代码示例>>C#>>正文


C# Panel.FindControl方法代码示例

本文整理汇总了C#中Panel.FindControl方法的典型用法代码示例。如果您正苦于以下问题:C# Panel.FindControl方法的具体用法?C# Panel.FindControl怎么用?C# Panel.FindControl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Panel的用法示例。


在下文中一共展示了Panel.FindControl方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddTechFrequency

 protected void AddTechFrequency(SqlCommand cmd, Panel plTech, string strTechName, int intNum)
 {
     if (plTech.ID.Replace("pl", "") == "CDMA")
     {
         cmd.Parameters["@TechName"].Value = strTechName;
         if (strTechName == "CDMA2000") { cmd.Parameters["@GID"].Value = ddlTech.SelectedIndex + 2 + 8; }
     }
     else
     {
         cmd.Parameters["@TechName"].Value = ddlTech.SelectedValue;
     }
     TextBox tbRemark;
     if (plTech.ID.Replace("pl", "") == "CDMA")
     {
         tbRemark = (TextBox)plTech.FindControl("tbCDMRemark");
     }
     else
     {
         tbRemark = (TextBox)plTech.FindControl("tb" + strTechName + "Remark");
     }
     if (tbRemark != null) { cmd.Parameters["@Remark"].Value = tbRemark.Text.Trim(); }
     else { cmd.Parameters["@Remark"].Value = DBNull.Value; }
     cmd.Parameters["@IndoorAllowed"].Value = DBNull.Value;
     cmd.Parameters["@OutdoorAllowed"].Value = DBNull.Value;
     cmd.Parameters["@HT20"].Value = DBNull.Value;
     cmd.Parameters["@HT40"].Value = DBNull.Value;
     cmd.Parameters["@HT80"].Value = DBNull.Value;
     cmd.Parameters["@HT160"].Value = DBNull.Value;
     cmd.Parameters["@HTDesc"].Value = DBNull.Value;
     cmd.Parameters["@DFS"].Value = DBNull.Value;
     cmd.Parameters["@TPC"].Value = DBNull.Value;
     cmd.Parameters["@DFSDesc"].Value = DBNull.Value;
     Label lblF;
     TextBox tbPL;
     CheckBox cbANA;
     for (int i = 1; i <= intNum; i++)
     {
         lblF = (Label)plTech.FindControl("lbl" + strTechName + "F" + i.ToString());
         tbPL = (TextBox)plTech.FindControl("tb" + strTechName + "PL" + i.ToString());
         cbANA = (CheckBox)plTech.FindControl("cb" + strTechName + "ANA" + i.ToString());
         if (lblF != null) { cmd.Parameters["@Frequency"].Value = lblF.Text.Trim(); }
         else { cmd.Parameters["@Frequency"].Value = DBNull.Value; }
         if (strTechName == "FMTransmitter" || strTechName == "Above1GSRD")
         {
             TextBox tbFrequencyDesc = (TextBox)plTech.FindControl("tb" + strTechName + "FDesc" + i.ToString());
             if (tbFrequencyDesc != null) { cmd.Parameters["@FrequencyDesc"].Value = tbFrequencyDesc.Text.Trim(); }
             else { cmd.Parameters["@FrequencyDesc"].Value = DBNull.Value; }
         }
         else { cmd.Parameters["@FrequencyDesc"].Value = DBNull.Value; }
         if (tbPL != null) { cmd.Parameters["@PowerLimit"].Value = tbPL.Text.Trim(); }
         else { cmd.Parameters["@PowerLimit"].Value = DBNull.Value; }
         if (cbANA != null) { cmd.Parameters["@IsAllowed"].Value = cbANA.Checked; }
         else { cmd.Parameters["@IsAllowed"].Value = DBNull.Value; }
         cmd.Parameters["@Seq"].Value = i;
         SQLUtil.ExecuteSql(cmd);
     }
 }
开发者ID:AdamsChao,项目名称:netdb-localdev-proj,代码行数:57,代码来源:ImaTechTelecom.aspx.cs

示例2: AddWiFi

 protected void AddWiFi(SqlCommand cmd, Panel plTech)
 {
     cmd.Parameters["@TechName"].Value = ddlTech.SelectedValue;
     cmd.Parameters["@Remark"].Value = tbWiFiRemark.Text.Trim();
     Label lblWiFiF;
     TextBox tbWiFiPL;
     CheckBox cbWiFiIDA;
     CheckBox cbWiFiODA;
     CheckBox cbWiFiHT20;
     CheckBox cbWiFiHT40;
     CheckBox cbWiFiHT80;
     CheckBox cbWiFiHT160;
     TextBox tbWiFiHT;
     CheckBox cbWiFiDFS;
     CheckBox cbWiFiTPC;
     TextBox tbWiFiDFS;
     CheckBox cbWiFiANA;
     CheckBox cbWiFiANAN;
     for (int i = 1; i <= 6; i++)
     {
         lblWiFiF = (Label)plTech.FindControl("lblWiFiF" + i.ToString());
         tbWiFiPL = (TextBox)plTech.FindControl("tbWiFiPL" + i.ToString());
         cbWiFiIDA = (CheckBox)plTech.FindControl("cbWiFiIDA" + i.ToString());
         cbWiFiODA = (CheckBox)plTech.FindControl("cbWiFiODA" + i.ToString());
         cbWiFiHT20 = (CheckBox)plTech.FindControl("cbWiFiHT20" + i.ToString());
         cbWiFiHT40 = (CheckBox)plTech.FindControl("cbWiFiHT40" + i.ToString());
         cbWiFiHT80 = (CheckBox)plTech.FindControl("cbWiFiHT80" + i.ToString());
         cbWiFiHT160 = (CheckBox)plTech.FindControl("cbWiFiHT160" + i.ToString());
         tbWiFiHT = (TextBox)plTech.FindControl("tbWiFiHT" + i.ToString());
         cbWiFiDFS = (CheckBox)plTech.FindControl("cbWiFiDFS" + i.ToString());
         cbWiFiTPC = (CheckBox)plTech.FindControl("cbWiFiTPC" + i.ToString());
         tbWiFiDFS = (TextBox)plTech.FindControl("tbWiFiDFS" + i.ToString());
         cbWiFiANA = (CheckBox)plTech.FindControl("cbWiFiANA" + i.ToString());
         cbWiFiANAN = (CheckBox)plTech.FindControl("cbWiFiANAN" + i.ToString());
         cmd.Parameters["@Frequency"].Value = lblWiFiF.Text.Trim();
         cmd.Parameters["@FrequencyDesc"].Value = DBNull.Value;
         cmd.Parameters["@PowerLimit"].Value = tbWiFiPL.Text.Trim();
         cmd.Parameters["@IsAllowed"].Value = cbWiFiANA.Checked;
         cmd.Parameters["@IsNotAllowed"].Value = cbWiFiANAN.Checked;
         cmd.Parameters["@IndoorAllowed"].Value = cbWiFiIDA.Checked;
         cmd.Parameters["@OutdoorAllowed"].Value = cbWiFiODA.Checked;
         cmd.Parameters["@HT20"].Value = cbWiFiHT20.Checked;
         cmd.Parameters["@HT40"].Value = cbWiFiHT40.Checked;
         cmd.Parameters["@HT80"].Value = cbWiFiHT80.Checked;
         cmd.Parameters["@HT160"].Value = cbWiFiHT160.Checked;
         cmd.Parameters["@HTDesc"].Value = tbWiFiHT.Text.Trim();
         cmd.Parameters["@DFS"].Value = cbWiFiDFS.Checked;
         cmd.Parameters["@TPC"].Value = cbWiFiTPC.Checked;
         cmd.Parameters["@DFSDesc"].Value = tbWiFiDFS.Text.Trim();
         cmd.Parameters["@Seq"].Value = i;
         SQLUtil.ExecuteSql(cmd);
     }
 }
开发者ID:AdamsChao,项目名称:netdb-localdev-proj,代码行数:53,代码来源:ImaTechRF.aspx.cs

示例3: GetTechFrequency

 private void GetTechFrequency(SqlCommand cmd, Panel plTech, string strTechName)
 {
     cmd.Parameters["@TechName"].Value = strTechName;
     DataTable dtTech = SQLUtil.QueryDS(cmd).Tables[0];
     int intRowCount = dtTech.Rows.Count;
     if (intRowCount > 0)
     {
         if (plTech.ID.Replace("pl", "") != "CDMA") { strTechName = plTech.ID.Replace("pl", ""); }
         TextBox tbPL;
         CheckBox cbIDA;
         CheckBox cbODA;
         CheckBox cbHT20;
         CheckBox cbHT40;
         CheckBox cbHT80;
         CheckBox cbHT160;
         TextBox tbHT;
         CheckBox cbDFS;
         CheckBox cbTPC;
         TextBox tbDFS;
         CheckBox cbANA;
         CheckBox cbANAN;
         for (int i = 1; i <= intRowCount; i++)
         {
             TextBox tbFrequencyDesc = (TextBox)plTech.FindControl("tb" + strTechName + "FDesc" + i.ToString());
             if (tbFrequencyDesc != null) { tbFrequencyDesc.Text = dtTech.Rows[i - 1]["FrequencyDesc"].ToString(); }
             tbPL = (TextBox)plTech.FindControl("tb" + strTechName + "PL" + i.ToString());
             if (tbPL != null) { tbPL.Text = dtTech.Rows[i - 1]["PowerLimit"].ToString(); }
             cbIDA = (CheckBox)plTech.FindControl("cb" + strTechName + "IDA" + i.ToString());
             if (cbIDA != null) { cbIDA.Checked = Convert.ToBoolean(dtTech.Rows[i - 1]["IndoorAllowed"]); }
             cbODA = (CheckBox)plTech.FindControl("cb" + strTechName + "ODA" + i.ToString());
             if (cbODA != null) { cbODA.Checked = Convert.ToBoolean(dtTech.Rows[i - 1]["OutdoorAllowed"]); }
             cbHT20 = (CheckBox)plTech.FindControl("cb" + strTechName + "HT20" + i.ToString());
             if (cbHT20 != null) { cbHT20.Checked = Convert.ToBoolean(dtTech.Rows[i - 1]["HT20"]); }
             cbHT40 = (CheckBox)plTech.FindControl("cb" + strTechName + "HT40" + i.ToString());
             if (cbHT40 != null) { cbHT40.Checked = Convert.ToBoolean(dtTech.Rows[i - 1]["HT40"]); }
             cbHT80 = (CheckBox)plTech.FindControl("cb" + strTechName + "HT80" + i.ToString());
             if (cbHT80 != null) { cbHT80.Checked = Convert.ToBoolean(dtTech.Rows[i - 1]["HT80"]); }
             cbHT160 = (CheckBox)plTech.FindControl("cb" + strTechName + "HT160" + i.ToString());
             if (cbHT160 != null) { cbHT160.Checked = Convert.ToBoolean(dtTech.Rows[i - 1]["HT160"]); }
             tbHT = (TextBox)plTech.FindControl("tb" + strTechName + "HT" + i.ToString());
             if (tbHT != null) { tbHT.Text = dtTech.Rows[i - 1]["HTDesc"].ToString(); }
             cbDFS = (CheckBox)plTech.FindControl("cb" + strTechName + "DFS" + i.ToString());
             if (cbDFS != null) { cbDFS.Checked = Convert.ToBoolean(dtTech.Rows[i - 1]["DFS"]); }
             cbTPC = (CheckBox)plTech.FindControl("cb" + strTechName + "TPC" + i.ToString());
             if (cbTPC != null) { cbTPC.Checked = Convert.ToBoolean(dtTech.Rows[i - 1]["TPC"]); }
             tbDFS = (TextBox)plTech.FindControl("tb" + strTechName + "DFS" + i.ToString());
             if (tbDFS != null) { tbDFS.Text = dtTech.Rows[i - 1]["DFSDesc"].ToString(); }
             cbANA = (CheckBox)plTech.FindControl("cb" + strTechName + "ANA" + i.ToString());
             if (cbANA != null) { cbANA.Checked = Convert.ToBoolean(dtTech.Rows[i - 1]["IsAllowed"]); }
             cbANAN = (CheckBox)plTech.FindControl("cb" + strTechName + "ANAN" + i.ToString());
             if (cbANAN != null) { cbANAN.Checked = Convert.ToBoolean(dtTech.Rows[i - 1]["IsNotAllowed"]); }
             if (i == 1)
             {
                 TextBox tbRemark;
                 if (plTech.ID.Replace("pl", "") != "CDMA") { tbRemark = (TextBox)plTech.FindControl("tb" + strTechName + "Remark"); }
                 else { tbRemark = tbCDMRemark; }
                 if (tbRemark != null) { tbRemark.Text = dtTech.Rows[i - 1]["Remark"].ToString(); }
             }
         }
     }
 }
开发者ID:AdamsChao,项目名称:netdb-localdev-proj,代码行数:61,代码来源:ImaTechRF.aspx.cs

示例4: GetCheckedPersonInfo

    protected string GetCheckedPersonInfo(Panel strPName)
    {
        string strMCode = string.Empty;
        for (int i = 1; i < 6; i++)
        {
            CheckBoxList CBL = (CheckBoxList)strPName.FindControl(strPName.ID.ToString() + i.ToString());
            foreach (ListItem LI in CBL.Items)
            {
                if (LI.Selected)
                {
                    strMCode += "'" + LI.Value + "',";
                }
            }
        }

        return strMCode;
    }
开发者ID:SaintLoong,项目名称:HanCheng_CoalTraffic_BS,代码行数:17,代码来源:RoomSuperviseEdit.aspx.cs

示例5: CheckOrNoCheck

    protected void CheckOrNoCheck(Panel strPName, bool BFlag)
    {
        for (int i = 1; i < 6; i++)
        {
            CheckBoxList CBL = (CheckBoxList)strPName.FindControl((strPName.ID.ToString() + i.ToString()));

            foreach (ListItem Li in CBL.Items)
            {
                Li.Selected = BFlag;
            }
        }
    }
开发者ID:SaintLoong,项目名称:HanCheng_CoalTraffic_BS,代码行数:12,代码来源:RoomSuperviseEdit.aspx.cs

示例6: GetTechFrequency

 private void GetTechFrequency(SqlCommand cmd, Panel plTech, string strTechName)
 {
     cmd.Parameters["@TechName"].Value = strTechName;
     DataTable dtTech = SQLUtil.QueryDS(cmd).Tables[0];
     int intRowCount = dtTech.Rows.Count;
     if (intRowCount > 0)
     {
         if (plTech.ID.Replace("pl", "") != "CDMA") { strTechName = plTech.ID.Replace("pl", ""); }
         Label lblPL;
         Label lblIDA;
         Label lblODA;
         Label lblHT20;
         Label lblHT40;
         Label lblHT;
         Label lblDFS;
         Label lblTPC;
         Label lblDFSDesc;
         Label lblANA;
         for (int i = 1; i <= intRowCount; i++)
         {
             Label lblFrequencyDesc = (Label)plTech.FindControl("lbl" + strTechName + "FDesc" + i.ToString());
             if (lblFrequencyDesc != null) { lblFrequencyDesc.Text = dtTech.Rows[i - 1]["FrequencyDesc"].ToString(); }
             lblPL = (Label)plTech.FindControl("lbl" + strTechName + "PL" + i.ToString());
             if (lblPL != null) { lblPL.Text = dtTech.Rows[i - 1]["PowerLimit"].ToString(); }
             lblIDA = (Label)plTech.FindControl("lbl" + strTechName + "IDA" + i.ToString());
             if (lblIDA != null)
             {
                 if (Convert.ToBoolean(dtTech.Rows[i - 1]["IndoorAllowed"])) { lblIDA.Text = "Indoor Allowed"; }
             }
             lblODA = (Label)plTech.FindControl("lbl" + strTechName + "ODA" + i.ToString());
             if (lblODA != null)
             {
                 if (Convert.ToBoolean(dtTech.Rows[i - 1]["OutdoorAllowed"])) { lblODA.Text = "Outdoor Allowed"; }
             }
             lblHT20 = (Label)plTech.FindControl("lbl" + strTechName + "HT20" + i.ToString());
             if (lblHT20 != null)
             {
                 if (Convert.ToBoolean(dtTech.Rows[i - 1]["HT20"])) { lblHT20.Text = "HT20"; }
             }
             lblHT40 = (Label)plTech.FindControl("lbl" + strTechName + "HT40" + i.ToString());
             if (lblHT40 != null)
             {
                 if (Convert.ToBoolean(dtTech.Rows[i - 1]["HT40"])) { lblHT40.Text = "HT40"; }
             }
             lblHT = (Label)plTech.FindControl("lbl" + strTechName + "HT" + i.ToString());
             if (lblHT != null)
             {
                 lblHT.Text = dtTech.Rows[i - 1]["HTDesc"].ToString();
             }
             lblDFS = (Label)plTech.FindControl("lbl" + strTechName + "DFS" + i.ToString());
             if (lblDFS != null)
             {
                 if (Convert.ToBoolean(dtTech.Rows[i - 1]["DFS"])) { lblDFS.Text = "DFS"; }
             }
             lblTPC = (Label)plTech.FindControl("lbl" + strTechName + "TPC" + i.ToString());
             if (lblTPC != null)
             {
                 if (Convert.ToBoolean(dtTech.Rows[i - 1]["TPC"])) { lblTPC.Text = "TPC"; }
             }
             lblDFSDesc = (Label)plTech.FindControl("lbl" + strTechName + "DFSDesc" + i.ToString());
             if (lblDFSDesc != null) { lblDFSDesc.Text = dtTech.Rows[i - 1]["DFSDesc"].ToString(); }
             lblANA = (Label)plTech.FindControl("lbl" + strTechName + "ANA" + i.ToString());
             if (lblANA != null)
             {
                 if (Convert.ToBoolean(dtTech.Rows[i - 1]["IsAllowed"])) { lblANA.Text = "Allowed"; }
                 else { lblANA.Text = "Not Allowed"; }
             }
             if (i == 1)
             {
                 Label lblRemark;
                 if (plTech.ID.Replace("pl", "") != "CDMA") { lblRemark = (Label)plTech.FindControl("lbl" + strTechName + "Remark"); }
                 else { lblRemark = lblCDMRemark; }
                 if (lblRemark != null) { lblRemark.Text = dtTech.Rows[i - 1]["Remark"].ToString(); }
             }
         }
     }
 }
开发者ID:AdamsChao,项目名称:netdb-localdev-proj,代码行数:77,代码来源:ImaDetail99Telecom.aspx.cs


注:本文中的Panel.FindControl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。