⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmdy.cs

📁 界面美观,功能齐全,连接数据库,适合初学者
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace SMS
{
    public partial class frmDy : Form
    {
        public frmDy()
        {
            InitializeComponent();
        }

        private void frmDy_Load(object sender, EventArgs e)
        {
            comboBox1.SelectedIndex = 0;
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            OleDbConnection conn = BaseClass.ConnClass.DataConn();
            OleDbDataAdapter da = new OleDbDataAdapter("select * from tb_note where type='" + comboBox1.SelectedItem.ToString() + "'", conn);
            DataSet ds = new DataSet();
            da.Fill(ds);
            dgvShow.DataSource = ds.Tables[0];
        }

        private void button2_Click(object sender, EventArgs e)
        {
            
        }

        public string  stringSedn="";
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            stringSedn+=dgvShow.SelectedCells[0].Value.ToString();
            frmSendSMS frmsend = (frmSendSMS)this.Owner;
            frmsend.txtSmsContent.Text = stringSedn;
        }
        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void dgvShow_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -