using System;
|
using System.Collections.Generic;
|
using System.ComponentModel;
|
using System.Data;
|
using System.Drawing;
|
using System.Text;
|
using System.Windows.Forms;
|
|
namespace OAM
|
{
|
public partial class frmLT : Form
|
{
|
public frmLT()
|
{
|
InitializeComponent();
|
}
|
|
string BillType = "4503";
|
private void cmdSend_Click(object sender, EventArgs e)
|
{
|
if (txtContext.Text == "")
|
{
|
MessageBox.Show("请录入主题");
|
return;
|
}
|
if (Add())
|
{
|
this.Close();
|
}
|
}
|
private bool Add()
|
{
|
string sDate;
|
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
|
long MainID;
|
MainID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
|
sDate = DateTime.Now.ToString();
|
string Context = txtContext.Text.Replace("'", "‘");
|
string Desc = txtDesc.Text.Replace("'", "‘");
|
oCn.RunProc("Insert into oa_ltmain(id,operator,context,description,opdate) values(" + MainID + ",'" + DBUtility.ClsPub.CurUserName + "','" + Context + "','" + Desc + "','" + sDate + "')");
|
oCn.RunProc("Insert into oa_ltsub(id,mainid,operator,context,opdate) values(-1," + MainID + ",'" + DBUtility.ClsPub.CurUserName + "','" + Context + "','" + sDate + "')");
|
return true;
|
}
|
|
private void cmdCancel_Click(object sender, EventArgs e)
|
{
|
this.Close();
|
}
|
}
|
}
|