Exemple #1
0
        private void btn_Sure_Click(object sender, EventArgs e)
        {
            Validator valitor = onValidateInputValue();

            if (valitor.IsValidate == false)
            {
                MessageBoxHelper.ShowInputErrorDialog(valitor.ErrorMessage);
                return;
            }

            gymbaseController.LoadEntry();

            onExtractInputValue();

            object baseEntryPK = null;

            if (gymbaseController.InsertEntry(out baseEntryPK))
            {
                bool result = gymAppController.InsertWithDeleteOldRecord(baseEntryPK, appAdaptor.DataList);
                if (result)
                {
                    GParam.Create().Mediator.NotifyUpdateGYMSign();
                }
                MessageBoxHelper.ShowCreateStateDialog(result);
            }
            else
            {
                MessageBoxHelper.ShowCreateStateDialog(false);
            }
        }
Exemple #2
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;
        }