48 lines
1.5 KiB
C#
48 lines
1.5 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 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);
|
|||
|
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
|
|||
|
if (db.ConnDb(Itrycn_Db.User_SQLConn) == 1)
|
|||
|
{
|
|||
|
if (db.ExecuteNonQuery(mySQL.GetUpdateSQL()+ " where FilePath=@FilePath",mySQL)==0)
|
|||
|
{
|
|||
|
mySQL.AddField("addTime", DateTime.Now);
|
|||
|
mySQL.AddField("editTime", DateTime.Now);
|
|||
|
db.ExecuteNonQuery(mySQL.GetInsertSQL(), db.GetParameter(mySQL));
|
|||
|
}
|
|||
|
}
|
|||
|
db.Free();
|
|||
|
DialogResult = DialogResult.OK;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|