Beispiel #1
0
        private void button12_Click(object sender, EventArgs e)
        {
            BLL.Score        score     = new BLL.Score();
            Common.Translate translate = new Common.Translate();
            Model.Score      model     = new Model.Score();
            model.UserName = textBox8.Text;

            this.dataGridView2.DataSource = score.select(model);
        }
Beispiel #2
0
        private void button11_Click(object sender, EventArgs e)
        {
            BLL.Score        score     = new BLL.Score();
            Common.Translate translate = new Common.Translate();
            Model.Score      model     = new Model.Score();
            model.UserName = textBox8.Text;

            string description = score.chaxun(model);

            this.dataGridView2.DataSource = translate.string2datatable(description);
        }
Beispiel #3
0
        private void button10_Click(object sender, EventArgs e)
        {
            custom_condition = new DataTable("condition");
            custom_condition.Columns.Add("号码", Type.GetType("System.String"));
            custom_condition.Columns.Add("项目", Type.GetType("System.String"));
            custom_condition.Columns.Add("分值", Type.GetType("System.Int32"));
            DataRow newRow;

            for (int i = 0; i < chk.Length; i++)
            {
                if (chk[i].Checked)
                {
                    newRow    = custom_condition.NewRow();
                    newRow[0] = "condition_" + i;
                    newRow[1] = names[i].Text;
                    newRow[2] = Convert.ToInt32(ratios[i].Text);
                    custom_condition.Rows.Add(newRow);
                }
            }
            Common.Translate translate = new Common.Translate();
            this.dataGridView2.DataSource = custom_condition;
            string description = translate.datatable2string(custom_condition);

            textBox7.Text = description;

            BLL.Score   score = new BLL.Score();
            Model.Score model = new Model.Score();
            model.UserName = textBox8.Text;
            model.Formula  = description;
            string mesg = "";

            if (score.tianjia(model, out mesg) == true)
            {
                MessageBox.Show("添加成功!");
            }
            else
            {
                MessageBox.Show(mesg);
            }
        }