コード例 #1
0
        private void gridMain_CellDoubleClick(object sender, OpenDental.UI.ODGridClickEventArgs e)
        {
            FormCentralConnectionGroupEdit FormCCGE = new FormCentralConnectionGroupEdit();

            FormCCGE.ConnectionGroupCur = _listCentralConnGroups[e.Row];
            FormCCGE.ShowDialog();
            //disregard dialog result
            FillGrid();
        }
コード例 #2
0
        private void butAdd_Click(object sender, EventArgs e)
        {
            ConnectionGroup connGroup = new ConnectionGroup();

            connGroup.Description        = "Group";   //in case they close the window without clicking ok
            connGroup.ConnectionGroupNum = ConnectionGroups.Insert(connGroup);
            connGroup.IsNew = true;
            FormCentralConnectionGroupEdit FormCCGE = new FormCentralConnectionGroupEdit();

            FormCCGE.ConnectionGroupCur = connGroup;
            FormCCGE.ShowDialog();
            //if cancel, deleted inside
            FillGrid();
        }
コード例 #3
0
		private void gridMain_CellDoubleClick(object sender,OpenDental.UI.ODGridClickEventArgs e) {
			ConnectionGroup connGroup=_listCentralConnGroups[gridMain.SelectedIndices[0]].Copy();//Making copy so if they press cancel any changes won't persist.
			FormCentralConnectionGroupEdit FormCCGE=new FormCentralConnectionGroupEdit();
			FormCCGE.ConnectionGroupCur=connGroup;
			FormCCGE.ShowDialog();
			if(FormCCGE.DialogResult==DialogResult.OK) {
				if(FormCCGE.ConnectionGroupCur==null) {//Group was deleted in child window, remove it from list. (Deletion is also DialogResult.OK)
					_listCentralConnGroups.RemoveAt(gridMain.SelectedIndices[0]);
				}
				else{//Child window potentially updated the connection group, replace old version in list with current version.
					_listCentralConnGroups[gridMain.SelectedIndices[0]]=FormCCGE.ConnectionGroupCur;
				}
			}
			FillGrid();
		}
コード例 #4
0
		private void butAdd_Click(object sender,EventArgs e) {
			ConnectionGroup connGroup=new ConnectionGroup();
			connGroup.Description="";
			connGroup.ConnectionGroupNum=ConnectionGroups.Insert(connGroup);
			FormCentralConnectionGroupEdit FormCCGE=new FormCentralConnectionGroupEdit();
			FormCCGE.ConnectionGroupCur=connGroup;
			FormCCGE.IsNew=true;
			FormCCGE.ShowDialog();
			if(FormCCGE.DialogResult==DialogResult.OK) {
				if(FormCCGE.ConnectionGroupCur==null) {
					ConnectionGroups.Delete(connGroup.ConnectionGroupNum);
				}
				else {
					_listCentralConnGroups.Add(connGroup);
				}
			}
			FillGrid();
		}
コード例 #5
0
        private void gridMain_CellDoubleClick(object sender, OpenDental.UI.ODGridClickEventArgs e)
        {
            ConnectionGroup connGroup = _listCentralConnGroups[gridMain.SelectedIndices[0]].Copy();          //Making copy so if they press cancel any changes won't persist.
            FormCentralConnectionGroupEdit FormCCGE = new FormCentralConnectionGroupEdit();

            FormCCGE.ConnectionGroupCur = connGroup;
            FormCCGE.ShowDialog();
            if (FormCCGE.DialogResult == DialogResult.OK)
            {
                if (FormCCGE.ConnectionGroupCur == null)               //Group was deleted in child window, remove it from list. (Deletion is also DialogResult.OK)
                {
                    _listCentralConnGroups.RemoveAt(gridMain.SelectedIndices[0]);
                }
                else                 //Child window potentially updated the connection group, replace old version in list with current version.
                {
                    _listCentralConnGroups[gridMain.SelectedIndices[0]] = FormCCGE.ConnectionGroupCur;
                }
            }
            FillGrid();
        }
コード例 #6
0
        private void butAdd_Click(object sender, EventArgs e)
        {
            ConnectionGroup connGroup = new ConnectionGroup();

            connGroup.Description        = "";
            connGroup.ConnectionGroupNum = ConnectionGroups.Insert(connGroup);
            FormCentralConnectionGroupEdit FormCCGE = new FormCentralConnectionGroupEdit();

            FormCCGE.ConnectionGroupCur = connGroup;
            FormCCGE.IsNew = true;
            FormCCGE.ShowDialog();
            if (FormCCGE.DialogResult == DialogResult.OK)
            {
                if (FormCCGE.ConnectionGroupCur == null)
                {
                    ConnectionGroups.Delete(connGroup.ConnectionGroupNum);
                }
                else
                {
                    _listCentralConnGroups.Add(connGroup);
                }
            }
            FillGrid();
        }