------ #### SuperDesign V3.0.2412.2001 - *.[新增]新增程序更新日志设置和自动发布功能。 - *.[修复]修复Post数据格式不正确时双击文本框会导致软件闪退的BUG。
56 lines
1.7 KiB
C#
56 lines
1.7 KiB
C#
using ryCommonDb;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
using System.Xml.Linq;
|
|
using 开发辅助工具.Manager;
|
|
|
|
namespace 开发辅助工具.Tools.SmartEditor
|
|
{
|
|
public partial class FrmFavFile : Form
|
|
{
|
|
public FrmFavFile()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void BtnCancel_Click(object sender, EventArgs e)
|
|
{
|
|
DialogResult= DialogResult.Cancel;
|
|
}
|
|
public int SelectedId = 0;
|
|
public int GroupId = 0;
|
|
public string FilePath { get; set; } = "";
|
|
private void BtnOK_Click(object sender, EventArgs e)
|
|
{
|
|
RyQuickSQL mySQL = new RyQuickSQL("FavFiles");
|
|
mySQL.AddField("name", TxtFavName.Text);
|
|
mySQL.AddField("FilePath", FilePath);
|
|
mySQL.AddField("FindText", TxtFind.Text);
|
|
mySQL.AddField("GroupId", GroupId);
|
|
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
|
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
|
{
|
|
mySQL.AddField("editTime", DateTime.Now);
|
|
if(SelectedId==0)
|
|
{
|
|
mySQL.AddField("addTime", DateTime.Now);
|
|
db.ExecuteNonQuery(mySQL.GetInsertSQL(), db.GetParameter(mySQL));
|
|
}
|
|
else
|
|
{
|
|
db.ExecuteNonQuery(mySQL.GetUpdateSQL() + " where id=" + SelectedId, mySQL);
|
|
}
|
|
}
|
|
db.Free();
|
|
DialogResult = DialogResult.OK;
|
|
}
|
|
}
|
|
}
|