Ejemplo n.º 1
0
        private void bbi_Edit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int id = 0;

            if (this.gridView1.RowCount <= 0)
            {
                return;
            }
            id = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("EXECNO").ToString());
            if (id < 1)
            {
                MessageBox.Show("请选择需要修改成绩的数据!", "提示信息");
                return;
            }
            else
            {
                string termname          = this.gridView1.GetFocusedRowCellValue("TERMNAME").ToString();
                string workflowname      = this.gridView1.GetFocusedRowCellValue("WORKFLOWNAME").ToString();
                string nodename          = this.gridView1.GetFocusedRowCellValue("NODENAME").ToString();
                string stuno             = this.gridView1.GetFocusedRowCellValue("STUNO").ToString();
                string stuname           = this.gridView1.GetFocusedRowCellValue("STUNAME").ToString();
                string teachername       = this.gridView1.GetFocusedRowCellValue("TEANAME").ToString();
                string entname           = this.gridView1.GetFocusedRowCellValue("ENTNAME").ToString();
                frmSTU_MATERIALSEDIT frm = new frmSTU_MATERIALSEDIT(id, termname, workflowname, nodename, stuno, stuname, teachername, entname);
                frm.ShowDialog();
                readData();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 删除菜单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void bbi_Delete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (clbc_workflow.SelectedIndex < 0)
            {
                return;
            }
            decimal id           = 0;
            string  workflowname = clbc_workflow.Items[clbc_workflow.SelectedIndex].ToString();

            if (this.gridView1.RowCount <= 0)
            {
                return;
            }
            id = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("SETNO").ToString());
            if (id < 1)
            {
                MessageBox.Show("请选择需要删除的工作流节点!", "提示信息");
                return;
            }
            else
            {
                if (MessageBox.Show("确定要删除该信息吗?", "提示信息", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    deleteData(id);
                    ReadData(workflowname);
                }
                else
                {
                    return;
                }
            }
        }
