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; namespace DataManager { public partial class UIBuckAuthorizeFund : Form { private int userId; public int UserId { get => userId; set => userId = value; } public UIBuckAuthorizeFund(int userId) { this.userId = userId; InitializeComponent(); } private void btnBuckAuthorizeFund_Click(object sender, EventArgs e) { string s = txtFundIds.Text.Trim().ToUpper(); string[] ids = s.Split(','); List errIds = new List { }; foreach (string id in ids) { if (id.Length != 6) errIds.Add(id); } if (errIds.Count > 0) { MessageBox.Show("这些备案编码有问题:" + string.Join(",", errIds), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Error); txtFundIds.Focus(); } else { int ret = DataAccess.Set_dm_fund_authorization(s, 1, UserId); MessageBox.Show(ret < 0 ? "通知程序员存盘有问题" : "批量导入成功", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } }