private void showDialog()
        {
            if (FocusedCell == null)
            {
                return;
            }
            var dataSource = (emsView.GetViewModel() is EmsLisViewModel) ? ((emsView.GetViewModel() as EmsLisViewModel).GetFormDataSource() as EmsObsItemDO).EmsOrObsList :
                             ((emsView.GetViewModel() as EmsRisViewModel).GetFormDataSource() as EmsObsItemDO).EmsOrObsList;
            var setRdaio = (emsView.GetViewModel() is EmsLisViewModel) ? (emsView.GetViewModel() as EmsLisViewModel).checkRadio() : (emsView.GetViewModel() as EmsRisViewModel).checkRadio();

            if ((emsView.GetViewModel() is EmsLisViewModel))
            {
                baseDiagLog = new AplabsSetItemDialog(emsView, dataSource, isAllowEdit, setRdaio);
            }
            else
            {
                baseDiagLog = new ApobsSetItemDialog(emsView, dataSource, isAllowEdit, setRdaio);
            }
            baseDiagLog.Size = new System.Drawing.Size(400, 390);
            baseDiagLog.ShowDialog();
            // 保存
            if (baseDiagLog.DialogResult == DialogResult.OK)
            {
                FocusedCell.SetValue(ConstructDetialInfo(dataSource));
                //gridControl.DataTableShared.CloseEditor(null);
                emsView.GetGridControl().CloseEditor();
            }
        }
Beispiel #2
0
 private void MySearchBox_ValueTextChanged(object sender, EventArgs e)
 {
     if (FocusedCell == null || DataObj == null || !refEdit.Visible)
     {
         return;
     }
     FocusedCell.SetValue(ConstructInvitedDeptInfo(this.DataObj));
 }
        private void MySearchBox_ValueTextChanged(object sender, EventArgs e)
        {
            var dataSource = (emsView.GetViewModel() is EmsLisViewModel) ? ((emsView.GetViewModel() as EmsLisViewModel).GetFormDataSource() as EmsObsItemDO).EmsOrObsList :
                             ((emsView.GetViewModel() as EmsRisViewModel).GetFormDataSource() as EmsObsItemDO).EmsOrObsList;

            if (FocusedCell == null || dataSource == null || !refEdit.Visible)
            {
                return;
            }
            FocusedCell.SetValue(ConstructDetialInfo(dataSource));
        }
Beispiel #4
0
        protected override void OnButtonClick(object sender, MouseEventArgs e)
        {
            if (FocusedCell == null)
            {
                return;
            }

            ConsInvitedDeptsDialog panel = new ConsInvitedDeptsDialog(DataObj);

            panel.ShowDialog();
            // 保存
            if (panel.DialogResult == DialogResult.OK)
            {
                FocusedCell.SetValue(ConstructInvitedDeptInfo(this.DataObj));
                //gridControl.DataTableShared.CloseEditor(null);
                gridControl.CloseEditor();
            }
        }
Beispiel #5
0
        void CustomRefControl_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (FocusedCell == null)
            {
                return;
            }

            ConsInvitedDeptsDialog panel = new ConsInvitedDeptsDialog(DataObj);

            panel.ShowDialog();
            // 保存
            if (panel.DialogResult == DialogResult.OK)
            {
                FocusedCell.SetValue(ConstructInvitedDeptInfo(this.DataObj));
                //gridControl.DataTableShared.CloseEditor(null);
                gridControl.CloseEditor();
            }
        }