예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Dictionary <string, string> record = settingEditor1.Result;

            if (record != null && record.Count > 0)
            {
                int id;
                record.Remove("ID");
                bool flag = EditCommon.InsertRecordDB(record, "TerminalTypes", out id);
                MessageBox.Show("添加数据" + (flag ? "成功" : "失败"));
                if (flag)
                {
                    LoadTableToSetting("TerminalTypes");
                }
            }
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Dictionary <string, string> record = settingEditor1.Result;

            if (record != null && record.Count > 0)
            {
                int id;
                record.Remove("ID");
                bool  flag = EditCommon.InsertRecordDB(record, "Terminals", out id);
                Users u    = Common.GetOneUsers(Convert.ToInt32(record["UserID"]));
                Common.UpdateDeadline(u);
                MessageBox.Show("添加数据" + (flag ? "成功" : "失败"));
                if (flag)
                {
                    LoadTableToSetting("Terminals");
                }
            }
        }