Ejemplo n.º 3
0
        private void bbi_Delete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int id = 0;

            if (this.gridView1.RowCount <= 0)
            {
                return;
            }
            id = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("NODENO").ToString());
            if (id < 1)
            {
                MessageBox.Show("请选择需要删除的工作节点!", "提示信息");
                return;
            }
            else
            {
                if (MessageBox.Show("确定要删除该信息吗?", "提示信息", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    deleteData(id);
                    ReadData();
                }
                else
                {
                    return;
                }
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 删除按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void sbt_Delete_Click(object sender, EventArgs e)
        {
            if (this.cbb_teacher.SelectedIndex == -1)
            {
                MessageBox.Show("请选择指导教师!", "提示信息");
                return;
            }

            int id = 0;

            if (this.gridView1.RowCount <= 0)
            {
                return;
            }
            id = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("GUIDANCENO").ToString());
            if (id < 1)
            {
                MessageBox.Show("请选择需要删除的数据!", "提示信息");
                return;
            }
            else
            {
                if (MessageBox.Show("确定要删除该信息吗?", "提示信息", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    deleteData(id);
                    readData(2);
                }
                else
                {
                    return;
                }
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 修改菜单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void bbi_Edit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Model.WORKFLOWSETADD workflowsetaddMdl = new Model.WORKFLOWSETADD();
            workflowsetaddMdl.WORKFLOWNAME = clbc_workflow.Items[clbc_workflow.SelectedIndex].ToString();
            if (workflowsetaddMdl.WORKFLOWNAME.Length <= 0 || workflowsetaddMdl.WORKFLOWNAME == null)
            {
                MessageBox.Show("请选择需要修改的工作流!", "提示信息");
                return;
            }

            int id = 0;

            if (this.gridView1.RowCount <= 0)
            {
                return;
            }
            id = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("SETNO").ToString());
            if (id < 1)
            {
                MessageBox.Show("请选择需要修改的工作流节点!", "提示信息");
                return;
            }
            else
            {
                workflowsetaddMdl.SETNO     = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("SETNO").ToString());
                workflowsetaddMdl.NODENAME  = this.gridView1.GetFocusedRowCellValue("NODENAME").ToString();
                workflowsetaddMdl.NODEORDER = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("NODEORDER").ToString());
                workflowsetaddMdl.BEGINTIME = ToolHelper.ConvertToDateTime(this.gridView1.GetFocusedRowCellValue("BEGINTIME").ToString());
                workflowsetaddMdl.ENDTIME   = ToolHelper.ConvertToDateTime(this.gridView1.GetFocusedRowCellValue("ENDTIME").ToString());

                frmWORKFLOWSETADD frm = new frmWORKFLOWSETADD(workflowsetaddMdl, StatusClass.Edit);
                frm.ShowDialog();
                ReadData(workflowsetaddMdl.WORKFLOWNAME);
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 保存方法
        /// </summary>
        /// <returns></returns>
        private bool saveData()
        {
            try
            {
                BLL.COURSE_INFO   courseBll     = new BLL.COURSE_INFO();
                Model.COURSE_INFO courseMdl     = new Model.COURSE_INFO();
                BLL.COURSE_TYPE   coursetypeBll = new BLL.COURSE_TYPE();
                Model.COURSE_TYPE coursetypeMdl = new Model.COURSE_TYPE();

                if (this.cbb_coursetype.SelectedIndex != -1)
                {
                    coursetypeMdl          = coursetypeBll.GetModel(this.cbb_coursetype.Properties.Items[this.cbb_coursetype.SelectedIndex].ToString());
                    courseMdl.COURSETYPENO = coursetypeMdl.COURSETYPENO;
                }
                else
                {
                    MessageBox.Show("课程类型不能为空!", "提示信息");
                    return(false);
                }

                if (this.te_coursename.Text == "")
                {
                    MessageBox.Show("课程名称不能为空!", "提示信息");
                    return(false);
                }

                courseMdl.COURSENAME     = te_coursename.Text;
                courseMdl.TOTALHOUR      = ToolHelper.ConvertToInt(te_totalhour.Text);
                courseMdl.THEORYHOUR     = ToolHelper.ConvertToInt(te_theoryhour.Text);
                courseMdl.EXPERIMENTHOUR = ToolHelper.ConvertToInt(te_experimenthour.Text);
                courseMdl.CREDIT         = (decimal)ToolHelper.ConvertToFloat(te_credit.Text);
                courseMdl.MEMO           = te_memo.Text;

                if (this._enumStatus == StatusClass.AddNew)
                {
                    courseBll.Add(courseMdl);
                    return(true);
                }
                else if (this._enumStatus == StatusClass.Edit)
                {
                    courseMdl.COURSENO = this._courseno;
                    courseBll.Update(courseMdl);
                    return(true);
                }
                return(true);
            }
            catch (Exception exception)
            {
                MessageBox.Show("保存失败!" + exception.Message, exception.Message);
                return(false);
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 保存数据方法
        /// </summary>
        /// <returns></returns>
        private bool saveData()
        {
            try
            {
                BLL.DEPARTMENT_INFO   departmentbll = new BLL.DEPARTMENT_INFO();
                Model.DEPARTMENT_INFO departmentmdl = new Model.DEPARTMENT_INFO();

                if (this.te_departmentname.Text == "")
                {
                    MessageBox.Show("学院编号不能为空!", "提示信息");
                    return(false);
                }
                if (!ToolHelper.IsNumeric(this.te_departmentno.Text))
                {
                    MessageBox.Show("学院编号必须为数字!", "提示信息");
                    return(false);
                }
                if (this._enumStatus == StatusClass.AddNew)
                {
                    if (departmentbll.Exists(ToolHelper.ConvertToInt(te_departmentno.Text)))
                    {
                        MessageBox.Show("当前编号已经存在,请核查!", "提示信息");
                        return(false);
                    }

                    departmentmdl.DEPARTMENTNO   = ToolHelper.ConvertToInt(te_departmentno.Text);
                    departmentmdl.DEPARTMENTNAME = te_departmentname.Text;
                    departmentbll.Add(departmentmdl);
                    return(true);
                }
                else if (this._enumStatus == StatusClass.Edit)
                {
                    departmentmdl.DEPARTMENTNO   = this._departmentno;
                    departmentmdl.DEPARTMENTNAME = te_departmentname.Text;
                    departmentbll.Update(departmentmdl);
                    return(true);
                }
                return(true);
            }
            catch (Exception exception)
            {
                MessageBox.Show("保存失败!", exception.Message);
                return(false);
            }
        }
Ejemplo n.º 8
0
        private void bbi_Edit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int id = 0;

            if (this.gridView1.RowCount <= 0)
            {
                return;
            }
            id = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("NODENO").ToString());
            if (id < 1)
            {
                MessageBox.Show("请选择需要修改的工作节点!", "提示信息");
                return;
            }
            else
            {
                frmWORKNODEADD frm = new frmWORKNODEADD(id, StatusClass.Edit);
                frm.ShowDialog();
                ReadData();
            }
        }
Ejemplo n.º 9
0
        private void bbi_Turnover_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int id = 0;

            if (this.gridView2.RowCount <= 0)
            {
                return;
            }
            id = ToolHelper.ConvertToInt(this.gridView2.GetFocusedRowCellValue("TURNOVERNO").ToString());
            if (id < 1)
            {
                MessageBox.Show("请选择需要提交的材料记录!", "提示信息");
                return;
            }
            else
            {
                DateTime          dt = DateTime.Now;
                BLL.STU_MATERIALS stumaterialsBll = new BLL.STU_MATERIALS();
                stumaterialsBll.Update(id, dt);
                refresh_Materials();
            }
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 刷新材料信息方法
        /// </summary>
        private void refresh_Materials()
        {
            int id = 0;

            if (this.gridView1.RowCount <= 0)
            {
                return;
            }
            id = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("EXECNO").ToString());
            if (id < 1)
            {
                return;
            }
            else
            {
                BLL.STU_MATERIALS stumaterialsBll = new BLL.STU_MATERIALS();
                this.gridControl2.DataSource = stumaterialsBll.GetList(" and A.EXECNO = " + id.ToString()).Tables[0];
                this.gridView2.BestFitColumns();
                DBUtility.ToolHelper.DrawRowIndicator(gridView2, 50);
                DBUtility.ToolHelper.SetLineColorofGridView(this.gridView2);
            }
        }
Ejemplo n.º 11
0
        /// <summary>
        /// 修改就业记录菜单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void bbi_Edit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int id = 0;

            if (this.gridView1.RowCount <= 0)
            {
                return;
            }
            id = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("STATUSNO").ToString());
            if (id < 1)
            {
                MessageBox.Show("请选择需要修改的就业记录!", "提示信息");
                return;
            }
            else
            {
                this._stuno = this.gridView1.GetFocusedRowCellValue("STUNO").ToString();
                frmSTU_JOBSTATUSADD frm = new frmSTU_JOBSTATUSADD(id, StatusClass.Edit);
                frm.ShowDialog();
                readData(1, _stuno);
            }
        }
