curriculum_design/PublishManip.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/********************************************
 *			 Made by MeiZhaoRui				*
 *			 2014年04月16日 更新				*
 *******************************************/

using System;
using System.Data;
using System.Data.SqlClient;
using System.Windows.Forms;

namespace curriculum_design
{
	public partial class PublishManip : Form
	{
		DataSet ds;
		public PublishManip()
		{
			InitializeComponent();
		}
		private void Update_ds()
		{
			try
			{
				ds = Program.sqlManage.GetDataSet("proc_select_PublishInfo");
				comboBox1.Items.Add("");
				for (int i = 0; i < ds.Tables[0].Rows.Count; ++i)
				{
					comboBox1.Items.Add(ds.Tables[0].Rows[i][0].ToString().Trim());
				}
			}
			catch (SqlException es)
			{
				MsgBox.ShowError(es.ToString() );
			}
		}
		private void PublishManip_Load(object sender, EventArgs e)
		{
			Update_ds();
		}

		private void add_Click(object sender, EventArgs e)
		{
			string str = "execute proc_insert_publishInfo '" + comboBox1.Text + "','" + tInfomation.Text.ToString().Trim() + "'";
			if (Program.sqlManage.ExecuteNonQuery(str))
			{
				MsgBox.ShowNormal("添加成功");
				comboBox1.Items.Clear();
				tInfomation.Clear();
				Update_ds();
			}
			else
				MsgBox.ShowError("已存在此出版社信息,添加失败!");	
		}

		private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
		{
			if (comboBox1.SelectedIndex != 0)
			{
				tb_del.Enabled = !(tb_add.Enabled = false);
				tInfomation.ReadOnly = true;
后面还有 31 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。