Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
MainForm.cs
Package: BookSellAnalysis.rar [view]
Upload User: abcs8778
Upload Date: 2022-08-03
Package Size: 2093k
Code Size: 2k
Category:
WEB(ASP,PHP,...)
Development Platform:
SQL
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Text;
- using System.Windows.Forms;
- using System.Data.SqlClient;
- using Microsoft.AnalysisServices.AdomdClient;
- namespace BookSellPredict
- {
- public partial class MainForm : Form
- {
- protected SqlConnection _connDatabase;
- protected AdomdConnection _connAnalysis;
- public MainForm()
- {
- InitializeComponent();
- }
- private void MainForm_Load(object sender, EventArgs e)
- {
- _connDatabase = new SqlConnection("Data Source=(local); Initial Catalog=BookSell; Integrated Security=true");
- _connAnalysis = new AdomdConnection("Data Source=(local); Initial Catalog=BookSellAnalysis;");
- try
- {
- _connDatabase.Open();
- _connAnalysis.Open();
- }
- catch (Exception exp)
- {
- MessageBox.Show("数据连接错误:" + exp.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
- this.Close();
- }
- }
- private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
- {
- if (_connDatabase != null && _connDatabase.State != ConnectionState.Closed)
- _connDatabase.Close();
- if (_connAnalysis != null && _connAnalysis.State != ConnectionState.Closed)
- _connAnalysis.Close();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- CustomerAnalysisForm frm1 = new CustomerAnalysisForm(_connDatabase, _connAnalysis);
- frm1.ShowDialog();
- }
- private void button2_Click(object sender, EventArgs e)
- {
- BookAnalysisForm frm1 = new BookAnalysisForm(_connDatabase, _connAnalysis);
- frm1.ShowDialog();
- }
- }
- }