private void Btn_addClient_Click(object sender, RoutedEventArgs e) { if (wnd_newClient == null) { wnd_newClient = new NewClient(); wnd_newClient.accTypes = mSSqlRep.DtClientsTypes; wnd_newClient.newClientEvent += mSSqlRep.AddClient; wnd_newClient.Owner = this; } wnd_newClient.ShowDialog(); //if (wnd_newClient.DialogResult == true) //{ // mSSqlRep.ReFilldt(); //} wnd_newClient = null; }
private void Btn_addClient_Click(object sender, RoutedEventArgs e) { if (((int)((DataRowView)cbbx_ClientType.SelectedItem)["id"]) == 0) { if (wnd_newClient == null) { wnd_newClient = new NewClient(); //wnd_newClient.accTypes = mSSqlRep.DtClientsTypes; wnd_newClient.newClientEvent += mSSqlRep.AddClient; wnd_newClient.Owner = this; } wnd_newClient.ShowDialog(); //if (wnd_newClient.DialogResult == true) //{ // mSSqlRep.ReFilldt(); //} wnd_newClient = null; } else { if (wnd_newOrgs == null) { wnd_newOrgs = new NewOrgs(); //wnd_newClient.accTypes = mSSqlRep.DtClientsTypes; wnd_newOrgs.newOrganisationEvent += mSSqlRep.AddOrganisation; wnd_newOrgs.Owner = this; } wnd_newOrgs.ShowDialog(); //if (wnd_newClient.DialogResult == true) //{ // mSSqlRep.ReFilldt(); //} wnd_newOrgs = null; } }