Ejemplo n.º 12
0
        /// <summary>
        /// 保存数据方法
        /// </summary>
        /// <returns></returns>
        private bool saveData()
        {
            try
            {
                BLL.BUILDING_INFO   buildingBll = new BLL.BUILDING_INFO();
                Model.BUILDING_INFO buildingMdl = new Model.BUILDING_INFO();

                if (!ToolHelper.IsNumeric(this.te_floors.Text))
                {
                    MessageBox.Show("楼层数必须为数字!", "提示信息");
                    return(false);
                }

                buildingMdl.BUILDINGID   = _buildingno;
                buildingMdl.FLOORS       = ToolHelper.ConvertToInt(this.te_floors.Text);
                buildingMdl.BUILDINGNAME = this.te_buildingname.Text;
                buildingMdl.ADMIN        = this.te_admin.Text;

                if (this._enumStatus == StatusClass.AddNew)
                {
                    buildingBll.Add(buildingMdl);
                    return(true);
                }
                else if (this._enumStatus == StatusClass.Edit)
                {
                    buildingBll.Update(buildingMdl);
                    return(true);
                }
                return(true);
            }
            catch (Exception exception)
            {
                MessageBox.Show("保存失败!", exception.Message);
                return(false);
            }
        }
Ejemplo n.º 13
0
        private void bbi_Edit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Model.NODEMATERIALSADD nodematerialsaddMdl = new Model.NODEMATERIALSADD();
            nodematerialsaddMdl.NODENAME = this.clbc_node.Items[clbc_node.SelectedIndex].ToString();
            if (nodematerialsaddMdl.NODENAME.Length <= 0 || nodematerialsaddMdl.NODENAME == null)
            {
                MessageBox.Show("请选择需要修改的工作节点!", "提示信息");
                return;
            }

            int id = 0;

            if (this.gridView1.RowCount <= 0)
            {
                return;
            }
            id = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("NODEMATERIALSNO").ToString());
            if (id < 1)
            {
                MessageBox.Show("请选择需要修改的材料信息!", "提示信息");
                return;
            }
            else
            {
                nodematerialsaddMdl.NODEMATERIALSNO = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("NODEMATERIALSNO").ToString());
                nodematerialsaddMdl.NAME            = this.gridView1.GetFocusedRowCellValue("NAME").ToString();
                nodematerialsaddMdl.MATERIALNAME    = this.gridView1.GetFocusedRowCellValue("MATERIALNAME").ToString();
                nodematerialsaddMdl.BEGINTIME       = ToolHelper.ConvertToDateTime(this.gridView1.GetFocusedRowCellValue("BEGINTIME").ToString());
                nodematerialsaddMdl.ENDTIME         = ToolHelper.ConvertToDateTime(this.gridView1.GetFocusedRowCellValue("ENDTIME").ToString());
                nodematerialsaddMdl.MEMO            = this.gridView1.GetFocusedRowCellValue("MEMO").ToString();

                frmNODEMATERIALSADD frm = new frmNODEMATERIALSADD(nodematerialsaddMdl, StatusClass.Edit);
                frm.ShowDialog();
                ReadData(nodematerialsaddMdl.NODENAME);
            }
        }
