Пример #1
0
        private void bt_WorkType_Save_Click(object sender, EventArgs e)
        {
            if (CheckingWork())
            {
                if (!CheckTime_WorkType())
                {
                    return;
                }
                if (tempWork_ID == -1)         //新增
                {
                    if (SaveWorkTypeInfo())
                    {
                        SetTipsInfo(lb_WorkTypeTipsInfo, true, "保存成功!");

                        //Czlt-2011-12-10 更新时间
                        dbll.UpdateTime();

                        if (!New_DBAcess.IsDouble)          //单机版,直接刷新
                        {
                            frmEi.Refresh_WorkType();
                        }
                        else                                //热备版,启用定时器
                        {
                            frmEi.HostBackRefresh(true);
                        }
                    }
                    else
                    {
                        SetTipsInfo(lb_WorkTypeTipsInfo, false, "保存失败!");
                    }
                }
                else                           //修改
                {
                    if (UpdateWorkTypeInfo())
                    {
                        SetTipsInfo(lb_WorkTypeTipsInfo, true, "修改成功!");

                        //Czlt-2011-12-10 更新时间
                        dbll.UpdateTime();

                        if (!New_DBAcess.IsDouble)          //单机版,直接刷新
                        {
                            frmEi.Refresh_WorkType();
                        }
                        else                                //热备版,启用定时器
                        {
                            frmEi.HostBackRefresh(true);
                        }
                    }
                    else
                    {
                        SetTipsInfo(lb_WorkTypeTipsInfo, false, "修改失败!");
                    }
                }
            }
        }
Пример #2
0
        private void bt_Dept_Save_Click(object sender, EventArgs e)
        {
            if (CheckingDeptInfo())     //验证
            {
                if (tempDept_ID == -1)  //添加
                {
                    if (SaveSetDept())
                    {
                        SetTipsInfo(lb_DeptTipsInfo, true, "保存成功!");

                        //Czlt-2011-12-10 跟新配置信息
                        dbll.UpdateTime();

                        if (!New_DBAcess.IsDouble)          //单机版,直接刷新
                        {
                            frmEi.Refresh_Dept();
                            SetComboBoxParentDept();
                        }
                        else                                //热备版,启用定时器
                        {
                            frmEi.HostBackRefresh(true);
                        }
                    }
                    else
                    {
                        SetTipsInfo(lb_DeptTipsInfo, false, "保存失败!");
                    }
                }
                else                       //修改
                {
                    if (UpDateDept())
                    {
                        SetTipsInfo(lb_DeptTipsInfo, true, "修改成功!");

                        //Czlt-2011-12-10 跟新配置信息
                        dbll.UpdateTime();

                        if (!New_DBAcess.IsDouble)          //单机版,直接刷新
                        {
                            frmEi.Refresh_Dept();
                            SetComboBoxParentDept();
                        }
                        else                                //热备版,启用定时器
                        {
                            frmEi.HostBackRefresh(true);
                        }
                    }
                    else
                    {
                        SetTipsInfo(lb_DeptTipsInfo, false, "修改失败!");
                    }
                }
            }
        }
        private void bt_Cer_Save_Click(object sender, EventArgs e)
        {
            if (CheckingCertificate())          //验证证书信息
            {
                if (tempCer_ID == -1)           //添加
                {
                    if (SaveSetCer())
                    {
                        SetTipsInfo(lb_CerTipsInfo, true, "保存成功!");


                        //Czlt-2011-12-10 跟新时间
                        dbll.UpdateTime();

                        if (!New_DBAcess.IsDouble)          //单机版,直接刷新
                        {
                            frmEmp.Refresh_Cer();
                        }
                        else                                //热备版,启用定时器
                        {
                            frmEmp.HostBackRefresh(true);
                        }
                    }
                    else
                    {
                        SetTipsInfo(lb_CerTipsInfo, false, "保存失败!");
                    }
                }
                else                           //修改
                {
                    if (UpDateCer())
                    {
                        SetTipsInfo(lb_CerTipsInfo, true, "修改成功!");

                        //Czlt-2011-12-10 跟新时间
                        dbll.UpdateTime();

                        if (!New_DBAcess.IsDouble)          //单机版,直接刷新
                        {
                            frmEmp.Refresh_Cer();
                        }
                        else                                //热备版,启用定时器
                        {
                            frmEmp.HostBackRefresh(true);
                        }
                    }
                    else
                    {
                        SetTipsInfo(lb_CerTipsInfo, false, "修改失败!");
                    }
                }
            }
        }
        private void bt_Duty_Save_Click(object sender, EventArgs e)
        {
            if (CheckingDutyInfo())    //验证职务信息
            {
                if (tempDuty_ID == -1) //添加
                {
                    if (SaveSetDuty())
                    {
                        SetTipsInfo(lb_DutyTipsInfo, true, "保存成功!");

                        //Czlt-2011-12-10 跟新修改日期
                        dbll.UpdateTime();

                        if (!New_DBAcess.IsDouble)          //单机版,直接刷新
                        {
                            frmEi.Refresh_Duty();
                        }
                        else                                //热备版,启用定时器
                        {
                            frmEi.HostBackRefresh(true);
                        }
                    }
                    else
                    {
                        SetTipsInfo(lb_DutyTipsInfo, false, "保存失败!");
                    }
                }
                else                           //修改
                {
                    if (UpDateDuty())
                    {
                        SetTipsInfo(lb_DutyTipsInfo, true, "修改成功!");

                        //Czlt-2011-12-10 跟新修改日期
                        dbll.UpdateTime();

                        if (!New_DBAcess.IsDouble)          //单机版,直接刷新
                        {
                            frmEi.Refresh_Duty();
                        }
                        else                                //热备版,启用定时器
                        {
                            frmEi.HostBackRefresh(true);
                        }
                    }
                    else
                    {
                        SetTipsInfo(lb_DutyTipsInfo, false, "修改失败!");
                    }
                }
            }
        }