Ejemplo n.º 1
0
 private void btnNotice_Click(object sender, EventArgs e)
 {
     using (NarrativeMemoForm nmf = new NarrativeMemoForm(user_id))
     {
         this.Dispose();
         nmf.ShowDialog();
     }
 }
Ejemplo n.º 2
0
        private void forNoticetoExplain()
        {
            using (NarrativeMemoForm nmf = new NarrativeMemoForm(empid))
            {
                MySqlDataReader _reader = csm.sqlCommand("Select *,YEAR(nte.date_reported)as _year, Day(nte.date_reported)as _day, Month(nte.date_reported)as _mon, date_format(date_created, '%m/%d/%Y')as'datecreated' from noticetoexplain nte inner join record r on nte.memo_no = r.memo_no where nte.memo_no = '" + tblDraft.CurrentRow.Cells[0].Value.ToString() + "'").ExecuteReader();
                while (_reader.Read())
                {
                    nmf.lblGenRecNo.Text = _reader.GetString("memo_no");
                    nmf.txtDateNow.Text  = _reader.GetString("datecreated");
                    nmf.dtReported.Value = new DateTime(int.Parse(_reader.GetString("_year")), int.Parse(_reader.GetString("_mon")), int.Parse(_reader.GetString("_day")));
                    nmf.txtSubject.Text  = _reader.GetString("title");
                    nmf.txtFinding.Text  = _reader.GetString("findings");
                    nmf.txtMngComm.Text  = _reader.GetString("commentary");

                    nmf.ShowDialog();
                }
                csm.closeSql();
            }
        }