private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e) { if(IsSelectionMode){ SelectedSiteNum=SiteC.List[e.Row].SiteNum; DialogResult=DialogResult.OK; return; } else{ FormSiteEdit FormS=new FormSiteEdit(); FormS.SiteCur=SiteC.List[e.Row]; FormS.ShowDialog(); FillGrid(); changed=true; } }
private void butAdd_Click(object sender, System.EventArgs e) { //This button is not visible unless user has appropriate permission for setup. FormSiteEdit FormS=new FormSiteEdit(); FormS.SiteCur=new Site(); FormS.SiteCur.IsNew=true; FormS.ShowDialog(); FillGrid(); changed=true; }