Пример #1
0
        /// <summary>
        /// 신규 버튼
        /// </summary>
        private void fnNew()
        {
            DataTable dtt = new DataTable();

            /*
             * for (int i = 0; i < dt.Rows.Count; i++)
             * {
             *  if (intMaxSeq < Convert.ToInt32(dt.Rows[i]["Seq"]))
             *  {
             *      intMaxSeq = Convert.ToInt32(dt.Rows[i]["Seq"]);
             *  }
             * }
             */

            strSQL = @"SELECT CASE WHEN Max(Seq) IS NULL THEN 0 ELSE Max(Seq) END AS 'Seq'
                         FROM ASList";
            SQLiteDataAdapter Ap = new SQLiteDataAdapter(strSQL, conn);

            Ap.Fill(dtt);


            EnrollForm EF = new EnrollForm(dtCombo, Convert.ToInt32(dtt.Rows[0][0].ToString()) + 1);

            EF.StartPosition = FormStartPosition.CenterParent;

            if (EF.ShowDialog() == DialogResult.Cancel)
            {
            }
        }
Пример #2
0
        /// <summary>
        /// 수정할 때 폼 열기
        /// </summary>
        private void fnSelectedOpen()
        {
            Dictionary <string, string> dicSelected = fnSelectedDic();
            EnrollForm EF = new EnrollForm(dtCombo, dicSelected);

            EF.StartPosition = FormStartPosition.CenterParent;


            if (EF.ShowDialog() == DialogResult.Cancel)
            {
            }
        }