Exemplo n.º 1
0
        // 物理删除由主键coalClassID指定的一条记录 DeleteMeiZhong
        public bool Delete(int coalClassID)
        {
            MeiZhongDelete exec = new MeiZhongDelete();

            try
            {
                exec.CoalClassID = coalClassID;
                exec.ExecNoQuery();
                return(true);
            }
            catch (Exception ex)
            {
                //throw ex;
                return(false);
            }
            finally
            {
                exec = null;
            }
        }
Exemplo n.º 2
0
        // 公用静态方法,删除一条记录 DeleteMeiZhong
        public static bool DeleteEntity(MeiZhongBusEntity obj)
        {
            if (obj == null || obj.IsEmpty)
            {
                return(false);
            }
            MeiZhongDelete exec = new MeiZhongDelete();

            try
            {
                exec.ReceiveParameter(obj);
                exec.ExecNoQuery();
                return(true);
            }
            catch (Exception ex)
            {
                //throw ex;
                return(false);
            }
            finally
            {
                obj = null;
            }
        }