/// <summary> /// 查询借出或归还情况表 /// </summary> /// <param name="facility">包含用户名,设备类别</param> /// <returns></returns> public DataTable queryDeviceInputOutputLog(Facility facility) { switch (facility.status) { case DeviceStatus.LOAN: return(KyMySql.queryStorageLimitUser(facility.category, facility.ownUser, MySqlConsts.TABLE_LOG_LOAN)); case DeviceStatus.RETURN: return(KyMySql.queryStorageLimitUser(facility.category, facility.ownUser, MySqlConsts.TABLE_LOG_RETURN)); case DeviceStatus.INPUT: return(KyMySql.queryStorageLimitUser(facility.category, facility.ownUser, MySqlConsts.TABLE_LOG_INPUT)); case DeviceStatus.OUTPUT: return(KyMySql.queryStorageLimitUser(facility.category, facility.ownUser, MySqlConsts.TABLE_LOG_OUTPUT)); } throw new Exception("查询借出或归还情况表异常,设置有误"); }
/// <summary> /// 查询库存情况表 /// </summary> /// <param name="facility">包含用户名,设备类别</param> /// <returns></returns> public static DataTable queryStorageLimitUser(Facility facility) { return(KyMySql.queryStorageLimitUser(facility.category, facility.ownUser, MySqlConsts.TABLE_STATUS_REPERTORY)); }