private void btnSave_Click(object sender, EventArgs e)
        {
            if (maintainMode == MaintainMode.Create)
            {
                DBConnInfoRepo.GetInstance().Add(connInfo);
            }
            else
            {
                DBConnInfoRepo.GetInstance().Update(connInfo);
            }

            Close();
        }
Exemple #2
0
 private void RefreshDGVDBConnectInfo()
 {
     DBConnInfoList = DBConnInfoRepo.GetInstance().Get();
     DGVDBConnectInfo.DataSource = DBConnInfoList;
     DGVDBConnectInfo.AutoResizeColumns();
 }
Exemple #3
0
 private void 刪除ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     DBConnInfoRepo.GetInstance().Delete((DBConnInfo)DGVDBConnectInfo.CurrentRow.DataBoundItem);
     RefreshDGVDBConnectInfo();
 }