Ejemplo n.º 14
0
        /// <summary>
        /// 保存数据方法
        /// </summary>
        /// <returns></returns>
        private bool saveData()
        {
            try
            {
                BLL.WORKFLOWSET   workflowsetbll = new BLL.WORKFLOWSET();
                Model.WORKFLOWSET workflowsetmdl = new Model.WORKFLOWSET();

                BLL.WORKNODE   worknodeBll = new BLL.WORKNODE();
                Model.WORKNODE worknodeMdl = new Model.WORKNODE();

                BLL.WORKFLOW   workflowBll = new BLL.WORKFLOW();
                Model.WORKFLOW workflowMdl = new Model.WORKFLOW();

                if (this.cbb_nodename.Text == "")
                {
                    MessageBox.Show("工作节点不能为空!", "提示信息");
                    return(false);
                }

                if (this.cbb_nodeorder.Text == "")
                {
                    MessageBox.Show("节点顺序不能为空!", "提示信息");
                    return(false);
                }

                if (this.de_begintime.Text == "")
                {
                    MessageBox.Show("开始日期不能为空!", "提示信息");
                    return(false);
                }

                if (this.de_endtime.Text == "")
                {
                    MessageBox.Show("截止日期不能为空!", "提示信息");
                    return(false);
                }
                if (this._enumStatus == StatusClass.AddNew)  //新增工作流节点
                {
                    //获取工作流编号
                    workflowMdl = workflowBll.GetModel(workflowsetaddMdl.WORKFLOWNAME);
                    int workflowno = workflowMdl.WORKFLOWNO;
                    workflowsetmdl.WORKFLOWNO = workflowno;

                    //获取工作节点编号
                    worknodeMdl           = worknodeBll.GetModel(this.cbb_nodename.Text);
                    workflowsetmdl.NODENO = worknodeMdl.NODENO;

                    workflowsetmdl.NODEORDER = ToolHelper.ConvertToInt(this.cbb_nodeorder.Text);
                    workflowsetmdl.BEGINTIME = ToolHelper.ConvertToDateTime(this.de_begintime.Text);
                    workflowsetmdl.ENDTIME   = ToolHelper.ConvertToDateTime(this.de_endtime.Text);

                    workflowsetbll.Add(workflowsetmdl);
                    return(true);
                }
                else if (this._enumStatus == StatusClass.Edit)  //修改工作节点
                {
                    //获取工作流编号
                    workflowMdl = workflowBll.GetModel(workflowsetaddMdl.WORKFLOWNAME);
                    int workflowno = workflowMdl.WORKFLOWNO;
                    workflowsetmdl.WORKFLOWNO = workflowno;
                    worknodeMdl              = worknodeBll.GetModel(this.cbb_nodename.Text);
                    workflowsetmdl.NODENO    = worknodeMdl.NODENO;
                    workflowsetmdl.NODEORDER = ToolHelper.ConvertToInt(this.cbb_nodeorder.Text);
                    workflowsetmdl.BEGINTIME = ToolHelper.ConvertToDateTime(this.de_begintime.Text);
                    workflowsetmdl.ENDTIME   = ToolHelper.ConvertToDateTime(this.de_endtime.Text);
                    workflowsetmdl.SETNO     = setno;

                    workflowsetbll.Update(workflowsetmdl);
                    return(true);
                }
                return(true);
            }
            catch (Exception exception)
            {
                MessageBox.Show("保存失败!", exception.Message);
                return(false);
            }
        }
