Example #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();
        }
Example #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();
        }
Example #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();
		}
Example #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();
		}
        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();
        }
        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();
        }