コード例 #1
0
        public AddEditVisitPlanDay(Visit visit1)
        {
            InitializeComponent();

            this.visit1 = visit1;

            DataTable dt1 = new DataTable();

            dt1 = visit1.GetULPUList();
            fillComboBox(dt1, cbULPU, "ulpu_sname", "ulpu_id");

            dt1 = Activity.getDataTable();
            fillComboBox(dt1, cbActivity, "act_name", "act_id");

            globalData.load = false;
            dt1             = VisitPlanStatus.getDataTable();
            fillComboBox(dt1, cbStatus, "vpst_name", "vpst_id");
            globalData.load = true;

            cbULPU.SelectedValue     = visit1.IdULPU;
            tbPlan.Text              = visit1.Plan;
            tbFact.Text              = visit1.Fact;
            tbNext.Text              = visit1.Next;
            cbActivity.SelectedValue = visit1.IdActivity;
            commRD.Text              = visit1.CommRD;
            cbStatus.SelectedValue   = (int)visit1.Status;

            if (visit1.HaveNewVisitDate)
            {
                enabledNewVisit.Checked = true;
                dateNewVisit.Value      = visit1.NewVisitDate;
            }

            setComboBoxEnabled();

            setTextBoxReadlyOnly();
        }