private void btnOK_Click(object sender, EventArgs e) { StudentBLL bStudent = new StudentBLL(); if (bStudent.ChangeRate(txtSID.Text, int.Parse(Setting.FreeRate))) { MessageBox.Show("�Ǽdzɹ���"); BindData(); } else { MessageBox.Show("û�д�ѧ����"); } }
private void btnOK_Click(object sender, EventArgs e) { ClassQuestionMark.BLL.MarkBLL bMark = new ClassQuestionMark.BLL.MarkBLL(); if (bMark.AddMark(stuinfo.SID, Convert.ToInt32(cmbMark.Text))) { StudentBLL bStudent = new StudentBLL(); bStudent.ChangeRate(stuinfo.SID, (int)(stuinfo.Rate + Convert.ToInt16(cmbMark.Text))); MessageBox.Show(stuinfo.SName + "�÷���:" + cmbMark.Text,"�Ǽ�",MessageBoxButtons.OK,MessageBoxIcon.Information); this.Close(); } else { MessageBox.Show("��ӳɼ�ʧ�ܣ�", "����", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void GridViewMark_CellContentClick(object sender, DataGridViewCellEventArgs e) { int CIndex = e.ColumnIndex; //ɾ������ if (CIndex == 3) { StudentBLL bStudent = new StudentBLL(); //ʮ����ֵ����⣬��ť�е���ű��0��ѧ���е����Ϊ1 if (bStudent.ChangeRate(GridViewMark.Rows[e.RowIndex].Cells[0].Value.ToString(),0)) { MessageBox.Show("ɾ���ɹ�"); BindData(); } else MessageBox.Show("ɾ��ʧ��"); } }