示例#1
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);
            }
        }
        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);
            }
        }
示例#3
0
        /// <summary>
        /// 保存数据方法
        /// </summary>
        /// <returns></returns>
        private bool saveData()
        {
            try
            {
                BLL.WORKFLOW   workflowbll = new BLL.WORKFLOW();
                Model.WORKFLOW workflowmdl = new Model.WORKFLOW();

                if (this.te_workflowname.Text == "")
                {
                    MessageBox.Show("工作流名称不能为空!", "提示信息");
                    return(false);
                }
                if (this.cbb_status.Text == "")
                {
                    MessageBox.Show("状态不能为空!", "提示信息");
                    return(false);
                }

                if (this.de_createdate.Text == "")
                {
                    MessageBox.Show("创建时间不能为空!", "提示信息");
                    return(false);
                }
                if (this._enumStatus == StatusClass.AddNew)  //新增工作流
                {
                    workflowmdl.WORKFLOWNAME = this.te_workflowname.Text;
                    workflowmdl.CREATEDATE   = ToolHelper.ConvertToDateTime(this.de_createdate.Text);
                    string status = this.cbb_status.Text;
                    if (status == "未用")
                    {
                        workflowmdl.STATUS = 0;
                    }
                    else
                    {
                        workflowmdl.STATUS = 1;
                    }
                    workflowbll.Add(workflowmdl);
                    return(true);
                }
                else if (this._enumStatus == StatusClass.Edit)  //修改工作流
                {
                    workflowmdl.WORKFLOWNO   = this._workflowno;
                    workflowmdl.WORKFLOWNAME = this.te_workflowname.Text;
                    workflowmdl.CREATEDATE   = ToolHelper.ConvertToDateTime(this.de_createdate.Text);
                    string status = this.cbb_status.Text;
                    if (status == "未用")
                    {
                        workflowmdl.STATUS = 0;
                    }
                    else
                    {
                        workflowmdl.STATUS = 1;
                    }
                    workflowbll.Update(workflowmdl);
                    return(true);
                }
                return(true);
            }
            catch (Exception exception)
            {
                MessageBox.Show("保存失败!", exception.Message);
                return(false);
            }
        }
        /// <summary>
        /// 保存数据方法
        /// </summary>
        /// <returns></returns>
        private bool saveData()
        {
            try
            {
                BLL.MATERIAL_INFO   materialBll = new BLL.MATERIAL_INFO();
                Model.MATERIAL_INFO materialMdl = new Model.MATERIAL_INFO();

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

                BLL.TEACHER_INFO   teacherBll = new BLL.TEACHER_INFO();
                Model.TEACHER_INFO teacherMdl = new Model.TEACHER_INFO();

                BLL.NODEMATERIALS   nodematerialsBll = new BLL.NODEMATERIALS();
                Model.NODEMATERIALS nodematerialsMdl = new Model.NODEMATERIALS();

                if (this.cbb_materialname.Text == "")
                {
                    MessageBox.Show("材料信息不能为空!", "提示信息");
                    return(false);
                }

                if (this.cbb_name.Text == "")
                {
                    MessageBox.Show("负责教师不能为空!", "提示信息");
                    return(false);
                }

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

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

                //获取工作节点编号
                worknodeMdl = worknodeBll.GetModel(this.te_nodename.Text);
                int nodeno = worknodeMdl.NODENO;
                nodematerialsMdl.NODENO = nodeno;

                //获取材料编号
                materialMdl = materialBll.GetModel(this.cbb_materialname.Text);
                nodematerialsMdl.MATERIALNO = materialMdl.MATERIALNO;

                //获取教师编号
                teacherMdl = teacherBll.GetModel(this.cbb_name.Text);
                nodematerialsMdl.TEACHERNO = teacherMdl.TEACHERNO;

                nodematerialsMdl.BEGINTIME = ToolHelper.ConvertToDateTime(this.de_begintime.Value);
                nodematerialsMdl.ENDTIME   = ToolHelper.ConvertToDateTime(this.de_endtime.Value);
                nodematerialsMdl.MEMO      = this.te_memo.Text;

                if (this._enumStatus == StatusClass.AddNew)  //新增节点材料信息
                {
                    nodematerialsBll.Add(nodematerialsMdl);
                    return(true);
                }
                else if (this._enumStatus == StatusClass.Edit)  //修改节点材料信息
                {
                    nodematerialsMdl.NODEMATERIALSNO = _nodematerialsno;
                    nodematerialsBll.Update(nodematerialsMdl);
                    return(true);
                }
                return(true);
            }
            catch (Exception exception)
            {
                MessageBox.Show("保存失败!", exception.Message);
                return(false);
            }
        }
        /// <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);
            }
        }
示例#6
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);
            }
        }