コード例 #1
0
        private void QueryPlugLineStructInfo()
        {
            RadGridViewProperties.ClearGridView(this.radGridView1, null);
            var selectSQL = "order by ID desc";

            if (this.rtbCableCondition.Text.Trim() != "")
            {
                selectSQL = $"where CableName like '%{this.rtbCableCondition.Text.Trim()}%' order by ID desc";
            }
            var data = lineStructLibraryDetailManager.GetDataSetByFieldsAndWhere("distinct CableName", selectSQL).Tables[0];

            if (data.Rows.Count < 1)
            {
                return;
            }
            int iRow = 0;

            foreach (DataRow dr in data.Rows)
            {
                var lineStructName = dr["CableName"].ToString();
                if (IsExistLineStruct(lineStructName))
                {
                    continue;
                }
                this.radGridView1.Rows.AddNew();
                var resultString = GetInterfaceInfoByCableName(lineStructName);
                this.radGridView1.Rows[iRow].Cells[0].Value = iRow + 1;
                this.radGridView1.Rows[iRow].Cells[1].Value = lineStructName;
                this.radGridView1.Rows[iRow].Cells[2].Value = resultString;
                this.radGridView1.Rows[iRow].Cells[3].Value = lineStructLibraryDetailManager.GetRowCountByWhere($"where CableName='{lineStructName}'");
                //this.radGridView1.Rows[iRow].Cells[4].Value = dr["Remark"].ToString();
                iRow++;
            }
        }
コード例 #2
0
        private bool IsCableNoExist(string cableName)
        {
            var count = lineStructManager.GetRowCountByWhere($"where CableName = '{cableName}'");

            if (count > 0)
            {
                return(true);
            }
            return(false);
        }
コード例 #3
0
        private bool IsCableExist(string cableName)
        {
            TCableTestLibraryManager cableManage = new TCableTestLibraryManager();
            var count = cableManage.GetRowCountByWhere($"where CableName = '{cableName}'");

            if (count > 0)
            {
                return(true);
            }
            return(false);
        }
コード例 #4
0
        private void QueryCableLibInfo()
        {
            RadGridViewProperties.ClearGridView(this.radGridView1, null);
            var where = "";
            if (this.tool_queryFilter.Text != "")
            {
                where = $"where CableName like '%{this.tool_queryFilter.Text}%'";
            }
            var data = lineStructLibraryDetailManager.GetDataSetByFieldsAndWhere("distinct CableName,Remark,Operator", where).Tables[0];

            if (data.Rows.Count < 1)
            {
                return;
            }
            int iRow = 0;

            foreach (DataRow dr in data.Rows)
            {
                var lineStructName = dr[0].ToString();

                if (IsExistLineStruct(lineStructName))
                {
                    continue;
                }
                this.radGridView1.Rows.AddNew();
                var resultString = GetInterfaceInfoByCableName(lineStructName);
                this.radGridView1.Rows[iRow].Cells[0].Value = iRow + 1;
                this.radGridView1.Rows[iRow].Cells[1].Value = lineStructName;
                this.radGridView1.Rows[iRow].Cells[2].Value = resultString.Split(',').Length;
                this.radGridView1.Rows[iRow].Cells[3].Value = resultString;
                this.radGridView1.Rows[iRow].Cells[4].Value = lineStructLibraryDetailManager.GetRowCountByWhere($"where CableName='{lineStructName}'");
                this.radGridView1.Rows[iRow].Cells[5].Value = dr[1].ToString();
                this.radGridView1.Rows[iRow].Cells[6].Value = dr[2].ToString();
                iRow++;
            }
        }