本文整理汇总了C#中YouSoftBathGeneralClass.BathDBDataContext.DatabaseExists方法的典型用法代码示例。如果您正苦于以下问题:C# BathDBDataContext.DatabaseExists方法的具体用法?C# BathDBDataContext.DatabaseExists怎么用?C# BathDBDataContext.DatabaseExists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类YouSoftBathGeneralClass.BathDBDataContext
的用法示例。
在下文中一共展示了BathDBDataContext.DatabaseExists方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OrderMainForm_Load
//对话框载入
private void OrderMainForm_Load(object sender, EventArgs e)
{
connectionIP = IOUtil.get_config_by_key(ConfigKeys.KEY_CONNECTION_IP);
if (connectionIP == "")
{
PCListForm pCListForm = new PCListForm();
if (pCListForm.ShowDialog() != DialogResult.OK)
{
this.Close();
return;
}
connectionIP = pCListForm.ip;
IOUtil.set_config_by_key(ConfigKeys.KEY_CONNECTION_IP, connectionIP);
}
db = new BathDBDataContext(connectionString);
if (!db.DatabaseExists())
{
BathClass.printErrorMsg("连接IP不对或者网络不通,请重试!");
connectionIP = "";
IOUtil.set_config_by_key(ConfigKeys.KEY_CONNECTION_IP, connectionIP);
this.Close();
return;
}
}
示例2: MainForm_Load
private void MainForm_Load(object sender, EventArgs e)
{
connectionIP = IOUtil.get_config_by_key(ConfigKeys.KEY_CONNECTION_IP);
if (connectionIP == "")
{
connectionIP = ".";
IOUtil.set_config_by_key(ConfigKeys.KEY_CONNECTION_IP, ".");
}
var db = new BathDBDataContext(connectionString);
if (!db.DatabaseExists())
{
MessageBox.Show("连接IP不对或者网络不通,请重试!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.Close();
return;
}
CheckDetect.Checked = (IOUtil.get_config_by_key(ConfigKeys.KEY_CHECK_DETECT) == "Y");
CheckServer.Checked = (IOUtil.get_config_by_key(ConfigKeys.KEY_CHECK_SERVER) == "Y");
CheckAuto.Checked = (IOUtil.get_config_by_key(ConfigKeys.KEY_CHECK_AUTO) == "Y");
GroupDetect.Enabled = CheckDetect.Checked;
TextTimeLimit.Text = IOUtil.get_config_by_key(ConfigKeys.KEY_TIME_LIMIT);
TextMoneyLimit.Text = IOUtil.get_config_by_key(ConfigKeys.KEY_MONEY_LIMIT);
CheckSMS.Checked = (IOUtil.get_config_by_key(ConfigKeys.KEY_SMS_OPERATION) == "Y");
cmbComPort.Enabled = CheckSMS.Checked;
if (cmbComPort.Enabled)
{
cmbComPort.Text = IOUtil.get_config_by_key(ConfigKeys.KEY_SMSPORT);
}
txtBoxBaudRate.Enabled = CheckSMS.Checked;
if (txtBoxBaudRate.Enabled)
{
txtBoxBaudRate.Text = IOUtil.get_config_by_key(ConfigKeys.KEY_SMSBAUD);
}
//cmbComPort.Items.AddRange(System.IO.Ports.SerialPort.GetPortNames());
m_thread_clearMemory = new Thread(new ThreadStart(clear_Memory));
m_thread_clearMemory.IsBackground = true;
m_thread_clearMemory.Start();
//this.WindowState = FormWindowState.Minimized;
}
示例3: form_load_func
private void form_load_func()
{
//while (true)
//{
//}
work_progress = "正在获取软件版本号...";
productName = "";
int cur_version = get_current_version(ref productName);
//if (productName == "收银" || productName == "前台")
// register.Visible = true;
//else
// register.Visible = false;
work_progress = "正在检测网络连接...";
db = new BathDBDataContext(connectionString);
if (!db.DatabaseExists())
{
BathClass.printErrorMsg("连接IP不对或者网络不通,请重试!");
this.Close();
return;
//PCListForm pCListForm = new PCListForm();
//if (pCListForm.ShowDialog() != DialogResult.OK)
//{
// //_logIn_progress_form.Close();
// this.Close();
// return;
//}
//connectionIP = pCListForm.ip;
//BathClass.set_config_by_key("connectionIP", connectionIP);
//db = new BathDBDataContext(connectionString);
//if (!db.DatabaseExists())
//{
// BathClass.printErrorMsg("连接IP不对或者网络不通,请重试!");
// //_logIn_progress_form.Close();
// this.Close();
// return;
//}
}
work_progress = "正在检测软件版注册序列号...";
//if (productName == "收银" || productName == "前台")
//{
if (!RegisterForm.registered())
hasRegistered = false;
if (hasRegistered)
register.Visible = false;
else if (!hasRegistered && !checkTrialTimes())
okBtn.Enabled = false;
//}
work_progress = "正在读取软件用户名...";
read_users();
id.Items.AddRange(idList.ToArray());
if (id.Items.Count != 0)
id.Text = id.Items[0].ToString();
current_box = id;
current_box.Focus();
work_progress = "正在从服务器获取最新软件版本号...";
BathClass.download_file(connectionIP, "version.ini", productName + "/version.ini");
int new_version = read_version();
if (new_version > cur_version)
{
//_logIn_progress_form.Close();
start_updtate();
this.Close();
return;
}
updateSystemTime();
//_logIn_progress_form.Close();
}
示例4: LogIn_Load
//对话框载入
private void LogIn_Load(object sender, EventArgs e)
{
connectionIP = BathClass.get_config_by_key("connectionIP");
if (connectionIP == "")
{
PCListForm pCListForm = new PCListForm();
if (pCListForm.ShowDialog() != DialogResult.OK)
{
this.Close();
return;
}
connectionIP = pCListForm.ip;
BathClass.set_config_by_key("connectionIP", connectionIP);
}
db = new BathDBDataContext(connectionString);
if (!db.DatabaseExists())
{
BathClass.printErrorMsg("连接IP不对或者网络不通,请重试!");
connectionIP = "";
BathClass.set_config_by_key("connectionIP", connectionIP);
this.Close();
return;
}
if (!RegisterForm.registered())
hasRegistered = false;
if (hasRegistered)
register.Visible = false;
else if (!hasRegistered && !checkTrialTimes())
okBtn.Enabled = false;
read_users();
id.Items.AddRange(idList.ToArray());
if (id.Items.Count != 0)
id.Text = id.Items[0].ToString();
}
示例5: OrderMainForm_Load
//对话框载入
private void OrderMainForm_Load(object sender, EventArgs e)
{
read_connection_IP();
if (connectionIP == "")
{
PCListForm pCListForm = new PCListForm();
if (pCListForm.ShowDialog() != DialogResult.OK)
{
this.Close();
return;
}
connectionIP = pCListForm.ip;
write_connection_IP();
}
var db = new BathDBDataContext(connectionString);
if (!db.DatabaseExists())
{
BathClass.printErrorMsg("连接IP不对或者网络不通,请重试!");
PCListForm pCListForm = new PCListForm();
if (pCListForm.ShowDialog() != DialogResult.OK)
{
this.Close();
return;
}
}
}