Beispiel #1
0
 private void cb_name_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (this.cb_name.SelectedIndex > -1)
     {
         char attrType = Convert.ToChar("I");
         this._curAttr = (GenericAttribute)this._attrList[this.cb_name.SelectedIndex];
         if (this._curAttr.Category == "M")
         {
             attrType = Convert.ToChar("M");
         }
         if (this._curAttr.Category == "R")
         {
             attrType = Convert.ToChar("R");
         }
         if (this._isClsAttrSet)
         {
             this._attrName = new ConditionAttributeName(this._className, attrType, this._curAttr.Name);
         }
         else
         {
             this._attrName = new ConditionAttributeName(this._className, this._curAttr.Name);
         }
         this.SetOperatorOcxLst();
     }
 }
Beispiel #2
0
 private void SetNameOcxLst()
 {
     this._attrList.Clear();
     this._curAttr = null;
     this._operList.Clear();
     this.cb_name.Properties.Items.Clear();
     this.cb_operator.Properties.Items.Clear();
     this.panel_value.Controls.Clear();
     this.cb_name.Text     = "";
     this.cb_operator.Text = "";
     this._attrName        = null;
     this._operType        = OperatorType.Unknown;
     this._attrList.Clear();
     GenericAttribute[] elements = null;
     if (this._isClsAttrSet)
     {
         elements = ModelContext.MetaModel.GetAllSearchableAttributes(this._className);
     }
     else
     {
         elements = ModelContext.MetaModel.GetRelationGenericAttributes(this._className);
     }
     if (elements != null)
     {
         GenericAttribute[] c = this.FilterAttrs(elements);
         this._attrList.AddRange(c);
     }
     foreach (GenericAttribute attribute in this._attrList)
     {
         this.cb_name.Properties.Items.Add(attribute.Label.ToString());
     }
 }