예제 #1
0
        private void EventBox_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            SelectEvent se = new SelectEvent();

            se.ShowDialog();
            if (se.DialogResult == DialogResult.Cancel)
            {
                return;
            }
            common.execSQL("UPDATE statel_events SET eventnum=" + se.returnvalue + " WHERE eventid=" + selectedevent + " AND statel_id=" + selectedstatel);
            ChangeStatelSelection();
        }
예제 #2
0
        private void but_AddEvent_Click(object sender, EventArgs e)
        {
            SelectEvent se = new SelectEvent();

            se.ShowDialog();
            if (se.DialogResult == DialogResult.Cancel)
            {
                return;
            }

            DataSet ds          = common.readSQL("SELECT count(*) from statel_events where statel_id=" + selectedstatel);
            int     nexteventid = 1;

            if ((Int32)ds.Tables[0].Rows[0][0] > 0)
            {
                ds          = common.readSQL("SELECT eventid from statel_events WHERE statel_id=" + selectedstatel + " ORDER BY eventid DESC");
                nexteventid = ((Int32)ds.Tables[0].Rows[0][0]) + 1;
            }
            common.execSQL("INSERT INTO statel_events VALUES (" + nexteventid + "," + selectedstatel + "," + se.returnvalue + ")");
        }
예제 #3
0
파일: MainWindow.cs 프로젝트: semirs/CellAO
        private void but_AddEvent_Click(object sender, EventArgs e)
        {
            SelectEvent se = new SelectEvent();
            se.ShowDialog();
            if (se.DialogResult == DialogResult.Cancel)
            {
                return;
            }

            DataSet ds = common.readSQL("SELECT count(*) from statel_events where statel_id=" + selectedstatel);
            int nexteventid = 1;
            if ((Int32)ds.Tables[0].Rows[0][0] > 0)
            {
                ds = common.readSQL("SELECT eventid from statel_events WHERE statel_id=" + selectedstatel + " ORDER BY eventid DESC");
                nexteventid = ((Int32)ds.Tables[0].Rows[0][0]) + 1;
            }
            common.execSQL("INSERT INTO statel_events VALUES (" + nexteventid + "," + selectedstatel + "," + se.returnvalue + ")");
        }
예제 #4
0
파일: MainWindow.cs 프로젝트: semirs/CellAO
 private void EventBox_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     SelectEvent se = new SelectEvent();
     se.ShowDialog();
     if (se.DialogResult == DialogResult.Cancel)
     {
         return;
     }
     common.execSQL("UPDATE statel_events SET eventnum=" + se.returnvalue + " WHERE eventid=" + selectedevent + " AND statel_id=" + selectedstatel);
     ChangeStatelSelection();
 }