Esempio n. 1
0
 private void btbuild_Click(object sender, EventArgs e)
 {
     if (listv.SelectedItems.Count > 0)
     {
         string ids = listv.SelectedItems[0].Name;
         if (ids != "")
         {
             DataTable dt   = wapp.SQLiteConn.Sqllite.GetDT("select * from tklb where zid=?", ids);
             int       yxsl = DataOften.GetInt(dt, "yxsl", "0");
             if (yxsl <= 0)
             {
                 wapp.MessageBoxEx.Show(this, "该题库至少需要一条有效的题目!", "系统提示");
                 return;
             }
             using (BuildTestPaper form = new BuildTestPaper())
             {
                 form.tkid          = ids;
                 form.StartPosition = FormStartPosition.CenterParent;
                 form.ShowDialog(this);
             }
         }
     }
     else
     {
         wapp.MessageBoxEx.Show(this, "请选择需要生成试卷的题库!", "系统提示");
     }
 }