예제 #1
0
파일: FormEntity.cs 프로젝트: ewgeny911/FBA
        /// <summary>
        /// Заполнение свойств компонентов значениями.
        /// </summary>
        private void FillData()
        {
            Obj = new FBA.ObjectRef();
            Obj.SetQueryTable(this, "Main1", "fbaEntity", ID, "ID", "", DirectionQuery.Remote);
            Obj.AddAttr("Main1.EntityID", "1");
            Obj.AddAttr("Main1.Feature");
            if (operation == Operation.AddChild)
            {
                Obj.AddAttr("Main1.ParentID", ParentID);
            }
            if ((operation == Operation.Edit) || (operation == Operation.Del))
            {
                Obj.Read();
            }

            DoChecked = false;
            int val = Obj["Main1.Feature"].ToInt(); //   tbFeature.Text.ToInt();

            cbSystem.Checked   = sys.GetBit(val, 0);
            cbAccObj.Checked   = sys.GetBit(val, 1);
            cbTree.Checked     = sys.GetBit(val, 2);
            cbDiv.Checked      = sys.GetBit(val, 3);
            cbCounter.Checked  = sys.GetBit(val, 4);
            cbProtocol.Checked = sys.GetBit(val, 5);
            DoChecked          = true;
        }
예제 #2
0
 /// <summary>
 /// Заполнение свойств компонентов значениями.
 /// </summary>
 private void FillData()
 {
     Obj = new FBA.ObjectRef();
     Obj.SetQueryTable(this, "Main1", "fbaTable", ObjID, "ID", "", DirectionQuery.Remote);
     Obj.AddAttr("Main1.EntityID", "2");
     Obj.AddAttr("Main1.TableEntityID", TableEntityID); //Добавляем сразу значение.
     Obj.AddAttr("Main1.Type");
     Obj.Read();
     if (Obj["Main1.Type"] != "")
     {
         tbTypeStr.SelectedIndex = Obj["Main1.Type"].ToInt() - 1;
     }
     else
     {
         tbTypeStr.Text = "";
     }
 }