Ejemplo n.º 15
0
        /// <summary>
        /// 保存方法
        /// </summary>
        /// <returns></returns>
        private bool saveData()
        {
            try
            {
                BLL.STUDENT_JOBSTATUS   stujobstatusBll = new BLL.STUDENT_JOBSTATUS();
                Model.STUDENT_JOBSTATUS stujobstatusMdl = new Model.STUDENT_JOBSTATUS();

                if (this.cbb_entname.SelectedIndex != -1)
                {
                    BLL.ENTERPRISE_INFO   entBll = new BLL.ENTERPRISE_INFO();
                    Model.ENTERPRISE_INFO entMdl = new Model.ENTERPRISE_INFO();
                    entMdl = entBll.GetModel(this.cbb_entname.Properties.Items[this.cbb_entname.SelectedIndex].ToString());
                    stujobstatusMdl.ENTNO = entMdl.ENTNO;
                }
                else
                {
                    stujobstatusMdl.ENTNO = 1;
                }
                stujobstatusMdl.STUNO    = this.te_stuno.Text;
                stujobstatusMdl.JOBTITLE = this.te_jobtitle.Text;
                stujobstatusMdl.SALARY   = ToolHelper.ConvertToInt(this.te_salary.Text);
                stujobstatusMdl.STATUS   = this.cbb_status.Text;
                if (this.cbb_ifcurrent.Text == "未就业")
                {
                    stujobstatusMdl.IF_CURRENT = 0;
                }
                else
                {
                    stujobstatusMdl.IF_CURRENT = 1;
                }
                stujobstatusMdl.STATUSTIME = ToolHelper.ConvertToDateTime(this.dt_statustime.Value);
                stujobstatusMdl.MEMO       = this.te_memo.Text;


                if (this.cbb_status.Text == "")
                {
                    MessageBox.Show("就业状态不能为空!", "提示信息");
                    return(false);
                }

                if (this.cbb_ifcurrent.Text == "")
                {
                    MessageBox.Show("是否就业不能为空!", "提示信息");
                    return(false);
                }

                if (this._enumStatus == StatusClass.AddNew)  //新增班级
                {
                    stujobstatusBll.Add(stujobstatusMdl);
                    return(true);
                }
                else if (this._enumStatus == StatusClass.Edit)  //修改班级
                {
                    stujobstatusMdl.STATUSNO = this._statusno;
                    stujobstatusBll.Update(stujobstatusMdl);
                    return(true);
                }
                return(true);
            }
            catch (Exception exception)
            {
                MessageBox.Show("保存失败!", exception.Message);
                return(false);
            }
        }