private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e) { if (_isSelectionMode) { SelectedPatFieldDef = _listPatFieldDefs[e.Row]; DialogResult = DialogResult.OK; return; } FormPatFieldDefEdit FormPFDE = new FormPatFieldDefEdit(); FormPFDE.FieldDef = _listPatFieldDefs[e.Row]; FormPFDE.ShowDialog(); if (FormPFDE.DialogResult == DialogResult.OK) { if (FormPFDE.FieldDef == null) { _listPatFieldDefs.Remove(_listPatFieldDefs[e.Row]); } else { _listPatFieldDefs[e.Row] = FormPFDE.FieldDef; } _hasChanged = true; FillGrid(); } }
private void butAdd_Click(object sender, System.EventArgs e) { //Employers.Cur=new Employer(); PatFieldDef def = new PatFieldDef(); FormPatFieldDefEdit FormP = new FormPatFieldDefEdit(def); FormP.IsNew = true; FormP.ShowDialog(); FillGrid(); }
private void listMain_DoubleClick(object sender, System.EventArgs e) { if (listMain.SelectedIndex == -1) { return; } FormPatFieldDefEdit FormP = new FormPatFieldDefEdit(PatFieldDefs.List[listMain.SelectedIndex]); FormP.ShowDialog(); if (FormP.DialogResult != DialogResult.OK) { return; } FillGrid(); }
private void butAdd_Click(object sender, System.EventArgs e) { //Employers.Cur=new Employer(); PatFieldDef def = new PatFieldDef(); def.ItemOrder = _listPatFieldDefs.Count; FormPatFieldDefEdit FormPFDE = new FormPatFieldDefEdit(); FormPFDE.FieldDef = def; FormPFDE.IsNew = true; FormPFDE.ShowDialog(); if (FormPFDE.DialogResult == DialogResult.OK) { _hasChanged = true; _listPatFieldDefs.Add(FormPFDE.FieldDef); FillGrid(); } }
private void butAdd_Click(object sender, System.EventArgs e) { //Employers.Cur=new Employer(); PatFieldDef def=new PatFieldDef(); FormPatFieldDefEdit FormP=new FormPatFieldDefEdit(def); FormP.IsNew=true; FormP.ShowDialog(); FillGrid(); }
private void listMain_DoubleClick(object sender, System.EventArgs e) { if(listMain.SelectedIndex==-1){ return; } FormPatFieldDefEdit FormP=new FormPatFieldDefEdit(PatFieldDefs.List[listMain.SelectedIndex]); FormP.ShowDialog(); if(FormP.DialogResult!=DialogResult.OK) return; FillGrid(); }