/// <summary> /// データ更新 /// </summary> private void dataUpdate() { try { CONYXDataSet.出力先PCRow r = dts.出力先PC.Single(a => a.ID == int.Parse(_SelectID)); r.コンピューター名 = txtComName.Text; r.登録名 = txtName.Text; r.備考 = txtBikou.Text; r.更新年月日 = DateTime.Now; adp.Update(dts.出力先PC); // 自分のコンピュータ名のときPC登録名 2014/05/20 if (System.Net.Dns.GetHostName() == txtComName.Text) { global.pcName = txtName.Text; } } catch (Exception ex) { MessageBox.Show(ex.Message); return; } finally { //if (sCom.Connection.State == ConnectionState.Open) sCom.Connection.Close(); } }
private void dataDel() { try { CONYXDataSet.出力先PCRow r = dts.出力先PC.Single(a => a.ID == int.Parse(_SelectID)); r.Delete(); adp.Update(dts.出力先PC); } catch (Exception ex) { MessageBox.Show(ex.Message); return; } finally { //if (sCom.Connection.State == ConnectionState.Open) sCom.Connection.Close(); } }