📜  public static Int64 m_pSpottingTargetComponentData - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:48.990000             🧑  作者: Mango

代码示例1
public void AddRule(int PropID, long PropValueID, int type, string Data)
        {
            if (!m_HasRule)
            {
                m_Rules = new DataTable();
                m_Rules.Columns.Add(new DataColumn("RID", Type.GetType("System.Int32")));
                m_Rules.Columns.Add(new DataColumn("PropID", Type.GetType("System.Int32")));
                m_Rules.Columns.Add(new DataColumn("PropValueID", Type.GetType("System.Int64")));
                //m_Rules.Columns.Add(new DataColumn("PropValue", Type.GetType("System.String")));
                m_Rules.Columns.Add(new DataColumn("Type", Type.GetType("System.Int32")));
                m_Rules.Columns.Add(new DataColumn("Data", Type.GetType("System.String")));
                m_HasRule = true;
            }
            ToStringSB = null;

            if (type<2)  // a "Is/Not specified property"
            {            
                if (string.IsNullOrEmpty(Data)) //is specified (0,1)
                   m_Rules.Rows.Add(m_RID, PropID, 0, type, "");       //<<-- here we pass 0 (int32) instead of long.. could this be it? Stack says this is not the line throwing
                else  //is equal to/is not equal to(2,3) 
                    m_Rules.Rows.Add(m_RID, PropID, PropValueID,3-type, Data);                
            }else
                if ((type > 3) && (type < 6)) // a "like/not like" rule
                {
                    // "Like" or "not like" DATA .. no value ID is provided
                    m_Rules.Rows.Add(m_RID, PropID, PropValueID, type, Data); //<<-- Stack says it throws here 

                }
                else // a greater/lesser rule
                {
                    m_Rules.Rows.Add(m_RID, PropID, PropValueID, type, Data);
                }

        }