Esempio n. 1
0
        //public DataTable GetConfigDepartment(string systemId)
        //{
        //    try
        //    {
        //        return Bll.Common.ChangColName(dal.GetConfigDepartment(systemId));

        //    }
        //    catch (Exception ex)
        //    {
        //        ILog.WriteErrorLog(ex);
        //        return null;
        //    }
        //}

        //public DataTable GetTree(string queryField,string code)
        //{
        //    try
        //    {
        //        return Bll.Common.ChangColName(dal.GetTree(queryField,code));

        //    }
        //    catch (Exception ex)
        //    {
        //        ILog.WriteErrorLog(ex);
        //        return null;
        //    }
        //}
        //public DataTable GetTree(string code)
        //{
        //    try
        //    {
        //        return Bll.Common.ChangColName(dal.GetTree("code,codedesc", code));

        //    }
        //    catch (Exception ex)
        //    {
        //        ILog.WriteErrorLog(ex);
        //        return null;
        //    }
        //}
        //public DataTable GetSelectDevice(string where)
        //{
        //    try
        //    {
        //        return Bll.Common.ChangColName(dal.GetSelectDevice(where));

        //    }
        //    catch (Exception ex)
        //    {
        //        ILog.WriteErrorLog(ex);
        //        return null;
        //    }
        //}
        //public DataTable GetTreeDepartment(string where)
        //{
        //    try
        //    {
        //        return Bll.Common.ChangColName(dal.GetTreeDepartment(where));

        //    }
        //    catch (Exception ex)
        //    {
        //        ILog.WriteErrorLog(ex);
        //        return null;
        //    }
        //}
        /// <summary>
        /// 删除设备信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int DeleteDevice(string id)
        {
            try
            {
                return(dal.DeleteDevice(id));
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                return(-1);
            }
        }
Esempio n. 2
0
        public void Delete(DeleteDevice request)
        {
            var task = _deviceManager.DeleteDevice(request.Id);

            Task.WaitAll(task);
        }
 public void Delete(DeleteDevice request)
 {
     _deviceManager.DeleteDevice(request.Id);
 }