コード例 #1
0
        //检查产品类型合法性
        public bool CheckValidProductType()
        {
            List <bool> bits = new List <bool>();

            foreach (Control c in _groupBoxProductType.Controls)
            {
                ucRadioBoxList ucrbl = c as ucRadioBoxList;
                if (ucrbl != null)
                {
                    foreach (RadioButton rb in ucrbl)
                    {
                        bits.Add(rb.Checked);
                    }
                    break;
                }
            }
            return(CheckJustOne(bits));
        }
コード例 #2
0
ファイル: ConcatSQL.cs プロジェクト: windygu/hispeed
 //拼接产品类型sql,并记录产品类型
 private void ConcatSQLByProductType(UIControls ui)
 {
     foreach (Control c in ui.GroupBoxProductType.Controls)
     {
         ucRadioBoxList ucrbl = c as ucRadioBoxList;
         if (ucrbl != null)
         {
             foreach (RadioButton rb in ucrbl)
             {
                 if (rb.Checked)
                 {
                     _productType = rb.Text;
                     //_sql.Append("ProductID=(select ProductsID from cp_cloudprds_tb where ProductsComments='").Append(rb.Text).Append("') and ");
                     _sql.Append("ProductID='").Append(rb.Tag.ToString()).Append("' and ");
                     break;
                 }
             }
             break;
         }
     }
 }