示例#1
0
        void InitPage(CrudAPI crudapi)
        {
            BusyIndicator  = busyIndicator;
            layoutControl  = layoutItems;
            leEmployee.api = leGroup.api = leInsurer.api = leSoldTo.api = leParent.api = crudapi;

            if (LoadedRow == null && editrow == null)
            {
                frmRibbon.DisableButtons("Delete");
                editrow = CreateNew() as FamClient;
                editrow.SetMaster(crudapi.CompanyEntity);
            }

            layoutItems.DataContext  = editrow;
            frmRibbon.OnItemClicked += frmRibbon_OnItemClicked;

            if (!string.IsNullOrWhiteSpace(parentName))
            {
                liParent.Visibility = Visibility.Visible;
                leParent.Visibility = Visibility.Visible;
                editrow._Parent     = parentName;
                leParent.IsReadOnly = true;
            }
            else
            {
                liParent.Visibility = Visibility.Collapsed;
                leParent.Visibility = Visibility.Collapsed;
            }

            dim1lookupeditior.api = dim2lookupeditior.api = dim3lookupeditior.api = dim4lookupeditior.api = dim5lookupeditior.api = api;
            //cbAssetLifeCycle.ItemsSource  = Enum.GetValues(typeof(AssetStatus));
            //cbDepreciationMethod.ItemsSource  = Enum.GetValues(typeof(AssetDepreciationMethod));
            StartLoadCache();
        }
示例#2
0
 public FAMPage2(UnicontaBaseEntity sourcedata, bool isEdit = true) : base(sourcedata, isEdit)
 {
     InitializeComponent();
     if (!isEdit)
     {
         editrow = (FamClient)StreamingManager.Clone(sourcedata);
         IdKey idkey = (IdKey)editrow;
         if (idkey.KeyStr != null)
         {
             idkey.KeyStr = null;
         }
     }
     if (!string.IsNullOrWhiteSpace(editrow._Parent))
     {
         this.parentName = editrow._Parent;
     }
     InitPage(api);
 }
示例#3
0
        /// <summary>
        /// Creates the Option window
        /// </summary>
        /// <param name="fileO">The parent (FileOverview) control</param>
        public Options(FamClient.FileOverview fileO)
        {
            InitializeComponent();

            fo = fileO;
            fo.Enabled = false;

            //intOld = fo.GetUpdateInterval() / 1000;

            this.textBox1.Text = intOld.ToString();

            bool checkBoxVal = fo.GetUpdateSate();

            if (checkBoxVal)
            {
                checkBox1.CheckState = CheckState.Checked;
            }
            else
            {
                checkBox1.CheckState = CheckState.Unchecked;
            }

            this.Show();
        }