本文整理汇总了C#中BaseLib.clsDBQueryManager.InsertOrUpdateSetting方法的典型用法代码示例。如果您正苦于以下问题:C# clsDBQueryManager.InsertOrUpdateSetting方法的具体用法?C# clsDBQueryManager.InsertOrUpdateSetting怎么用?C# clsDBQueryManager.InsertOrUpdateSetting使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseLib.clsDBQueryManager
的用法示例。
在下文中一共展示了clsDBQueryManager.InsertOrUpdateSetting方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadAccountsMod
private void LoadAccountsMod()
{
try
{
if (Globals.IsFreeVersion)
{
// string DeleteQuery = "Delete from tb_FBAccount";
// DataBaseHandler.DeleteQuery(DeleteQuery, "tb_FBAccount");
LoadDataGrid();
}
//DataTable dt_Existing = objclsFBAccount.SelectAccoutsForGridView();
//if (Globals.IsFreeVersion)
//{
// if (dt_Existing.Rows.Count >= 5)
// {
// FrmFreeTrial frmFreeTrial = new FrmFreeTrial();
// frmFreeTrial.ShowDialog();
// }
//}
//DataSet ds = new DataSet();
DataTable dt = new DataTable();
using (OpenFileDialog ofd = new OpenFileDialog())
{
ofd.Filter = "Text Files (*.txt)|*.txt";
ofd.InitialDirectory = Application.StartupPath;
if (ofd.ShowDialog() == DialogResult.OK)
{
dt.Columns.Add("UserName");
dt.Columns.Add("Password");
dt.Columns.Add("ScreenName");
dt.Columns.Add("FollowerCount");
dt.Columns.Add("ProxyAddress");
dt.Columns.Add("ProxyPort");
dt.Columns.Add("ProxyUserName");
dt.Columns.Add("ProxyPassword");
dt.Columns.Add("ProfileName");
dt.Columns.Add("ProfileStatus");
dt.Columns.Add("Group Name");
dt.Columns.Add("Status");
ds = new DataSet();
ds.Tables.Add(dt);
dgvAccounts.Invoke(new MethodInvoker(delegate
{
textBox12.Text = ofd.FileName;
clsDBQueryManager ObjclsDBQueryManager = new clsDBQueryManager();
ObjclsDBQueryManager.InsertOrUpdateSetting("LoadAccounts", "LoadAccounts", StringEncoderDecoder.Encode(textBox12.Text));
dgvAccounts.DataSource = null;
}));
lst_AccountForUpload = GlobusFileHelper.ReadFiletoStringList(ofd.FileName).Distinct().ToList();
if (Globals.IsFreeVersion)
{
try
{
lst_AccountForUpload.RemoveRange(5, lst_AccountForUpload.Count - 5);
}
catch { }
}
if (Globals.IsBasicVersion)
{
try
{
string selectQuery = "select count(UserName) from tb_FBAccount";
DataSet DS = DataBaseHandler.SelectQuery(selectQuery, "tb_FBAccount");
int countLoadedAccounts = Convert.ToInt32(DS.Tables[0].Rows[0].ItemArray[0].ToString());
if (countLoadedAccounts >= 5)
{
LoadDataGrid();
MessageBox.Show("You Are Using TD Basic Version 5 Accounts allready loaded..");
return;
}
else
{
int RemainingAccount = 5 - countLoadedAccounts;
lst_AccountForUpload.RemoveRange(RemainingAccount, lst_AccountForUpload.Count - RemainingAccount);
}
}
catch { }
}
if (Globals.IsProVersion)
{
//.........这里部分代码省略.........