Example #1
0
        public void onInitialUI()
        {
            tv_Context.Text        = controller.Entry.Context;
            tv_Url.Text            = controller.Entry.LogUrl;
            tv_date.Text           = TechniqueLogController.FormatBmobDate(controller.Entry.Date);
            cke_IsNeedTidy.Checked = controller.Entry.IsNeedTidy.Get();

            TB_TechniqueMissionAdapter missionAdapter = new TB_TechniqueMissionAdapter();
            TB_TechniqueMissionBuilder missionBuilder = new TB_TechniqueMissionBuilder();

            missionAdapter.Initial(missionBuilder);
            missionAdapter.NotifyfreshDataTable(new TechniqueMissionController().FindUnFinishMission());
            sle_Mission.Properties.DataSource = missionAdapter.ResultTable;
            //若没有设置列名绑定,则此处需要手工通知数据源重绑定,否则sle_Mission.Properties.View.Columns中将不会有值
            sle_Mission.Properties.PopulateViewColumns();
            sle_Mission.Properties.DisplayMember = missionBuilder.Name;
            sle_Mission.Properties.ValueMember   = missionBuilder.ObjectID;
            for (int index = 0; index < sle_Mission.Properties.View.Columns.Count; index++)
            {
                sle_Mission.Properties.View.Columns[index].Visible = false;
            }
            sle_Mission.Properties.View.Columns[missionBuilder.Name].Visible          = true;
            sle_Mission.Properties.View.Columns[missionBuilder.TechinqueName].Visible = true;
            //选择默认值,使用valueMember列中的值,而不是直接设置Text值
            sle_Mission.EditValue = controller.Entry.MissionID;
        }
Example #2
0
        public void onCreateComponet()
        {
            controller = new TechniqueMissionController();
            gridHelper = new GridControlHelper(this.gridView1, this.gridControl1);
            controller.LoadEntry();

            builder = new TB_TechniqueMissionBuilder();
            adapter = new TB_TechniqueMissionAdapter();
            adapter.Initial(builder);
        }
Example #3
0
        public void onInitialUI()
        {
            tv_date.Text = CurrentDate.ToString("yyyy-MM-dd");

            TB_TechniqueMissionAdapter missionAdapter = new TB_TechniqueMissionAdapter();
            TB_TechniqueMissionBuilder missionBuilder = new TB_TechniqueMissionBuilder();

            missionAdapter.Initial(missionBuilder);
            missionAdapter.NotifyfreshDataTable(new TechniqueMissionController().FindUnFinishMission());
            repo_search_TechMission.DataSource = missionAdapter.ResultTable;
            repo_search_TechMission.PopulateViewColumns();
            repo_search_TechMission.DisplayMember = missionBuilder.Name;
            repo_search_TechMission.ValueMember   = missionBuilder.ObjectID;
            for (int index = 0; index < repo_search_TechMission.View.Columns.Count; index++)
            {
                repo_search_TechMission.View.Columns[index].Visible = false;
            }
            repo_search_TechMission.View.Columns[missionBuilder.Name].Visible          = true;
            repo_search_TechMission.View.Columns[missionBuilder.TechinqueName].Visible = true;
            repo_search_TechMission.View.Columns[missionBuilder.TechinqueName].Group();
            repo_search_TechMission.View.GroupFormat = "{1}";
            repo_search_TechMission.View.ExpandAllGroups();
        }