Example #1
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            task = new Task();
            var    mySqlCon      = new My_SqlCon();
            var    sqlConnection = mySqlCon.GetConnection();
            String serial        = dataGridView1.CurrentRow.Cells[0].Value.ToString();
            var    dr            = mySqlCon.getSqlDr_Login($"select * from task where serial='{serial}'", sqlConnection);

            if (dr.Read())
            {
                task.Id         = dr[0].ToString();
                task.Serial     = dr[1].ToString();
                task.Shenheren  = dr[2].ToString();
                task.Time       = dr[3].ToString();
                task.Zherenren  = dr[4].ToString();
                task.Content    = dr[5].ToString();
                task.Gonghao    = dr[6].ToString();
                task.Sqtime     = dr[7].ToString();
                task.Status     = dr[8].ToString();
                task.Bu         = dr[9].ToString();
                task.Faqiren    = dr[10].ToString();
                task.Timeformat = dr[11].ToString();
                task.Subject    = dr[12].ToString();
            }
            var formInfo_Sub = new FormInfo_Sub(task, this);

            dr.Close();
            sqlConnection.Close();
            formInfo_Sub.ShowDialog();
        }
Example #2
0
 public ChooseUser(FormInfo_Sub formInfoSub, int who)
 {
     this.formInfoSub = formInfoSub;
     this.who         = who;
     InitializeComponent();
 }