예제 #1
0
        private void dgvLastWatched_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            String codeString = dgvLastWatched.Rows[e.RowIndex].Cells["code"].FormattedValue.ToString();

            DaoSession daoSession = new DaoSession();
            daoSession.openConnection();
            Session s = daoSession.getSessionByCode(int.Parse(codeString));
            daoSession.closeConnection();

            if (s != null)
            {
                AddScreeningForm asf = new AddScreeningForm(user, s);
                asf.ShowDialog();
                asf.Dispose();
            }
        }
예제 #2
0
        private void simpleQuery()
        {
            DaoSession daoSession = new DaoSession();
            daoSession.openConnection();
            List<Session> sessions = daoSession.simpleQuery(tbSimple.Text, user.getLogin());
            daoSession.closeConnection();

            String output = "";
            if (sessions != null)
                foreach (Session s in sessions)
                {
                    Video v = s.getVideo();
                    output += s.getDate() + " " + v.getNationalTitle() + " " + v.getDirector() + " " + s.getEvaluetion() + " " + s.getMode() + " " + s.getComment() + Environment.NewLine;
                    AddScreeningForm asf = new AddScreeningForm(user, s);
                    asf.ShowDialog();
                    asf.Dispose();
                }
            MessageBox.Show(output);
        }