/// <summary> /// /// </summary> /// <param name="id"></param> /// <param name="userid"></param> /// <returns></returns> public long DeleteEquipData(long id, int userid) { try { DEquipData dfh = new DEquipData(); EquipData tmp = dfh.SELECT_BY_ID(id); tmp.Isused = false; long result = dfh.UPDATE(tmp); Log log = new Log(); log.Tablename = "EquipData"; log.Tableid = result; log.Mid = userid; log.Datetime = DateTime.Now; log.Discription = "Delete"; DLog dl = new DLog(); dl.INSERT(log); return(result); } catch { return(0); } }
/// <summary> /// 更新楼层数据 /// </summary> /// <param name="info">楼层数据</param> /// <param name="userid">操作ID</param> /// <returns></returns> public long EditEquipdata(EquipData info, int userid) { try { DEquipData ded = new DEquipData(); info.Isused = true; long result = ded.UPDATE(info); Log log = new Log(); log.Tablename = "EquipData"; log.Tableid = result; log.Mid = userid; log.Datetime = DateTime.Now; log.Discription = "Update"; DLog dl = new DLog(); dl.INSERT(log); return(result); } catch { return(0); } }