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

毕业论文移动版

毕业论文 > 计算机论文 >

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



            try
            {
                _DbEntities.Sign.AddObject(SignObject);
                _DbEntities.SaveChanges();

                MessageBox.Show("签到成功!");
                this.button1.Enabled = false;
                return;
            }
            catch
            {
                MessageBox.Show("签到失败!");
                return;
            }
3.4.2    日常排班管理
图8 日常排班管理
    日常排班信息的添加、删除、修改的业务逻辑实现如下所示:
              var WorkObject = _DbEntities.WorkOrder.SingleOrDefault(p => p.W_ID == this.textBox1.Text.Trim());
                if (WorkObject != null)
                {
                    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.SaveChanges();

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