Ejemplo n.º 1
0
        private void schedulerControl1_SelectionChanged(object sender, EventArgs e)
        {
            if (schedulerControl1.SelectedAppointments.Count == 0)
            {
                return;
            }
            string baseID = schedulerControl1.SelectedAppointments[0].Description;

            if (string.IsNullOrEmpty(baseID))
            {
                return;
            }

            gymbaseController.CurrentID = int.Parse(baseID.ToString());
            gymbaseController.LoadEntry();
            this.dateE_Date.DateTime = DateTime.Parse(gymbaseController.Entry.Date);
            this.tv_Calorie.Text     = "" + gymbaseController.Entry.Calorie;
            this.tv_Other.Text       = gymbaseController.Entry.Other;

            if (appAdaptor != null)
            {
                appAdaptor.NotifyClearTable();
                appAdaptor.NotifyDestoryTable();
            }

            appAdaptor.Initial(gymAppController.QueryEntriesByBaseID(baseID), appBuilder);
            appAdaptor.NotifyfreshDataTable();
            this.gridControl_appScan.DataSource = appAdaptor.ResultTable;
            this.gridHelper_App.SetColunmOption(appBuilder.ID, false, false);
            this.gridHelper_App.SetColunmOption(appBuilder.BaseID, false, false);
            this.gridHelper_App.SetCellResposity(appBuilder.Op_Delete, this.Repo_HLE_Delete);
            this.btn_Update.Enabled = true;
            this.btn_Delete.Enabled = true;
        }
Ejemplo n.º 2
0
        public void onInitialUI()
        {
            this.dateE_today.DateTime = DateTime.Now.Date;
            this.cmb_Catalog.Properties.Items.Clear();
            foreach (var item in gymCatalogController.TravleAllEntities())
            {
                this.cmb_Catalog.Properties.Items.Add(item);
            }

            appAdaptor.NotifyfreshDataTable();
            this.gridControl_app.DataSource = appAdaptor.ResultTable;
            gridHelper.SetColunmOption(appBuilder.BaseID, false, false);
            gridHelper.SetColunmOption(appBuilder.ID, false, false);
            gridHelper.SetCellResposity(appBuilder.Op_Delete, this.Repo_HLE_Delete);
        }