init lserp cs 5.0

This commit is contained in:
cyf
2026-07-10 15:25:05 +08:00
commit 90f3fda86a
3799 changed files with 976868 additions and 0 deletions
+59
View File
@@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using CommonLib;
namespace EmployeeManager
{
public partial class FrmTest : Form
{
public FrmTest()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("测试窗口");
}
private void FrmTest_Load(object sender, EventArgs e)
{
//这里可以引用DllBaseClass类中的静态参数
checkBox1.Text = DllBaseClass.m_myName;
//执行sql语句返回结果集
using (SqlDataReader dr = SqlHelper.ExecuteReader(CommandType.Text, "select top 10 EmployeeName from p_Employeetab", null))
{
while (dr.Read())
{
listBox1.Items.Add(dr["EmployeeName"].ToString());
}
}
//执行存储过程返回结果集
SqlParameter[] cmdParams = new SqlParameter[] {
new SqlParameter("@NewMsgCount",SqlDbType.Int),
new SqlParameter("@NewEmailCount",SqlDbType.Int)
};
cmdParams[0].Direction = ParameterDirection.Output;
cmdParams[1].Direction = ParameterDirection.Output;
DataSet ds = SqlHelper.ExecuteDataSet(CommandType.StoredProcedure, "pr_ReadOnlinePersons", "MyTableName", cmdParams);
foreach (DataRow drRow in ds.Tables["MyTableName"].Rows)
{
listBox2.Items.Add(drRow["EmployeeName"].ToString());
}
label1.Text = string.Format("输出参数1{0},输出参数2{1}",cmdParams[0].Value,cmdParams[1].Value);
}
}
}