private void btnLuuThongTin_Click(object sender, EventArgs e) { //connectionString = string.Format("Data Source = {0}; Initial Catalog = {1}; ", txtTenServer.Text, cboDatabase.Text); //if (cboKieuXacThuc.SelectedIndex == 0) // connectionString += "Integrated Security = True; "; //else // connectionString += string.Format("User Id = {0}; Password = {1}; ", txtTenDangNhap.Text, txtMatKhau.Text); //GlobalSettings.ConnectionString = connectionString; //GlobalSettings.ServerName = txtTenServer.Text; //GlobalSettings.ServerCatalog = cboDatabase.Text; //GlobalSettings.SaveDatabaseConnection(); LuuLaiCauHinhFileConfig(); //luu lai duong dan cap nhat CDSL VERSION _version = VersionLogic.Select(); _version.AppLink = txtUpdateVersionLink.Text; if (VersionLogic.Update(_version)) { O2S_Common.Utilities.ThongBao.frmThongBao frmthongbao = new O2S_Common.Utilities.ThongBao.frmThongBao(Base.ThongBaoLable.CO_LOI_XAY_RA); frmthongbao.Show(); } }
private void LoadCauHinhUpdateVersion() { try { VERSION _version = VersionLogic.Select(); if (_version != null) { txtUpdateVersionLink.Text = _version.AppLink; } } catch (Exception ex) { O2S_Common.Logging.LogSystem.Warn(ex); } }
private void KiemTraTonTaiVaInsertLinkVersion() { try { VERSION _version = VersionLogic.Select(); if (_version == null) { VERSION _versionInsert = new VERSION() { AppVersion = "1.0.0.0", //AppLink = txtUpdateVersionLink.Text, AppType = 0, }; VersionLogic.Insert(_version); } } catch (Exception ex) { O2S_Common.Logging.LogSystem.Warn(ex); } }