示例#1
0
        public override int Delete()
        {
            if (_entity == null)
            {
                return(0);
            }

            string msg = string.Format("你确定要删除通话记录编号为【{0}】的记录吗?", _entity.code);

            if (MessageBox.Show(msg, "询问", MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.No)
            {
                return(0);
            }

            int  id   = _entity.id;
            bool isok = _bll.Delete(_entity.id);

            if (isok == false)
            {
                return(0);
            }

            _detailBll.DeleteByCallRecordId(id);

            Query();

            return(1);
        }