C#公司考勤管理系统的设计实现+流程图+ER图(10)_毕业论文

毕业论文移动版

毕业论文 > 计算机论文 >

C#公司考勤管理系统的设计实现+流程图+ER图(10)


                        MessageBox.Show("保存失败!");
                        return;
                    }
                }
                else
                {
                    MessageBox.Show("保存失败!");
                    return;
                }
3.4.3    调班换班管理

图9 调班换班管理
    调班换班信息的添加、删除、修改的业务逻辑实现如下所示:
                DAL.WorkOrder WorkObject = new DAL.WorkOrder();
                WorkObject.W_ID = BLL.BaseUtility.GenerateGUID();
                WorkObject.W_UserName = this.comboBox1.SelectedValue.ToString();
                WorkObject.W_XingMing = this.comboBox1.Text;
                WorkObject.W_Type = this.comboBox2.Text;
                WorkObject.W_Time = dateTimePicker1.Value;
                WorkObject.W_Bz = this.textBox2.Text;

                try
                {
                    _DbEntities.WorkOrder.AddObject(WorkObject);
                    _DbEntities.SaveChanges();

                    MessageBox.Show("保存成功!");

                    Clear();
                    BindDataForGridView();
                    return;
                }
                catch
                {
                    MessageBox.Show("保存失败!");
                    return;
                } (责任编辑:qin)