Ejemplo n.º 1
0
        private void button7_Click(object sender, EventArgs e)//借用按钮
        {
            BorrowClassRoom borrowClassRoom = new BorrowClassRoom()
            {
                clno      = jyjs.Text,
                uname     = syzxm.Text,
                weekday   = xq.Text,
                period    = jysj.Text,
                use       = ytsm.Text,
                usestatus = 0
            };
            BorrowClassRoomBLL borrowClassRoomBLL = new BorrowClassRoomBLL();

            if (borrowClassRoomBLL.Add(borrowClassRoom))
            {
                MessageBox.Show("申请成功");
                syzxm.Text = "";
                ytsm.Text  = "";
                Weekday_Period_LoadList();
            }
            else
            {
                MessageBox.Show("申请失败");
            }
        }
Ejemplo n.º 2
0
        private void clnoLoadList(string clno)
        {
            BorrowClassRoomBLL miBll = new BorrowClassRoomBLL();

            dgvList.DataSource = miBll.clnoGetList(clno);
            ClassRoomBLL classRoomBLL = new ClassRoomBLL();

            dataGridView5.DataSource = classRoomBLL.clnoGetList(clno);
            //dgvList.Columns["usestatus"].Visible = false;
        }
Ejemplo n.º 3
0
 private void Weekday_Period_LoadList()//通过星期和时间段的选择,跟新表的数据源
 {
     if (xq.Text != "" && jysj.Text != "")
     {
         TeacherCourseBLL   teacherCourseBLL   = new TeacherCourseBLL();
         BorrowClassRoomBLL borrowClassRoomBLL = new BorrowClassRoomBLL();
         ClassRoomBLL       classRoomBLL       = new ClassRoomBLL();
         List <string>      clnolist           = borrowClassRoomBLL.Weekday_Period_GetClnoList(xq.Text, jysj.Text);
         foreach (string clno in teacherCourseBLL.Weekday_Period_GetClnoList(xq.Text, jysj.Text))
         {
             clnolist.Add(clno);
         }
         dataGridView3.DataSource = classRoomBLL.GetListExptClno(clnolist);
         jyjs.DataSource          = classRoomBLL.GetClnoListExptClno(clnolist);
     }
 }
Ejemplo n.º 4
0
        private void Remove_Click(object sender, EventArgs e)//删除申请
        {
            var rows = BorrowClassRoomList.SelectedRows;

            if (rows.Count > 0)
            {
                DialogResult result = MessageBox.Show("确定要删除吗?", "提示", MessageBoxButtons.OKCancel);
                if (result == DialogResult.Cancel)
                {
                    return;
                }
                BorrowClassRoom borrowClassRoom = new BorrowClassRoom()
                {
                    clno      = rows[0].Cells[0].Value.ToString(),
                    uname     = rows[0].Cells[1].Value.ToString(),
                    weekday   = rows[0].Cells[2].Value.ToString(),
                    period    = rows[0].Cells[3].Value.ToString(),
                    use       = rows[0].Cells[4].Value.ToString(),
                    usestatus = Convert.ToInt32(rows[0].Cells[5].Value)
                };
                BorrowClassRoomBLL borrowClassRoomBLL = new BorrowClassRoomBLL();
                if (borrowClassRoomBLL.RemoveOne(borrowClassRoom))
                {
                    MessageBox.Show("删除成功");
                    LoadBorrowClassRoomList();
                }
                else
                {
                    MessageBox.Show("删除失败");
                }
            }
            else
            {
                MessageBox.Show("请选择要删除的行");
            }
        }
Ejemplo n.º 5
0
        private void Agree_Click(object sender, EventArgs e)//同意申请
        {
            var rows = BorrowClassRoomList.SelectedRows;

            if (rows.Count > 0)
            {
                DialogResult result = MessageBox.Show("确定要同意申请吗?", "提示", MessageBoxButtons.OKCancel);
                if (result == DialogResult.Cancel)
                {
                    return;
                }
                BorrowClassRoom borrowClassRoom = new BorrowClassRoom()
                {
                    clno      = rows[0].Cells[0].Value.ToString(),
                    uname     = rows[0].Cells[1].Value.ToString(),
                    weekday   = rows[0].Cells[2].Value.ToString(),
                    period    = rows[0].Cells[3].Value.ToString(),
                    use       = rows[0].Cells[4].Value.ToString(),
                    usestatus = 1
                };
                BorrowClassRoomBLL borrowClassRoomBLL = new BorrowClassRoomBLL();
                if (borrowClassRoomBLL.Edit(borrowClassRoom))
                {
                    MessageBox.Show("同意申请完成");
                    LoadBorrowClassRoomList();
                }
                else
                {
                    MessageBox.Show("通过申请失败");
                }
            }
            else
            {
                MessageBox.Show("请选择要通过申请的行");
            }
        }
Ejemplo n.º 6
0
        private void LoadBorrowClassRoomList()//教室借用信息数据源
        {
            BorrowClassRoomBLL borrowClassRoomBLL = new BorrowClassRoomBLL();

            BorrowClassRoomList.DataSource = borrowClassRoomBLL.GetWaitList();
        }