Ejemplo n.º 1
0
        private void BtnAddSever_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(this.textServerName.Text))
            {
                XtraMessageBox.Show("请填写服务名!");
                return;
            }
            if (string.IsNullOrWhiteSpace(this.textSecond.Text))
            {
                XtraMessageBox.Show("请填写服务别名!");
                return;
            }
            if (string.IsNullOrWhiteSpace(this.comboTime.Text))
            {
                XtraMessageBox.Show("请填写服务时长!");
                return;
            }
            if (SelectDao.IsServerNameExist(this.textServerName.Text))
            {
                XtraMessageBox.Show("该服务名已经存在!");
                return;
            }
            SkillVo vo = new SkillVo();

            vo.SkillName  = this.textServerName.Text;
            vo.SecondName = this.textSecond.Text;
            vo.ServerTime = this.comboTime.Text;
            vo.Remark     = this.memoSerRemark.Text;
            vo.CompanyId  = SystemConst.companyId;
            if (InsertDao.InsertData(vo, typeof(SkillVo)) > 0)
            {
                XtraMessageBox.Show("添加项目成功!");
                RefreshSkill();
            }
        }